mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-27 11:40:13 +00:00
Compare commits
917 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
113c3887ae | ||
|
|
9f5040435f | ||
|
|
f21e9c6a32 | ||
|
|
a071956675 | ||
|
|
eab4f9530b | ||
|
|
ce8b03b692 | ||
|
|
2505a48ac2 | ||
|
|
74e75e93af | ||
|
|
4f8390b515 | ||
|
|
d91ebeee3a | ||
|
|
b9c5623687 | ||
|
|
34b4096482 | ||
|
|
bc75865a5e | ||
|
|
c987cb1ef7 | ||
|
|
d93f7830de | ||
|
|
61a2da10ba | ||
|
|
9e39150009 | ||
|
|
653b81cc48 | ||
|
|
e68e41a939 | ||
|
|
d0448a5b11 | ||
|
|
daec83c4a5 | ||
|
|
6aa11249c5 | ||
|
|
9a56985b3a | ||
|
|
fff04347fa | ||
|
|
5a5ad1e108 | ||
|
|
3c233d1cb1 | ||
|
|
c44583772c | ||
|
|
29e9593179 | ||
|
|
318bdcb1f2 | ||
|
|
c3489fbc1e | ||
|
|
91db00a173 | ||
|
|
a3533dbc02 | ||
|
|
f1c504e81a | ||
|
|
178215d980 | ||
|
|
cbd527316e | ||
|
|
3580df9117 | ||
|
|
11bdbba286 | ||
|
|
4ed22190d6 | ||
|
|
06ef86a9d6 | ||
|
|
3d73578063 | ||
|
|
07caa54631 | ||
|
|
023eeb9ea8 | ||
|
|
2431a001b1 | ||
|
|
e83eeabf9c | ||
|
|
9c5b83dc22 | ||
|
|
9d2b14afef | ||
|
|
63173cdce6 | ||
|
|
922a944881 | ||
|
|
53c7ddf9d4 | ||
|
|
a50bda5344 | ||
|
|
e8c8ab87aa | ||
|
|
1c6904f074 | ||
|
|
225fc69e70 | ||
|
|
546077459f | ||
|
|
bdc6c3b289 | ||
|
|
bbf1dc862c | ||
|
|
c841ac4a93 | ||
|
|
bece2eb564 | ||
|
|
735e36d6e5 | ||
|
|
0a19b2a6cc | ||
|
|
7ea260b986 | ||
|
|
cdc182191b | ||
|
|
45be0748aa | ||
|
|
1f970cbb36 | ||
|
|
4aee1b0a92 | ||
|
|
079d1030ae | ||
|
|
ddf44a8c1d | ||
|
|
f94f678661 | ||
|
|
9816c34701 | ||
|
|
b959b15c71 | ||
|
|
c9ac0daed9 | ||
|
|
65684f2952 | ||
|
|
509bd97741 | ||
|
|
83db4dd951 | ||
|
|
a730404935 | ||
|
|
f51e5f1859 | ||
|
|
e8204fc41e | ||
|
|
304726debf | ||
|
|
d8ecb94dd9 | ||
|
|
573f9efcaf | ||
|
|
985f70c3c9 | ||
|
|
68d5bc36d6 | ||
|
|
6b931497ab | ||
|
|
4bbedc8ef6 | ||
|
|
7f2de53af9 | ||
|
|
48a4fb470a | ||
|
|
c67d3a3a80 | ||
|
|
6a5026e907 | ||
|
|
38716facba | ||
|
|
86f0ae5739 | ||
|
|
fea5ab34c0 | ||
|
|
789ab008f6 | ||
|
|
7f525ebaf0 | ||
|
|
4fd7650726 | ||
|
|
66c01d55b9 | ||
|
|
54bb49dfa7 | ||
|
|
c065245e00 | ||
|
|
51697a54f4 | ||
|
|
00123e0f94 | ||
|
|
8c840404e0 | ||
|
|
c5d7e5369d | ||
|
|
8750bbc22a | ||
|
|
680b9d5c20 | ||
|
|
23dee8bd44 | ||
|
|
6c1b402d2d | ||
|
|
c6e78f9cb9 | ||
|
|
7402925512 | ||
|
|
5d5f32b55e | ||
|
|
c8cb47da63 | ||
|
|
66d666192a | ||
|
|
2a815e54db | ||
|
|
367844a86c | ||
|
|
910b9194ac | ||
|
|
eb196a237f | ||
|
|
71038a9f88 | ||
|
|
a6ba17ee00 | ||
|
|
9deb120446 | ||
|
|
8df1dbe0fb | ||
|
|
e4fbe5670f | ||
|
|
e0f6b8c2dc | ||
|
|
32b2137b87 | ||
|
|
dc46477c15 | ||
|
|
d6f1c82a08 | ||
|
|
267cb7472c | ||
|
|
6d04cac38b | ||
|
|
0331804a85 | ||
|
|
11eccbc39b | ||
|
|
80d596a721 | ||
|
|
637fde799e | ||
|
|
9a198b35b1 | ||
|
|
3476c56eb6 | ||
|
|
d9e1c1211c | ||
|
|
9fab42a9e7 | ||
|
|
d69327e301 | ||
|
|
2566641b5f | ||
|
|
fea083035f | ||
|
|
938ae62905 | ||
|
|
8eec52939c | ||
|
|
151a2ed01f | ||
|
|
3aa6daf97c | ||
|
|
c3c6eb5719 | ||
|
|
4fde95eab7 | ||
|
|
3d4360a10a | ||
|
|
64187fea3f | ||
|
|
0c187b6ff9 | ||
|
|
71c8bc1499 | ||
|
|
d0d5c2a101 | ||
|
|
95dddd9448 | ||
|
|
9ed80d3b59 | ||
|
|
01a49de373 | ||
|
|
2e2ad0a1f2 | ||
|
|
5356e2304c | ||
|
|
0d1d2460a0 | ||
|
|
f88ac6b4c4 | ||
|
|
9d3d8543a5 | ||
|
|
ea819bfa42 | ||
|
|
618fe0fb01 | ||
|
|
43ba7d47c5 | ||
|
|
e3e01587ab | ||
|
|
f36ca34055 | ||
|
|
0ffc6d7efe | ||
|
|
ec89828c67 | ||
|
|
18c0d3218d | ||
|
|
f867ac7efd | ||
|
|
fc7655fd76 | ||
|
|
0c09d40654 | ||
|
|
758d578ad2 | ||
|
|
318b4146a9 | ||
|
|
ea4dac65e1 | ||
|
|
b27f0ec6ec | ||
|
|
f5e8ba4082 | ||
|
|
816e26f517 | ||
|
|
58d6d52747 | ||
|
|
ccd71710ce | ||
|
|
e103c87d10 | ||
|
|
e515908f9b | ||
|
|
eca0c6ea46 | ||
|
|
1229c1bfa2 | ||
|
|
f678477c88 | ||
|
|
0adc9e71e5 | ||
|
|
bc1596f8d3 | ||
|
|
4a754c0021 | ||
|
|
2c382fda00 | ||
|
|
45159b186f | ||
|
|
00274567cf | ||
|
|
42c2c91f03 | ||
|
|
9c26716e7c | ||
|
|
c8a5560a67 | ||
|
|
ad707ec14d | ||
|
|
b6c0962ff3 | ||
|
|
86e66984d4 | ||
|
|
04d646ed8c | ||
|
|
0f83a70b54 | ||
|
|
6b6bf9d9da | ||
|
|
4c1432a535 | ||
|
|
bab788d4cb | ||
|
|
fab683f5e1 | ||
|
|
29c9f59762 | ||
|
|
c29a22c576 | ||
|
|
5568c2fd76 | ||
|
|
5c231514a5 | ||
|
|
93abffaaaa | ||
|
|
a9c801c077 | ||
|
|
2d35f77740 | ||
|
|
529c784ee2 | ||
|
|
fdd686b038 | ||
|
|
36d629b29a | ||
|
|
59335786df | ||
|
|
0af76517e1 | ||
|
|
674d937104 | ||
|
|
a038317c6e | ||
|
|
5fe12dcde7 | ||
|
|
f00eb2147d | ||
|
|
76238d7d7e | ||
|
|
c53be4b5f9 | ||
|
|
8b320e9bc9 | ||
|
|
5757049e74 | ||
|
|
d196551756 | ||
|
|
d7223f6790 | ||
|
|
a50b58d48e | ||
|
|
a0db57bdf2 | ||
|
|
3dfa5487ee | ||
|
|
bddbe600ce | ||
|
|
3073926d73 | ||
|
|
49e9066334 | ||
|
|
372ed1de58 | ||
|
|
dbb867e0ab | ||
|
|
adbd88c411 | ||
|
|
99b3d24366 | ||
|
|
6f69af3945 | ||
|
|
c6e38f2003 | ||
|
|
e0f4ed946d | ||
|
|
465af108aa | ||
|
|
bf152a3a71 | ||
|
|
64c9b97eb9 | ||
|
|
c42ca0f097 | ||
|
|
8c6d013341 | ||
|
|
398fee2d97 | ||
|
|
33246c2a1f | ||
|
|
b102fed9fe | ||
|
|
9c069296ed | ||
|
|
9f94541b9e | ||
|
|
7a367d24ab | ||
|
|
4964bca341 | ||
|
|
22b167981b | ||
|
|
80d9087084 | ||
|
|
d6630ef5bf | ||
|
|
5e3bc3ff15 | ||
|
|
3d09d82abd | ||
|
|
22715dab95 | ||
|
|
ace8537650 | ||
|
|
d7c6bf59ef | ||
|
|
c9cd4ee38a | ||
|
|
633456ada0 | ||
|
|
7fbaf7af70 | ||
|
|
e90d7d61d9 | ||
|
|
bda6fc7978 | ||
|
|
8288e75445 | ||
|
|
6ace71f8db | ||
|
|
a4aabb5bbe | ||
|
|
d90a0d69b2 | ||
|
|
c17d83ae6d | ||
|
|
317ffc4d99 | ||
|
|
bc6c387db3 | ||
|
|
d9053db2e3 | ||
|
|
d7cfda2521 | ||
|
|
a5aa630b74 | ||
|
|
ce1691e1ce | ||
|
|
a3a25fe7c6 | ||
|
|
d4a3886530 | ||
|
|
927644fb10 | ||
|
|
d67a922a74 | ||
|
|
84a8e6ca19 | ||
|
|
858ad55a35 | ||
|
|
bfc4ff39fb | ||
|
|
7603d60ea0 | ||
|
|
8078e1c54f | ||
|
|
59c9d758e1 | ||
|
|
7ea0fbd66d | ||
|
|
5f11f7d6e3 | ||
|
|
5879c99995 | ||
|
|
4356111e0c | ||
|
|
f2001fbc82 | ||
|
|
906b6ed4c7 | ||
|
|
32f98b6d5a | ||
|
|
b6702be558 | ||
|
|
69db61c7b6 | ||
|
|
da10188c6b | ||
|
|
5593210cc6 | ||
|
|
8abd486fcd | ||
|
|
051dbb50b1 | ||
|
|
30e6e6908c | ||
|
|
be2e8f14cf | ||
|
|
56f0ff64b9 | ||
|
|
8a7f0c6533 | ||
|
|
8c0eb970d3 | ||
|
|
5e234dc408 | ||
|
|
26ef85ce6f | ||
|
|
6d287f6678 | ||
|
|
15eddd21d5 | ||
|
|
29722998e4 | ||
|
|
faa5bc7cd8 | ||
|
|
eb2c3d8560 | ||
|
|
0c91f46aeb | ||
|
|
7d16cb2017 | ||
|
|
bdb171c4e6 | ||
|
|
d7ebfb1f41 | ||
|
|
c9d554d184 | ||
|
|
e0974fffbe | ||
|
|
cc63764eef | ||
|
|
687fc0d495 | ||
|
|
ce4e88c51c | ||
|
|
42a77a9439 | ||
|
|
bbab8d9b75 | ||
|
|
b1eae7045b | ||
|
|
a78eed9c5c | ||
|
|
a9fefae642 | ||
|
|
f6ad852a44 | ||
|
|
53610b53ca | ||
|
|
e1f20e0796 | ||
|
|
ab8ced4aed | ||
|
|
0662f62cd1 | ||
|
|
5ed6ee1d2a | ||
|
|
99769da035 | ||
|
|
75bf6e0e6c | ||
|
|
aec3e59aca | ||
|
|
1141208407 | ||
|
|
a9fe1f53b1 | ||
|
|
7f27325ce1 | ||
|
|
4c89bda4b9 | ||
|
|
bd9a0df52b | ||
|
|
eba8986f18 | ||
|
|
95c0bcdb75 | ||
|
|
4b8ca2e5e1 | ||
|
|
f0d6316c20 | ||
|
|
ae35a4d7e6 | ||
|
|
4e05759c3c | ||
|
|
ba9faa8bc6 | ||
|
|
afbfa20fd9 | ||
|
|
ac7628ce68 | ||
|
|
dd6833d322 | ||
|
|
a5e13794e8 | ||
|
|
16d055abc0 | ||
|
|
83744777c5 | ||
|
|
ccc5110e8e | ||
|
|
ce702fd1e3 | ||
|
|
a44eca0f91 | ||
|
|
8bd0c23e19 | ||
|
|
061ac49670 | ||
|
|
027f5f260c | ||
|
|
5f16685b64 | ||
|
|
6710a52950 | ||
|
|
de16bfad01 | ||
|
|
b01c2e4338 | ||
|
|
6ae4468aa2 | ||
|
|
48686e865c | ||
|
|
a885be625e | ||
|
|
a1d8f34720 | ||
|
|
b2f1fd00b1 | ||
|
|
442a51abc1 | ||
|
|
9552e877ce | ||
|
|
34dd3d1c4e | ||
|
|
9e07fa1db3 | ||
|
|
990c6dad90 | ||
|
|
99dc2af42a | ||
|
|
f32808a36d | ||
|
|
ca5470a351 | ||
|
|
34b132735d | ||
|
|
0f31f057df | ||
|
|
65d32f7aec | ||
|
|
fcc1314f17 | ||
|
|
9981ce2d23 | ||
|
|
f1f2ea78be | ||
|
|
d1f9c77571 | ||
|
|
19914586ae | ||
|
|
e7f19e72a5 | ||
|
|
35220a1026 | ||
|
|
b9812a4f98 | ||
|
|
74b078c926 | ||
|
|
44dc1f7b16 | ||
|
|
cdf0bc81e1 | ||
|
|
5b2b2d4059 | ||
|
|
b3b0c0b3aa | ||
|
|
4f93628667 | ||
|
|
8dde322c04 | ||
|
|
47ee421913 | ||
|
|
0355e3ed46 | ||
|
|
eedafa7011 | ||
|
|
aee49322b7 | ||
|
|
96a49f2b11 | ||
|
|
131aabc76a | ||
|
|
e42afe8d47 | ||
|
|
69243b7cd0 | ||
|
|
12757eb4db | ||
|
|
945a69ba70 | ||
|
|
9aa8431432 | ||
|
|
a499002426 | ||
|
|
4d5e2481b0 | ||
|
|
2248b61d03 | ||
|
|
419715bb2a | ||
|
|
f5c2e73098 | ||
|
|
197402dcb7 | ||
|
|
33fd4aa9f3 | ||
|
|
9b263c883b | ||
|
|
06574a201a | ||
|
|
fbdb51d847 | ||
|
|
47c9b99931 | ||
|
|
bb9f28dd5c | ||
|
|
0f2f55e436 | ||
|
|
6c9528cf19 | ||
|
|
91b9055039 | ||
|
|
564ff2e178 | ||
|
|
2a03e71312 | ||
|
|
0dbcc4ab2b | ||
|
|
f19b61f1f2 | ||
|
|
9a1c76c236 | ||
|
|
7c07499e44 | ||
|
|
8a6253621b | ||
|
|
5bc14dd37a | ||
|
|
b11e8fcb3a | ||
|
|
df0a87c935 | ||
|
|
431cf7de74 | ||
|
|
87049b5170 | ||
|
|
c24d89c8ab | ||
|
|
e8c46b676f | ||
|
|
0880b2f3f9 | ||
|
|
1d1ad6fa57 | ||
|
|
6e87f82131 | ||
|
|
9549159a58 | ||
|
|
e370bedc09 | ||
|
|
5740882d1c | ||
|
|
63166e5cd1 | ||
|
|
6ba6a7929d | ||
|
|
e0a596d02a | ||
|
|
9b7ebea827 | ||
|
|
0ad4a47c36 | ||
|
|
1ac59dff86 | ||
|
|
bafe032bb9 | ||
|
|
003f4da9de | ||
|
|
d77e1c3d91 | ||
|
|
d4b3f5eaa8 | ||
|
|
8a78867961 | ||
|
|
d9266b3c9c | ||
|
|
0801069f72 | ||
|
|
e92afac0de | ||
|
|
d1fd4dcf44 | ||
|
|
43c31405b8 | ||
|
|
4e4d0bc85d | ||
|
|
96b0ec45d2 | ||
|
|
8c02ce14ac | ||
|
|
419c704b23 | ||
|
|
9dedc1db68 | ||
|
|
f11ee84517 | ||
|
|
dfa978afe0 | ||
|
|
4e6658ad70 | ||
|
|
ef5988a851 | ||
|
|
5d6c5b5f79 | ||
|
|
80e4475f65 | ||
|
|
84cf39df4d | ||
|
|
d44bf55a87 | ||
|
|
ad273cf1b1 | ||
|
|
a3d2d3f1d5 | ||
|
|
7ca4ddcb88 | ||
|
|
9a3461084c | ||
|
|
09df6fa73d | ||
|
|
be4ed41ca6 | ||
|
|
e2b0c935e0 | ||
|
|
e4fac71987 | ||
|
|
20825c148f | ||
|
|
5476fa8d09 | ||
|
|
80c77fc69a | ||
|
|
621bc3dcfd | ||
|
|
1ed0ff377a | ||
|
|
426d437e6d | ||
|
|
6c0dcbbcbb | ||
|
|
4ade064266 | ||
|
|
1ad87920d0 | ||
|
|
b784900fda | ||
|
|
acba2f5c1e | ||
|
|
3bccbd0ab2 | ||
|
|
327661bfdd | ||
|
|
ed393ea560 | ||
|
|
3fbf5bc906 | ||
|
|
b7efcf87cf | ||
|
|
1aea9f3cfe | ||
|
|
edd6d940b6 | ||
|
|
09f7557e1f | ||
|
|
2e954490ec | ||
|
|
f597a3f116 | ||
|
|
6cb3709655 | ||
|
|
ab21d97029 | ||
|
|
2dfda6c0ca | ||
|
|
59896d2323 | ||
|
|
da611012da | ||
|
|
1ba362ad11 | ||
|
|
c510831f59 | ||
|
|
4e24ba7922 | ||
|
|
407b3625d7 | ||
|
|
d6c45aaf6b | ||
|
|
115a47a5df | ||
|
|
7582a76d1f | ||
|
|
5745fea9a1 | ||
|
|
1ee0df09eb | ||
|
|
e72349a69f | ||
|
|
ce5aeb2d98 | ||
|
|
a19b796a02 | ||
|
|
cc4ee3735c | ||
|
|
a32f5f5bcf | ||
|
|
d9840bef52 | ||
|
|
a8b2068029 | ||
|
|
c9addaf02c | ||
|
|
0282dae582 | ||
|
|
228a4b2840 | ||
|
|
c160867765 | ||
|
|
d20f27b610 | ||
|
|
3a41f1e00e | ||
|
|
90cb25b74f | ||
|
|
fa3137eb55 | ||
|
|
18ed060c67 | ||
|
|
761ae595c2 | ||
|
|
0aa476e757 | ||
|
|
9c69774d35 | ||
|
|
081cd4b503 | ||
|
|
cd1a36cc18 | ||
|
|
6109b62eb7 | ||
|
|
a5469c0996 | ||
|
|
f39cddaa5e | ||
|
|
1b3fa7fb43 | ||
|
|
d87e0f8267 | ||
|
|
3590d1ebbc | ||
|
|
6fae151c8e | ||
|
|
92ee57baf8 | ||
|
|
b5098d5682 | ||
|
|
a4963435d7 | ||
|
|
25972f0382 | ||
|
|
708b08e701 | ||
|
|
f69aa1d232 | ||
|
|
bdd53bbe24 | ||
|
|
b20e768cd1 | ||
|
|
4de732a369 | ||
|
|
f87c8445f9 | ||
|
|
8d6d4ce0c5 | ||
|
|
5238689baa | ||
|
|
6f39e692ef | ||
|
|
e873709443 | ||
|
|
8d4a65a002 | ||
|
|
32a8fed625 | ||
|
|
1fccc25873 | ||
|
|
0621845e5a | ||
|
|
18391881d7 | ||
|
|
0e1d5cc81d | ||
|
|
78a83238f7 | ||
|
|
05f21f2d02 | ||
|
|
bcb30f3c82 | ||
|
|
470da8f975 | ||
|
|
8c83e828bf | ||
|
|
a91d190d85 | ||
|
|
e9e7371213 | ||
|
|
9349900ea5 | ||
|
|
0ae9be9c63 | ||
|
|
953bea6962 | ||
|
|
1f676c431a | ||
|
|
f953a069cb | ||
|
|
442206dad8 | ||
|
|
8dd3ef2a63 | ||
|
|
44110feaaf | ||
|
|
a42c1845d6 | ||
|
|
d233f64a68 | ||
|
|
055d3806d8 | ||
|
|
b4f6bd7248 | ||
|
|
fb49b2f46a | ||
|
|
f1a14830b7 | ||
|
|
b849633110 | ||
|
|
f656cba56b | ||
|
|
6872d42f2e | ||
|
|
93e376bdbf | ||
|
|
efc82d01a7 | ||
|
|
057376882d | ||
|
|
d92640c49b | ||
|
|
bc25663db4 | ||
|
|
d9f99e0d27 | ||
|
|
0c549bf23b | ||
|
|
4de87fd358 | ||
|
|
01b77ccb55 | ||
|
|
e2aec83de2 | ||
|
|
d5c8b296a7 | ||
|
|
f2c944baa9 | ||
|
|
7070c5caa7 | ||
|
|
f2b7cfd40b | ||
|
|
79a02e5594 | ||
|
|
a88b1979d8 | ||
|
|
c1f604f1b6 | ||
|
|
cb29b38e1c | ||
|
|
6bee9b20dd | ||
|
|
6e35907f46 | ||
|
|
44d67151ee | ||
|
|
2f98f6a486 | ||
|
|
53085b01b6 | ||
|
|
424577ca4d | ||
|
|
636df6ebd6 | ||
|
|
e28c730c21 | ||
|
|
3d457bb681 | ||
|
|
fdd6ab0063 | ||
|
|
13a81b8374 | ||
|
|
11fc9d15a2 | ||
|
|
bf82904e66 | ||
|
|
3c58396c1f | ||
|
|
6291fd27b0 | ||
|
|
59f1fda131 | ||
|
|
8a8f352bad | ||
|
|
20ea9e2620 | ||
|
|
05f0002ef4 | ||
|
|
3507434e7a | ||
|
|
7c762b4455 | ||
|
|
6220b6af6f | ||
|
|
63f054493a | ||
|
|
cd35d00e06 | ||
|
|
0bc5a24595 | ||
|
|
ce08b0f81e | ||
|
|
5aa90274dc | ||
|
|
4b40604a27 | ||
|
|
adfc15efd8 | ||
|
|
1e43fc7283 | ||
|
|
a2307d9c21 | ||
|
|
2bec0f1178 | ||
|
|
c19870444e | ||
|
|
d423ad6c9e | ||
|
|
9c96fbb604 | ||
|
|
d6caeb585e | ||
|
|
e23f8b4a96 | ||
|
|
fbeca8f442 | ||
|
|
aebbfaac83 | ||
|
|
e26220ef93 | ||
|
|
ed93fc3005 | ||
|
|
ac64bd9435 | ||
|
|
6a548899fa | ||
|
|
ddea85d9f0 | ||
|
|
e8a725fb05 | ||
|
|
09c32f171d | ||
|
|
457db21751 | ||
|
|
e06393a22f | ||
|
|
e182827509 | ||
|
|
234b5ecfa6 | ||
|
|
b7b8d37ecd | ||
|
|
5d19466fdc | ||
|
|
7d46feb1a5 | ||
|
|
7169fdc8ae | ||
|
|
db9e0659f3 | ||
|
|
00057788ab | ||
|
|
117ab9e31a | ||
|
|
404430e4b2 | ||
|
|
0d53fa91ff | ||
|
|
b3037f0818 | ||
|
|
9fe8b762b6 | ||
|
|
0a2751b220 | ||
|
|
220b829279 | ||
|
|
c507771cff | ||
|
|
09daa2f027 | ||
|
|
4ea5168e9a | ||
|
|
2fdd554751 | ||
|
|
b96e1dcf4d | ||
|
|
80b000ed32 | ||
|
|
f0c553b0b7 | ||
|
|
f7b8f2f76f | ||
|
|
04efcf3959 | ||
|
|
3a02f66d9e | ||
|
|
69c830c520 | ||
|
|
49fe5fdb70 | ||
|
|
15da731cfe | ||
|
|
3e1b84029f | ||
|
|
0a427de273 | ||
|
|
b4cd770c8d | ||
|
|
3b697edd09 | ||
|
|
9f7ec8be64 | ||
|
|
7f23cd4676 | ||
|
|
82d1bed46b | ||
|
|
e9df74ec3c | ||
|
|
d34959287d | ||
|
|
ee5cfc3d78 | ||
|
|
ec4eee58a2 | ||
|
|
0ae92afc09 | ||
|
|
aebbdf57be | ||
|
|
16b3ca1f40 | ||
|
|
f8d882c046 | ||
|
|
0a5d923592 | ||
|
|
f330d2eb7b | ||
|
|
5c9e52a807 | ||
|
|
f5c76ce3c5 | ||
|
|
ee4aae2019 | ||
|
|
660415ae97 | ||
|
|
d36a9fda9d | ||
|
|
d9724ee7f3 | ||
|
|
a1c2f554d4 | ||
|
|
77f17c7dec | ||
|
|
e8737ec50e | ||
|
|
045e1576b6 | ||
|
|
b1c9f36a30 | ||
|
|
1b4e3a449d | ||
|
|
9ebbdaba28 | ||
|
|
779ab98762 | ||
|
|
105d0a85f9 | ||
|
|
a4281288ee | ||
|
|
30f40b601f | ||
|
|
a3a9850e13 | ||
|
|
0027968e99 | ||
|
|
ea8d560f3f | ||
|
|
95cf5ed303 | ||
|
|
7e7d7270ab | ||
|
|
a69667337d | ||
|
|
a4f1726ab1 | ||
|
|
3e1b3637c9 | ||
|
|
8627494972 | ||
|
|
be71983047 | ||
|
|
9274844548 | ||
|
|
075b0939e9 | ||
|
|
1cf0ecf9d6 | ||
|
|
b07798f5a2 | ||
|
|
ecb09e4ca4 | ||
|
|
f266655d24 | ||
|
|
a43cf64fb3 | ||
|
|
be61cb908f | ||
|
|
afc84a0dc0 | ||
|
|
b2f5f69619 | ||
|
|
cd519f021f | ||
|
|
f18dd10f0d | ||
|
|
92e4d9de1b | ||
|
|
e64284f5ab | ||
|
|
683f4e1c97 | ||
|
|
b9566cb180 | ||
|
|
e82ee56b7f | ||
|
|
2c1c50c72b | ||
|
|
f290ca2ba6 | ||
|
|
c9d11b3ab8 | ||
|
|
411695d0dd | ||
|
|
ea62d03142 | ||
|
|
c2aa222bbd | ||
|
|
872020e729 | ||
|
|
951c3fe16c | ||
|
|
85e8b17171 | ||
|
|
b2cba25a1e | ||
|
|
2cc01d4101 | ||
|
|
dbbe6de544 | ||
|
|
18be460bee | ||
|
|
c1c7312f2c | ||
|
|
342337c13e | ||
|
|
0849b359ce | ||
|
|
2eeec329b2 | ||
|
|
ef10fd987c | ||
|
|
b52105e798 | ||
|
|
fe15760aab | ||
|
|
3c3730db44 | ||
|
|
fa118d93f8 | ||
|
|
04507ee863 | ||
|
|
2c25af3694 | ||
|
|
87d7668768 | ||
|
|
d17a306f7c | ||
|
|
6a88d899b7 | ||
|
|
2a42bcfbef | ||
|
|
af8765734c | ||
|
|
3a3c79c3cc | ||
|
|
2cafbc7706 | ||
|
|
3860d1c862 | ||
|
|
5818c3404f | ||
|
|
87511da0c4 | ||
|
|
ebceea3491 | ||
|
|
fe1c11fc5d | ||
|
|
64178ef88d | ||
|
|
7c95d2d8b8 | ||
|
|
7144f1a2af | ||
|
|
70a27f2aca | ||
|
|
7a90b6c943 | ||
|
|
b59c0c790c | ||
|
|
6da8784102 | ||
|
|
c2c6b87b2c | ||
|
|
158e56abdf | ||
|
|
67fc201e83 | ||
|
|
d66f22ddc8 | ||
|
|
aed0485ba7 | ||
|
|
bd65007851 | ||
|
|
aa2f90d048 | ||
|
|
d343ff9d07 | ||
|
|
fe8fa90625 | ||
|
|
cc23df6821 | ||
|
|
d6859f5543 | ||
|
|
b6139514f5 | ||
|
|
9e48c23225 | ||
|
|
5cf93b6111 | ||
|
|
a3aa610d57 | ||
|
|
ce69581a3a | ||
|
|
523067ad58 | ||
|
|
e67bab471c | ||
|
|
10fe66fcb8 | ||
|
|
1639dcd4ee | ||
|
|
b8bb3abac7 | ||
|
|
75a58c6975 | ||
|
|
eb9da8210e | ||
|
|
04c69ea9e0 | ||
|
|
02a5b45e10 | ||
|
|
5835a372f5 | ||
|
|
590a13688d | ||
|
|
45dede8aee | ||
|
|
e77c9fd327 | ||
|
|
d694c5d9f1 | ||
|
|
30b6b061e6 | ||
|
|
a65ad893eb | ||
|
|
77fd92d2b0 | ||
|
|
8c759fd94d | ||
|
|
536cccbfaf | ||
|
|
64568ce2cc | ||
|
|
22ca68e04a | ||
|
|
63fd4c81b4 | ||
|
|
c77d13f5db | ||
|
|
63fb591b46 | ||
|
|
f93355e6c4 | ||
|
|
53e988e8d2 | ||
|
|
a2e1cd9840 | ||
|
|
9b0165b291 | ||
|
|
91a7c88ea1 | ||
|
|
384c6a842e | ||
|
|
6590b70db6 | ||
|
|
930fb59755 | ||
|
|
8851e54266 | ||
|
|
e597ab7d3f | ||
|
|
e1ed738ec9 | ||
|
|
5811ebfda1 | ||
|
|
c897d78a79 | ||
|
|
9a300dc531 | ||
|
|
68cccdec32 | ||
|
|
bc6e5675e9 | ||
|
|
c08367fdac | ||
|
|
36200c7386 | ||
|
|
2c5577f534 | ||
|
|
b9a11845ef | ||
|
|
bacec6dec2 | ||
|
|
af0cc9988b | ||
|
|
b0aad6405c | ||
|
|
738173fe7c | ||
|
|
b4a127511c | ||
|
|
e8eb8a5468 | ||
|
|
3db8eba92c | ||
|
|
463305a63e | ||
|
|
51f3558b55 | ||
|
|
b56099ad2e | ||
|
|
f3ec7dc196 | ||
|
|
382c976f02 | ||
|
|
5d85fdb7f9 | ||
|
|
314362321d | ||
|
|
a0fd70372f | ||
|
|
47c8f76252 | ||
|
|
7191f8a5ad | ||
|
|
18d02be719 | ||
|
|
40a1a0cbf6 | ||
|
|
2f61dfd9bd | ||
|
|
a2394a506c | ||
|
|
eabf202755 | ||
|
|
738bee9ed5 | ||
|
|
16377cabfa | ||
|
|
c8165c896e | ||
|
|
54103be0f8 | ||
|
|
7432f75f2f | ||
|
|
55c374c07f | ||
|
|
f476c2c907 | ||
|
|
897d596174 | ||
|
|
2859496156 | ||
|
|
2c420ac336 | ||
|
|
2e2a16bbf4 | ||
|
|
d3484d6283 | ||
|
|
9990f54edd | ||
|
|
b234a53b73 | ||
|
|
8916cb5250 | ||
|
|
a178858b85 | ||
|
|
00ce32fffd | ||
|
|
898f1bd563 | ||
|
|
c0cd81bf6f | ||
|
|
41d01f0555 | ||
|
|
b333a87f04 | ||
|
|
00d139d553 | ||
|
|
f4f1bb4b54 | ||
|
|
e512d27784 | ||
|
|
6cdeb2516b | ||
|
|
6d64156db4 | ||
|
|
a66b8a576c | ||
|
|
839e1fe9d1 | ||
|
|
c64653cab8 | ||
|
|
3df6465764 | ||
|
|
b689a18a01 | ||
|
|
20886dd1d5 | ||
|
|
0e892fbb55 | ||
|
|
6290b9ae91 | ||
|
|
753b1d5b2b | ||
|
|
97a81b7816 | ||
|
|
1a0412a984 | ||
|
|
0dde0217f9 | ||
|
|
cc0187291e | ||
|
|
90f5c1ef8a | ||
|
|
b3e9e8833c | ||
|
|
772701a549 | ||
|
|
bef00f18e1 | ||
|
|
72cf428bd9 | ||
|
|
e64486079d | ||
|
|
9a295d674f | ||
|
|
af8127ef2c | ||
|
|
0d63c23493 | ||
|
|
4c2a5a76ce | ||
|
|
99d78549c2 | ||
|
|
ca1e6957a8 | ||
|
|
25941d2050 | ||
|
|
0d361555f3 | ||
|
|
d50db7b16c | ||
|
|
27c2c88e26 | ||
|
|
46ecdf430e | ||
|
|
0e22dcbcdb | ||
|
|
a0f20f696e | ||
|
|
541bc421b7 | ||
|
|
a1018801d4 | ||
|
|
2a3d8dc5b2 | ||
|
|
b6c206c299 |
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: ['https://github.com/XCharts-Team/XCharts/blob/master/Documentation~/zh/img/support_alipay.png','https://github.com/XCharts-Team/XCharts/blob/master/Documentation~/zh/img/support_wechat.png']
|
||||
14
.gitignore
vendored
14
.gitignore
vendored
@@ -1,20 +1,6 @@
|
||||
/.vs
|
||||
/.vscode
|
||||
.vs
|
||||
/XCharts-ios
|
||||
/Library
|
||||
/Temp
|
||||
/Logs
|
||||
/UnityPackageManager
|
||||
/Assets/Res
|
||||
/Assets/Res.meta
|
||||
/Assets/Package
|
||||
/Assets/Package.meta
|
||||
|
||||
/Assets/XChartsDemo/demo_test.unity
|
||||
/Assets/XChartsDemo/demo_test.unity.meta
|
||||
/Assets/XChartsDemo/empty.unity
|
||||
/Assets/XChartsDemo/empty.unity.meta
|
||||
|
||||
*.sln
|
||||
*.csproj
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e77b3cfd5a4d2646964841d2b14dcb2
|
||||
folderAsset: yes
|
||||
timeCreated: 1536101212
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,184 +0,0 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.03.14) 发布`v1.3.1`版本
|
||||
* (2020.03.14) 修复`LineChart`开启`ingore`时部分数据可能绘制异常的问题
|
||||
* (2020.03.13) 修复`LineChart`的`label`偏移显示异常的问题
|
||||
* (2020.03.11) 发布`v1.3.0`版本
|
||||
* (2020.03.11) 优化`LineChart`的`label`偏移显示
|
||||
* (2020.03.11) 优化清空并重新添加数据后的自动刷新问题
|
||||
* (2020.03.10) 增加`LineChart`的普通折线图可通过`ignore`参数设置忽略数据的支持
|
||||
* (2020.03.09) 增加`BarChart`可通过`ItemStyle`配置边框的支持
|
||||
* (2020.03.08) 增加`RingChart`环形图
|
||||
* (2020.03.05) 调整`Serie`的`arcShaped`参数重命名为`roundCap`
|
||||
* (2020.03.05) 增加运行时和非运行时参数变更自动刷新图表
|
||||
* (2020.02.26) 重构`Legend`图例,改变样式,增加自定义图标等设置
|
||||
* (2020.02.23) 增加`BaseChart.AnimationFadeOut()`渐出动画,重构动画系统
|
||||
* (2020.02.13) 增加`BaseChart.RefreshTooltip()`接口立即重新初始化`Tooltip`组件
|
||||
* (2020.02.13) 增加`Tooltip`的`textStyle`参数配置内容文本样式,去掉`fontSize`和`fontStyle`参数
|
||||
* (2020.02.13) 增加`TextStyle`的`lineSpacing`参数配置行间距
|
||||
* (2020.02.11) 增加`Radar`的`splitLine`参数配置分割线,去掉`lineStyle`参数
|
||||
* (2020.02.11) 增加`Tooltip`的`backgroundImage`参数配置背景图
|
||||
* (2020.02.11) 增加`Tooltip`的`paddingLeftRight`和`paddingTopBottom`参数配置文字和边框的间距
|
||||
* (2020.02.11) 增加`Tooltip`的`lineStyle`参数配置指示线样式
|
||||
* (2020.02.11) 增加`Axis`的`splitLine`参数控制分割线,去掉`showSplitLine`和`splitLineType`参数(更新时需要重新设置分割线相关设置)
|
||||
* (2020.02.10) 增加`Serie`的`clip`参数控制是否超出坐标系外裁剪(只适用于折线图、柱状图、散点图)
|
||||
* (2020.02.08) 增加`SerieSymbol`的`gap`参数控制图形标记的外留白距离
|
||||
* (2020.01.26) 增加`TextLimit`组件可以设置`AxisLabel`的文本自适应
|
||||
* (2020.01.20) 优化`Tooltip`设置`itemFormatter`时显示系列颜色
|
||||
* (2020.01.20) 增加`Radar`雷达图在`inspector`配置`areaStyle`的支持
|
||||
* (2020.01.15) 发布`v1.2.0`版本
|
||||
* (2020.01.15) 增加`AxisLabel`格式化为整数的支持(`{value:f0}`)
|
||||
* (2020.01.15) 增加折线图对数轴`Log`的支持
|
||||
* (2020.01.09) 修复当设置`DataZoom`的`minShowNum`时可能异常的问题
|
||||
* (2020.01.08) 修复当设置`AxisLine`的`onZero`时刻度显示异常的问题
|
||||
* (2020.01.08) 增加`Mask`遮罩遮挡支持
|
||||
* (2019.12.21) 增加`Tooltip`的单个数据项和标题的字符串模版格式器
|
||||
* (2019.12.21) 增加`DataZoom`的最小显示数据个数`minShowNum`
|
||||
* (2019.12.20) 增加`Demo40_Radar.cs`雷达图代码操作`Demo`
|
||||
* (2019.12.20) 添加`RadarChart`相关API接口
|
||||
* (2019.12.17) 发布`v1.1.0`版本
|
||||
* (2019.12.16) 修复`Overlay`模式下不显示`Tooltip`的问题
|
||||
* (2019.12.15) 增加`Title`的`TextStyle`支持
|
||||
* (2019.12.11) 修复`Legend`都隐藏时`Value轴`还显示数值的问题
|
||||
* (2019.12.11) 修复`Series->Data->Size`重置为0后设置无效的问题
|
||||
* (2019.12.06) 修复数据过小时`AxisLabel`直接科学计数法显示的问题
|
||||
* (2019.12.04) 优化和完善数据更新`UpdateData`接口
|
||||
* (2019.12.03) 增加圆环饼图的圆角支持,参数:`serie.arcShaped`
|
||||
* (2019.12.03) 增加数据更新动画,参数:`serie.animation.dataChangeEnable`
|
||||
* (2019.11.30) 增加`GaugeChart`仪表盘
|
||||
* (2019.11.22) 修复`BarChart`清空数据重新赋值后`SerieLabel`显示异常的问题
|
||||
* (2019.11.16) 修复`SerieLabel`设置`color`等参数不生效的问题
|
||||
* (2019.11.12) 发布`v1.0.5`版本
|
||||
* (2019.11.12) 修复`2018.3`以下版本打开项目报错的问题
|
||||
* (2019.11.12) 增加`IconStyle`子组件,优化`SerieData`的图标配置
|
||||
* (2019.11.11) 修复`Serie`的图标显示在上层遮挡`Label`的问题
|
||||
* (2019.11.11) 修复饼图当数据过小时视觉引导线会穿透的的问题
|
||||
* (2019.11.09) 修复饼图添加数据时`Label`异常的问题
|
||||
* (2019.11.09) 优化结构,分离为`XCharts`和`XChartsDemo`两部分
|
||||
* (2019.11.05) 发布`v1.0.4`版本
|
||||
* (2019.11.05) 增加`Radar`雷达组件文本样式参数配置支持
|
||||
* (2019.11.04) 修复`Unity2018.3`以下版本代码不兼容的问题
|
||||
* (2019.11.04) 优化`SerieLabel`过多时引起的性能问题
|
||||
* (2019.11.03) 发布`v1.0.3`版本
|
||||
* (2019.11.03) 增加`Editor`快捷添加图表:`Hierarchy`试图下右键`XCharts->LineChart`
|
||||
* (2019.11.02) 优化非配置参数变量命名和访问权限,简化`API`
|
||||
* (2019.10.31) 发布`v1.0.2`版本
|
||||
* (2019.10.31) 修复`prefab`预设制作报错的问题
|
||||
* (2019.10.31) 增加访问主题组件API:`BaseChart.themeInfo`
|
||||
* (2019.10.26) 发布`v1.0.1`版本
|
||||
* (2019.10.26) 修复版本检查功能在非运行时异常的问题
|
||||
* (2019.10.26) 增加科学计数法显示数值的支持(查阅`forceENotation`参数)
|
||||
* (2019.10.26) 增加`Axis`类目轴数据为空时的默认显示支持
|
||||
* (2019.10.26) 增加`Axis`数值轴的最大最小值可设置为小数的支持,优化极小数图表的表现效果
|
||||
* (2019.10.25) 发布`v1.0.0`版本
|
||||
* (2019.10.23) 增加版本检测功能:`Component -> XCharts -> Check For Update`
|
||||
* (2019.10.22) 增加`Package Manager`安装的支持
|
||||
* (2019.10.20) 增加`Demo`首页`BarChart`的代码动态控制效果
|
||||
* (2019.10.18) 增加`Serie`的`barType`参数,可配置`斑马柱状图`
|
||||
* (2019.10.18) 增加`Serie`的`barPercentStack`参数,可配置`百分比堆叠柱状图`
|
||||
* (2019.10.16) 增加`Demo`首页`LineChart`的代码动态控制效果
|
||||
* (2019.10.15) 移除`Pie`组件,相关参数放到`Settings`中配置
|
||||
* (2019.10.15) 增加`Demo`首页,展示代码动态控制效果
|
||||
* (2019.10.14) 增加`RadarChart`、`ScatterChart`和`HeatmapChart`的起始动画效果
|
||||
* (2019.10.14) 增加`SerieData`的`radius`自定义数据项的半径
|
||||
* (2019.10.14) 增加`HeatmapChart`热力图
|
||||
* (2019.10.14) 增加`VisualMap`视觉映射组件
|
||||
* (2019.10.14) 增加`ItemStyle`数据项样式组件
|
||||
* (2019.10.14) 增加`Emphasis`高亮样式组件
|
||||
* (2019.10.10) 增加`Settings`全局参数配置组件,开放更多参数可配置
|
||||
* (2019.10.09) 增加`AreaStyle`的高亮相关参数配置鼠标悬浮时高亮之前区域
|
||||
* (2019.10.09) 优化`DataZoom`组件,增加双指缩放
|
||||
* (2019.10.05) 增加`SerieLabel`的`LineType`给饼图配置不同类型的视觉引导线
|
||||
* (2019.10.02) 增加`ScatterChart`同时对`Scatter`和`Line`的支持,实现折线图和散点图的组合图
|
||||
* (2019.10.01) 重构代码,废弃`Series.series`接口,用`Series.list`代替
|
||||
* (2019.10.01) 增加`customDrawCallback`自定义绘制回调
|
||||
* (2019.10.01) 增加`SmoothDash`平滑虚线的支持
|
||||
* (2019.09.30) 增加`Serie`采样类型`sampleType`的相关配置
|
||||
* (2019.09.29) 增加`SerieSymbol`关于显示间隔的相关配置
|
||||
* (2019.09.29) 重构代码:
|
||||
* `BaseChart`的`sampleDist`删除,`Serie`增加`lineSampleDist`
|
||||
* `BaseChart`的`minShowDataNumber`删除,`Serie`增加`minShow`
|
||||
* `BaseChart`的`maxShowDataNumber`删除,`Serie`增加`maxShow`
|
||||
* `BaseChart`的`maxCacheDataNumber`删除,`Serie`增加`maxCache`
|
||||
* `BaseChart`的`AddSerie()`接口参数调整
|
||||
* `BaseChart`的`UpdateData()`接口参数调整
|
||||
* `Axis`增加`maxCache`
|
||||
* (2019.09.28) 增加`LineChart`和`BarChart`同时对`Line`、`Bar`类型`Serie`的支持,实现折线图和柱状图的组合图
|
||||
* (2019.09.27) 增加`Axis`的`splitNumber`设置为`0`时表示绘制所有类目数据
|
||||
* (2019.09.27) 增加`SampleDist`采样距离的配置,对过密的曲线开启采样,优化绘制效率
|
||||
* (2019.09.27) 增加`XCharts问答`、`XChartsAPI接口`、`XCharts配置项手册`等文档
|
||||
* (2019.09.26) 增加`AnimationReset()`重置初始化动画接口
|
||||
* (2019.09.26) 优化`LineChart`的密集数据的曲线效果
|
||||
* (2019.09.25) 优化`SerieData`的自定义图标不与`SerieLabel`关联,可单独控制是否显示
|
||||
* (2019.09.24) 增加`SerieData`的自定义图标相关配置支持
|
||||
* (2019.09.23) 增加`Formatter`配置`Axis`的`AxisLabel`的格式化输出
|
||||
* (2019.09.23) 增加`Tooltip`的`FontSize`、`FontStyle`配置字体大小和样式
|
||||
* (2019.09.23) 增加`Formatter`配置`SerieLabel`、`Legend`、`Tooltip`的格式化输出
|
||||
* (2019.09.19) 增加`LineArrow`配置带箭头曲线
|
||||
* (2019.09.19) 增加`Tooltip`的`FixedWidth`、`FixedHeight`、`MinWidth`、`MinHeight`设置支持
|
||||
* (2019.09.18) 增加单条堆叠柱状图
|
||||
* (2019.09.18) 增加虚线`Dash`、点线`Dot`、点划线`DashDot`、双点划线`DashDotDot`等类型的折线图支持
|
||||
* (2019.09.17) 增加`AnimationEnabel()`启用或取消起始动画接口
|
||||
* (2019.09.17) 增加`Axis`的`Interval`强制设置坐标轴分割间隔
|
||||
* (2019.09.16) 去掉`Serie`中的旧版本数据兼容,不再支持`xData`和`yData`
|
||||
* (2019.09.06) 增加`Animation`在重新初始化数据时自启动功能
|
||||
* (2019.09.06) 增加`SerieLabel`的`Border`边框相关配置支持
|
||||
* (2019.09.05) 增加`PieChart`的`Animation`初始化动画配置支持
|
||||
* (2019.09.03) 增加`BarChart`的`Animation`初始化动画配置支持
|
||||
* (2019.09.02) 增加`LineChart`的`Animation`初始化动画配置支持
|
||||
* (2019.08.22) 增加`AxisName`的`Offset`偏移配置支持
|
||||
* (2019.08.22) 增加`AxisLine`的`Width`配置支持
|
||||
* (2019.08.20) 增加`SerieLabel`的背景宽高、文字边距、文字旋转的配置
|
||||
* (2019.08.20) 增加`BarChart`的`Label`配置支持
|
||||
* (2019.08.15) 增加`LineChart`的`Label`配置
|
||||
* (2019.08.15) 重构`BarChart`,移除`Bar`组件,相关参数统一放到`Serie`中配置
|
||||
* (2019.08.15) 重构`LineChart`,移除`Line`组件,相关参数统一放到`Serie`中配置
|
||||
* (2019.08.15) 发布`v0.8.3`版本
|
||||
* (2019.08.14) 修复`PieChart`的`Label`无法自动更新的问题
|
||||
* (2019.08.13) 修复`UpdateData`接口无法更新数据的问题
|
||||
* (2019.08.07) 增加`SerieSymbol`的`Color`、`Opacity`配置
|
||||
* (2019.08.07) 发布`v0.8.2`版本
|
||||
* (2019.08.07) 修复区域平滑折线图显示异常的问题
|
||||
* (2019.08.06) 修复`serie`系列数超过调色盘颜色数时获取的颜色异常的问题
|
||||
* (2019.08.06) 修复当`Axis`的`minMaxType`为`Custom`时`max`设置为`100`不生效的问题
|
||||
* (2019.08.04) 发布`v0.8.1`版本
|
||||
* (2019.08.04) 修复从Inspector中修改数据不生效的问题
|
||||
* (2019.08.04) 发布`v0.8.0`版本
|
||||
* (2019.08.04) 优化`RadarChart`雷达图,增加多雷达图支持
|
||||
* (2019.08.01) 增加代码API注释文档,整理代码
|
||||
* (2019.07.29) 增加`Radius`、`Area`两种南丁格尔玫瑰图展示类型
|
||||
* (2019.07.29) 增加`SerieLabel`配置饼图标签,支持`Center`、`Inside`、`Outside`等显示位置
|
||||
* (2019.07.28) 增加`PieChart`多饼图支持
|
||||
* (2019.07.23) 优化`Theme`主题的自定义,切换主题时自定义配置不受影响
|
||||
* (2019.07.22) 增加`EffectScatter`类型的散点图
|
||||
* (2019.07.21) 增加`ScatterChart`散点图
|
||||
* (2019.07.21) 增加`SerieData`支持多维数据配置
|
||||
* (2019.07.20) 增加`Symbol`配置`Serie`标志图形的显示
|
||||
* (2019.07.19) 增加用代码添加动态正弦曲线的示例`Demo11_AddSinCurve`
|
||||
* (2019.07.19) 优化`Legend`的显示和控制
|
||||
* (2019.07.18) 优化抗锯齿,曲线更平滑
|
||||
* (2019.07.18) 增加`Tooltip`指示器类型,优化显示控制
|
||||
* (2019.07.15) 增加`Size`设置图表尺寸
|
||||
* (2019.07.14) 增加`二维数据`支持,XY轴都可以设置为数值轴
|
||||
* (2019.07.13) 增加`双坐标轴`支持,代码改动较大
|
||||
* (2019.07.10) 发布`v0.5.0`版本
|
||||
* (2019.07.09) 增加`AxisLine`配置坐标轴轴线和箭头
|
||||
* (2019.07.03) 增加`AxisLabel`配置坐标轴`刻度标签`
|
||||
* (2019.07.02) 增加`selected`等相关参数配置`PieChart`的选中效果
|
||||
* (2019.06.30) 增加`SplitArea`配置坐标轴`分割区域`
|
||||
* (2019.06.29) 增加`AxisName`配置坐标轴`名称`
|
||||
* (2019.06.20) 增加`AreaAlpha`控制`RadarChart`的`Area`透明度
|
||||
* (2019.06.13) 增加`DataZoom`实现`区域缩放`
|
||||
* (2019.06.01) 增加`stepType`实现`LineChart`的`阶梯线图`
|
||||
* (2019.05.29) 增加`InSameBar`实现`BarChart`的`非堆叠同柱`
|
||||
* (2019.05.29) 增加`crossLabel`控制`Tooltip`的`十字准星指示器`
|
||||
* (2019.05.24) 增加`堆叠区域图`
|
||||
* (2019.05.16) 增加`AxisMinMaxType`控制坐标轴最大最小刻度
|
||||
* (2019.05.15) 完善数据接口
|
||||
* (2019.05.14) 增加X轴`AxisType.Value`模式支持
|
||||
* (2019.05.13) 增加负数数值轴支持
|
||||
* (2019.05.11) 增加自定义`Editor`编辑
|
||||
* (2019.03.21) 增加`Tooltip`
|
||||
* (2018.11.01) 增加`Default`、`Light`、`Dark`三种默认主题
|
||||
* (2018.09.05) 发布`v0.1.0`版本
|
||||
@@ -1,310 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
public class Demo00_CheatSheet : MonoBehaviour
|
||||
{
|
||||
private LineChart chart;
|
||||
private float speed = 100f;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
LoopDemo();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
LoopDemo();
|
||||
}
|
||||
|
||||
void LoopDemo()
|
||||
{
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(CheatSheet());
|
||||
}
|
||||
|
||||
IEnumerator CheatSheet()
|
||||
{
|
||||
StartCoroutine(InitChart());
|
||||
StartCoroutine(ComponentTitle());
|
||||
yield return new WaitForSeconds(2);
|
||||
StartCoroutine(ComponentAxis());
|
||||
yield return new WaitForSeconds(2);
|
||||
StartCoroutine(ComponentGrid());
|
||||
yield return new WaitForSeconds(2);
|
||||
StartCoroutine(ComponentSerie());
|
||||
yield return new WaitForSeconds(4);
|
||||
StartCoroutine(ComponentLegend());
|
||||
yield return new WaitForSeconds(4);
|
||||
StartCoroutine(ComponentTheme());
|
||||
yield return new WaitForSeconds(4);
|
||||
StartCoroutine(ComponentDataZoom());
|
||||
yield return new WaitForSeconds(5);
|
||||
StartCoroutine(ComponentVisualMap());
|
||||
yield return new WaitForSeconds(3);
|
||||
LoopDemo();
|
||||
}
|
||||
|
||||
IEnumerator InitChart()
|
||||
{
|
||||
chart = gameObject.GetComponent<LineChart>();
|
||||
if (chart == null) gameObject.AddComponent<LineChart>();
|
||||
|
||||
chart.title.show = true;
|
||||
chart.title.text = "术语解析-组件";
|
||||
chart.grid.bottom = 30;
|
||||
chart.grid.right = 30;
|
||||
chart.grid.left = 50;
|
||||
chart.grid.top = 80;
|
||||
|
||||
chart.dataZoom.enable = false;
|
||||
chart.visualMap.enable = false;
|
||||
|
||||
chart.RemoveData();
|
||||
|
||||
chart.AddSerie(SerieType.Bar, "Bar");
|
||||
chart.AddSerie(SerieType.Line, "Line");
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
chart.AddXAxisData("x" + (i + 1));
|
||||
chart.AddData(0, Random.Range(10, 100));
|
||||
chart.AddData(1, Random.Range(30, 100));
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
|
||||
IEnumerator ComponentTitle()
|
||||
{
|
||||
chart.title.text = "术语解析 - 组件";
|
||||
chart.title.subText = "Title 标题:可指定主标题和子标题";
|
||||
chart.xAxis0.show = true;
|
||||
chart.yAxis0.show = true;
|
||||
chart.series.list[0].show = false;
|
||||
chart.series.list[1].show = false;
|
||||
chart.legend.show = false;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
chart.title.show = !chart.title.show;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
}
|
||||
chart.title.show = true;
|
||||
chart.RefreshChart();
|
||||
}
|
||||
|
||||
IEnumerator ComponentAxis()
|
||||
{
|
||||
chart.title.subText = "Axis 坐标轴:配置X和Y轴的轴线、刻度、标签等样式外观配置";
|
||||
chart.series.list[0].show = false;
|
||||
chart.series.list[1].show = false;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
chart.xAxis0.show = !chart.xAxis0.show;
|
||||
chart.yAxis0.show = !chart.yAxis0.show;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
}
|
||||
chart.xAxis0.show = true;
|
||||
chart.yAxis0.show = true;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
|
||||
IEnumerator ComponentGrid()
|
||||
{
|
||||
chart.title.subText = "Grid 网格:调整坐标系边距和颜色等";
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
chart.grid.backgroundColor = i % 2 == 0 ? Color.clear : Color.grey;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
}
|
||||
chart.grid.backgroundColor = Color.clear;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
|
||||
IEnumerator ComponentSerie()
|
||||
{
|
||||
chart.title.subText = "Serie 系列:调整坐标系边距和颜色等";
|
||||
chart.series.list[0].show = true;
|
||||
chart.series.list[1].show = true;
|
||||
chart.AnimationReset();
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(1.2f);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
chart.series.list[0].show = !chart.series.list[0].show;
|
||||
chart.series.list[1].show = !chart.series.list[1].show;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
}
|
||||
chart.series.list[0].show = true;
|
||||
chart.series.list[1].show = true;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
|
||||
IEnumerator ComponentLegend()
|
||||
{
|
||||
chart.title.subText = "Legend 图例:展示不同系列的名字和颜色,可控制系列显示等";
|
||||
chart.legend.show = true;
|
||||
chart.grid.top = 80;
|
||||
chart.legend.location.top = 50;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(1f);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
chart.legend.show = !chart.legend.show;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
}
|
||||
chart.legend.show = true;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(1f);
|
||||
chart.ClickLegendButton(0, "Line", false);
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
chart.ClickLegendButton(0, "Line", true);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
chart.ClickLegendButton(1, "Bar", false);
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
chart.ClickLegendButton(1, "Bar", true);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
|
||||
IEnumerator ComponentTheme()
|
||||
{
|
||||
chart.title.subText = "Theme 主题:可从全局上配置图表的颜色、字体等效果,支持默认主题切换";
|
||||
yield return new WaitForSeconds(1f);
|
||||
chart.title.subText = "Theme 主题:Light主题";
|
||||
chart.UpdateTheme(Theme.Light);
|
||||
yield return new WaitForSeconds(1f);
|
||||
chart.title.subText = "Theme 主题:Dark主题";
|
||||
chart.UpdateTheme(Theme.Dark);
|
||||
yield return new WaitForSeconds(1f);
|
||||
chart.title.subText = "Theme 主题:Default主题";
|
||||
chart.UpdateTheme(Theme.Default);
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
|
||||
IEnumerator ComponentDataZoom()
|
||||
{
|
||||
chart.title.subText = "DataZoom 区域缩放:可通过拖、拽、缩小、放大来观察细节数据";
|
||||
chart.grid.bottom = 70;
|
||||
|
||||
chart.dataZoom.enable = true;
|
||||
chart.dataZoom.supportInside = true;
|
||||
chart.dataZoom.supportSlider = true;
|
||||
chart.dataZoom.height = 30;
|
||||
chart.dataZoom.start = 0;
|
||||
chart.dataZoom.end = 100;
|
||||
|
||||
chart.RefreshChart();
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
chart.dataZoom.supportSlider = !chart.dataZoom.supportSlider;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
}
|
||||
chart.dataZoom.supportSlider = true;
|
||||
chart.RefreshChart();
|
||||
yield return new WaitForSeconds(1f);
|
||||
while (chart.dataZoom.start < 40)
|
||||
{
|
||||
chart.dataZoom.start += speed * Time.deltaTime * 0.8f;
|
||||
chart.RefreshDataZoom();
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
while (chart.dataZoom.end > 60)
|
||||
{
|
||||
chart.dataZoom.end -= speed * Time.deltaTime * 0.8f;
|
||||
chart.RefreshDataZoom();
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
while (chart.dataZoom.start > 0)
|
||||
{
|
||||
chart.dataZoom.start -= speed * Time.deltaTime * 0.8f;
|
||||
chart.dataZoom.end -= speed * Time.deltaTime * 0.8f;
|
||||
chart.RefreshDataZoom();
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
while (chart.dataZoom.end < 100)
|
||||
{
|
||||
chart.dataZoom.start += speed * Time.deltaTime * 0.8f;
|
||||
chart.dataZoom.end += speed * Time.deltaTime * 0.8f;
|
||||
chart.RefreshDataZoom();
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
while (chart.dataZoom.start > 0 || chart.dataZoom.end < 100)
|
||||
{
|
||||
chart.dataZoom.start -= speed * Time.deltaTime * 0.8f;
|
||||
chart.dataZoom.end += speed * Time.deltaTime * 0.8f;
|
||||
chart.RefreshDataZoom();
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator ComponentVisualMap()
|
||||
{
|
||||
chart.title.subText = "VisualMap 视觉映射:可从全局上配置图表的颜色、字体等效果,支持默认主题切换";
|
||||
|
||||
chart.visualMap.enable = true;
|
||||
chart.visualMap.show = true;
|
||||
chart.visualMap.orient = Orient.Vertical;
|
||||
chart.visualMap.calculable = true;
|
||||
chart.visualMap.min = 0;
|
||||
chart.visualMap.max = 100;
|
||||
chart.visualMap.range[0] = 0;
|
||||
chart.visualMap.range[1] = 100;
|
||||
|
||||
var colors = new List<string>{"#313695", "#4575b4", "#74add1", "#abd9e9", "#e0f3f8", "#ffffbf",
|
||||
"#fee090", "#fdae61", "#f46d43", "#d73027", "#a50026"};
|
||||
chart.visualMap.inRange.Clear();
|
||||
foreach (var str in colors)
|
||||
{
|
||||
chart.visualMap.inRange.Add(ThemeInfo.GetColor(str));
|
||||
}
|
||||
chart.grid.left = 80;
|
||||
chart.grid.bottom = 100;
|
||||
chart.RefreshChart();
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
while (chart.visualMap.rangeMin < 40)
|
||||
{
|
||||
chart.visualMap.rangeMin += speed * Time.deltaTime;
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
while (chart.visualMap.rangeMax > 60)
|
||||
{
|
||||
chart.visualMap.rangeMax -= speed * Time.deltaTime;
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
while (chart.visualMap.rangeMin > 0 || chart.visualMap.rangeMax < 100)
|
||||
{
|
||||
chart.visualMap.rangeMin -= speed * Time.deltaTime;
|
||||
chart.visualMap.rangeMax += speed * Time.deltaTime;
|
||||
chart.RefreshChart();
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo01_UpdateData : MonoBehaviour
|
||||
{
|
||||
private float updateTime = 0;
|
||||
BaseChart chart;
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<BaseChart>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
updateTime += Time.deltaTime;
|
||||
if (chart && updateTime > 2)
|
||||
{
|
||||
updateTime = 0;
|
||||
var serie = chart.series.GetSerie(0);
|
||||
//serie.animation.dataChangeEnable = true;
|
||||
var dataCount = serie.dataCount;
|
||||
if (chart is RadarChart)
|
||||
{
|
||||
var dimension = serie.GetSerieData(0).data.Count - 1;
|
||||
chart.UpdateData(0, 0, Random.Range(0, dimension + 1), Random.Range(0, 100));
|
||||
}
|
||||
else if (chart is HeatmapChart)
|
||||
{
|
||||
var dimension = serie.GetSerieData(0).data.Count - 1;
|
||||
for (int i = 0; i < dataCount; i++)
|
||||
{
|
||||
chart.UpdateData(0, i, dimension, Random.Range(0, 10));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chart.UpdateData(0, Random.Range(0, dataCount), Random.Range(10, 90));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo11_AddSinCurve : MonoBehaviour
|
||||
{
|
||||
private float time;
|
||||
public int angle;
|
||||
private LineChart chart;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<LineChart>();
|
||||
if (chart != null)
|
||||
{
|
||||
GameObject.DestroyImmediate(chart);
|
||||
}
|
||||
chart = gameObject.AddComponent<LineChart>();
|
||||
chart.title.show = true;
|
||||
chart.title.text = "Sin Curve";
|
||||
|
||||
chart.tooltip.show = true;
|
||||
chart.legend.show = false;
|
||||
|
||||
chart.xAxises[0].show = true;
|
||||
chart.xAxises[1].show = false;
|
||||
chart.yAxises[0].show = true;
|
||||
chart.yAxises[1].show = false;
|
||||
|
||||
chart.xAxises[0].type = Axis.AxisType.Value;
|
||||
chart.yAxises[0].type = Axis.AxisType.Value;
|
||||
|
||||
chart.xAxises[0].boundaryGap = false;
|
||||
chart.xAxises[0].maxCache = 0;
|
||||
chart.series.list[0].maxCache = 0;
|
||||
|
||||
chart.RemoveData();
|
||||
|
||||
var serie = chart.AddSerie(SerieType.Line);
|
||||
serie.symbol.type = SerieSymbolType.None;
|
||||
serie.lineType = LineType.Normal;
|
||||
for (angle = 0; angle < 1080; angle++)
|
||||
{
|
||||
float xvalue = Mathf.PI / 180 * angle;
|
||||
float yvalue = Mathf.Sin(xvalue);
|
||||
chart.AddData(0, xvalue, yvalue);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (angle > 3000) return;
|
||||
angle++;
|
||||
float xvalue = Mathf.PI / 180 * angle;
|
||||
float yvalue = Mathf.Sin(xvalue);
|
||||
chart.AddData(0, xvalue, yvalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo12_CustomDrawing : MonoBehaviour
|
||||
{
|
||||
LineChart chart;
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<LineChart>();
|
||||
if (chart == null) return;
|
||||
|
||||
chart.customDrawCallback = delegate (VertexHelper vh)
|
||||
{
|
||||
var dataPoints = chart.series.list[0].dataPoints;
|
||||
if (dataPoints.Count > 0)
|
||||
{
|
||||
var pos = dataPoints[3];
|
||||
var zeroPos = new Vector3(chart.coordinateX, chart.coordinateY);
|
||||
var startPos = new Vector3(pos.x, zeroPos.y);
|
||||
var endPos = new Vector3(pos.x, zeroPos.y + chart.coordinateHeight);
|
||||
ChartDrawer.DrawLine(vh, startPos, endPos, 1, Color.blue);
|
||||
ChartDrawer.DrawCricle(vh, pos, 5, Color.blue);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e27021e8c8377464a8b439cf785080ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,50 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo13_LineSimple : MonoBehaviour
|
||||
{
|
||||
void Awake()
|
||||
{
|
||||
var chart = gameObject.GetComponent<LineChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<LineChart>();
|
||||
}
|
||||
chart.title.show = true;
|
||||
chart.title.text = "Line Simple";
|
||||
|
||||
chart.tooltip.show = true;
|
||||
chart.legend.show = false;
|
||||
|
||||
chart.xAxises[0].show = true;
|
||||
chart.xAxises[1].show = false;
|
||||
chart.yAxises[0].show = true;
|
||||
chart.yAxises[1].show = false;
|
||||
chart.xAxises[0].type = Axis.AxisType.Category;
|
||||
chart.yAxises[0].type = Axis.AxisType.Value;
|
||||
|
||||
chart.xAxises[0].splitNumber = 10;
|
||||
chart.xAxises[0].boundaryGap = true;
|
||||
|
||||
chart.RemoveData();
|
||||
chart.AddSerie(SerieType.Line);
|
||||
chart.AddSerie(SerieType.Line);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
chart.AddXAxisData("x" + i);
|
||||
chart.AddData(0, Random.Range(10, 20));
|
||||
chart.AddData(1, Random.Range(10, 20));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75813849985304690b882bdd95364bae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b4ec86ec75e9428e878f99c14f7676f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccf4c940af6c343e6abea9580e3915bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,124 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
public class Demo40_Radar : MonoBehaviour
|
||||
{
|
||||
private RadarChart chart;
|
||||
private Serie serie, serie1;
|
||||
void Awake()
|
||||
{
|
||||
LoopDemo();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
LoopDemo();
|
||||
}
|
||||
|
||||
void LoopDemo()
|
||||
{
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(RadarDemo());
|
||||
}
|
||||
|
||||
IEnumerator RadarDemo()
|
||||
{
|
||||
StartCoroutine(RadarAdd());
|
||||
yield return new WaitForSeconds(2);
|
||||
StartCoroutine(RadarUpdate());
|
||||
yield return new WaitForSeconds(2);
|
||||
StartCoroutine(RadarAddMultiple());
|
||||
yield return new WaitForSeconds(2);
|
||||
LoopDemo();
|
||||
}
|
||||
|
||||
IEnumerator RadarAdd()
|
||||
{
|
||||
chart = gameObject.GetComponent<RadarChart>();
|
||||
if (chart == null) chart = gameObject.AddComponent<RadarChart>();
|
||||
chart.RemoveRadar();
|
||||
chart.RemoveData();
|
||||
|
||||
chart.title.text = "RadarChart - 雷达图";
|
||||
chart.title.subText = "";
|
||||
|
||||
chart.legend.show = true;
|
||||
chart.legend.location.align = Location.Align.TopLeft;
|
||||
chart.legend.location.top = 60;
|
||||
chart.legend.location.left = 2;
|
||||
chart.legend.itemWidth = 70;
|
||||
chart.legend.itemHeight = 20;
|
||||
chart.legend.orient = Orient.Vertical;
|
||||
|
||||
chart.AddRadar(Radar.Shape.Polygon, new Vector2(0.5f, 0.4f), 0.4f);
|
||||
chart.AddIndicator(0, "indicator1", 0, 100);
|
||||
chart.AddIndicator(0, "indicator2", 0, 100);
|
||||
chart.AddIndicator(0, "indicator3", 0, 100);
|
||||
chart.AddIndicator(0, "indicator4", 0, 100);
|
||||
chart.AddIndicator(0, "indicator5", 0, 100);
|
||||
|
||||
serie = chart.AddSerie(SerieType.Radar, "test");
|
||||
serie.radarIndex = 0;
|
||||
chart.AddData(0, new List<float> { 10, 20, 60, 40, 20 }, "data1");
|
||||
chart.AddData(0, new List<float> { 40, 60, 90, 80, 70 }, "data2");
|
||||
yield return new WaitForSeconds(1);
|
||||
}
|
||||
|
||||
IEnumerator RadarUpdate()
|
||||
{
|
||||
chart.UpdateIndicator(0, 0, "new1", 0, 100);
|
||||
chart.UpdateData(0, 0, new List<float> { 15, 30, 50, 60, 50 });
|
||||
chart.UpdateDataName(0, 0, "new1");
|
||||
yield return new WaitForSeconds(1);
|
||||
}
|
||||
|
||||
IEnumerator RadarAddMultiple()
|
||||
{
|
||||
chart.RemoveRadar();
|
||||
chart.RemoveData();
|
||||
|
||||
chart.title.text = "RadarChart - 多雷达图";
|
||||
chart.title.subText = "";
|
||||
|
||||
chart.legend.show = true;
|
||||
chart.legend.location.align = Location.Align.TopLeft;
|
||||
chart.legend.location.top = 60;
|
||||
chart.legend.location.left = 2;
|
||||
chart.legend.itemWidth = 70;
|
||||
chart.legend.itemHeight = 20;
|
||||
chart.legend.orient = Orient.Vertical;
|
||||
|
||||
chart.AddRadar(Radar.Shape.Polygon, new Vector2(0.25f, 0.4f), 0.25f);
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
chart.AddIndicator(0, "radar1" + i, 0, 100);
|
||||
}
|
||||
|
||||
chart.AddRadar(Radar.Shape.Circle, new Vector2(0.75f, 0.4f), 0.25f);
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
chart.AddIndicator(1, "radar2" + i, 0, 100);
|
||||
}
|
||||
|
||||
serie = chart.AddSerie(SerieType.Radar, "test1");
|
||||
serie.radarIndex = 0;
|
||||
chart.AddData(0, new List<float> { 10, 20, 60, 40, 20 }, "data1");
|
||||
|
||||
serie1 = chart.AddSerie(SerieType.Radar, "test2");
|
||||
serie1.radarIndex = 1;
|
||||
chart.AddData(1, new List<float> { 10, 20, 60, 40, 20 }, "data2");
|
||||
yield return new WaitForSeconds(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb56350d2a2b24960a7174a1d3f2ea56
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,38 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo50_Scatter : MonoBehaviour
|
||||
{
|
||||
private ScatterChart chart;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<ScatterChart>();
|
||||
if (chart == null) return;
|
||||
chart.series.SetSerieSymbolSizeCallback(SymbolSize, SymbolSelectedSize);
|
||||
}
|
||||
|
||||
float SymbolSize(List<float> data)
|
||||
{
|
||||
//return Mathf.Clamp(data[1] * 10,1,100);
|
||||
return (float)(Mathf.Sqrt(data[2]) / 6e2);
|
||||
}
|
||||
|
||||
float SymbolSelectedSize(List<float> data)
|
||||
{
|
||||
//return Mathf.Clamp(data[1] * 10,1,100);
|
||||
return (float)(Mathf.Sqrt(data[2]) / 5e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f7e5ced8db104dcc8447f1e5ac903f4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,104 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo60_Heatmap : MonoBehaviour
|
||||
{
|
||||
private HeatmapChart chart;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<HeatmapChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<HeatmapChart>();
|
||||
}
|
||||
chart.title.text = "HeatmapChart";
|
||||
chart.tooltip.type = Tooltip.Type.None;
|
||||
chart.grid.left = 100;
|
||||
chart.grid.right = 60;
|
||||
chart.grid.bottom = 60;
|
||||
//目前只支持Category
|
||||
chart.xAxises[0].type = Axis.AxisType.Category;
|
||||
chart.yAxises[0].type = Axis.AxisType.Category;
|
||||
|
||||
chart.xAxises[0].boundaryGap = true;
|
||||
chart.xAxises[0].boundaryGap = true;
|
||||
|
||||
chart.xAxises[0].splitNumber = 10;
|
||||
chart.yAxises[0].splitNumber = 10;
|
||||
|
||||
//清空数据重新添加
|
||||
chart.RemoveData();
|
||||
var serie = chart.AddSerie(SerieType.Heatmap, "serie1");
|
||||
|
||||
//设置样式
|
||||
serie.itemStyle.show = true;
|
||||
serie.itemStyle.borderWidth = 1;
|
||||
serie.itemStyle.borderColor = Color.clear;
|
||||
|
||||
//设置高亮样式
|
||||
serie.emphasis.show = true;
|
||||
serie.emphasis.itemStyle.show = true;
|
||||
serie.emphasis.itemStyle.borderWidth = 1;
|
||||
serie.emphasis.itemStyle.borderColor = Color.black;
|
||||
|
||||
//设置视觉映射组件
|
||||
chart.visualMap.enable = true;
|
||||
chart.visualMap.max = 10;
|
||||
chart.visualMap.range[0] = 0f;
|
||||
chart.visualMap.range[1] = 10f;
|
||||
chart.visualMap.orient = Orient.Vertical;
|
||||
chart.visualMap.calculable = true;
|
||||
chart.visualMap.location.align = Location.Align.BottomLeft;
|
||||
chart.visualMap.location.bottom = 100;
|
||||
chart.visualMap.location.left = 30;
|
||||
|
||||
//清空颜色重新添加
|
||||
chart.visualMap.inRange.Clear();
|
||||
|
||||
var heatmapGridWid = 10f;
|
||||
int xSplitNumber = (int)(chart.coordinateWidth / heatmapGridWid);
|
||||
int ySplitNumber = (int)(chart.coordinateHeight / heatmapGridWid);
|
||||
var colors = new List<string>{"#313695", "#4575b4", "#74add1", "#abd9e9", "#e0f3f8", "#ffffbf",
|
||||
"#fee090", "#fdae61", "#f46d43", "#d73027", "#a50026"};
|
||||
foreach (var str in colors)
|
||||
{
|
||||
chart.visualMap.inRange.Add(ThemeInfo.GetColor(str));
|
||||
}
|
||||
//添加xAxis的数据
|
||||
for (int i = 0; i < xSplitNumber; i++)
|
||||
{
|
||||
chart.AddXAxisData((i + 1).ToString());
|
||||
}
|
||||
//添加yAxis的数据
|
||||
for (int i = 0; i < ySplitNumber; i++)
|
||||
{
|
||||
chart.AddYAxisData((i + 1).ToString());
|
||||
}
|
||||
for (int i = 0; i < xSplitNumber; i++)
|
||||
{
|
||||
for (int j = 0; j < ySplitNumber; j++)
|
||||
{
|
||||
var value = 0f;
|
||||
var rate = Random.Range(0, 101);
|
||||
if (rate > 70) value = Random.Range(8f, 10f);
|
||||
else value = Random.Range(1f, 8f);
|
||||
var list = new List<float> { i, j, value };
|
||||
//至少是一个三位数据:(x,y,value)
|
||||
chart.AddData(0, list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14e10f24be7ee4f609b36b904224382d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,70 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo70_Gauge : MonoBehaviour
|
||||
{
|
||||
private GaugeChart chart;
|
||||
private float updateTime;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<GaugeChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<GaugeChart>();
|
||||
}
|
||||
chart.title.text = "GaugeChart";
|
||||
chart.RemoveData();
|
||||
|
||||
var serie = chart.AddSerie(SerieType.Gauge, "速度");
|
||||
serie.min = 0;
|
||||
serie.max = 220;
|
||||
serie.startAngle = -125;
|
||||
serie.endAngle = 125;
|
||||
serie.center[0] = 0.5f;
|
||||
serie.center[1] = 0.5f;
|
||||
serie.radius[0] = 80;
|
||||
serie.splitNumber = 5;
|
||||
serie.animation.dataChangeEnable = true;
|
||||
serie.roundCap = true;
|
||||
|
||||
serie.titleStyle.show = true;
|
||||
serie.titleStyle.textStyle.offset = new Vector2(0, 20);
|
||||
|
||||
serie.label.show = true;
|
||||
serie.label.offset = new Vector3(0, -20);
|
||||
|
||||
serie.gaugeAxis.show = true;
|
||||
serie.gaugeAxis.axisLine.width = 15;
|
||||
|
||||
serie.gaugePointer.show = true;
|
||||
serie.gaugePointer.width = 15;
|
||||
|
||||
var value = UnityEngine.Random.Range(serie.min, serie.max);
|
||||
chart.AddData(0, value, "km/h");
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
updateTime += Time.deltaTime;
|
||||
if (updateTime > 2)
|
||||
{
|
||||
updateTime = 0;
|
||||
var value = UnityEngine.Random.Range(0, 220);
|
||||
chart.UpdateData(0, 0, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 250f744fcb07d4401994d964c4369d9d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,71 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(CoordinateChart))]
|
||||
public class Demo_Dynamic : MonoBehaviour
|
||||
{
|
||||
public int maxCacheDataNumber = 100;
|
||||
public float initDataTime = 2;
|
||||
|
||||
private CoordinateChart chart;
|
||||
private float updateTime;
|
||||
private float initTime;
|
||||
private int initCount;
|
||||
private int count;
|
||||
private bool isInited;
|
||||
private DateTime timeNow;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponentInChildren<CoordinateChart>();
|
||||
chart.RemoveData();
|
||||
var serie = chart.AddSerie(SerieType.Line);
|
||||
serie.symbol.type = SerieSymbolType.None;
|
||||
serie.maxCache = maxCacheDataNumber;
|
||||
chart.xAxises[0].maxCache = maxCacheDataNumber;
|
||||
timeNow = DateTime.Now;
|
||||
timeNow = timeNow.AddSeconds(-maxCacheDataNumber);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (initCount < maxCacheDataNumber)
|
||||
{
|
||||
int count = (int)(maxCacheDataNumber / initDataTime * Time.deltaTime);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
timeNow = timeNow.AddSeconds(1);
|
||||
string category = timeNow.ToString("hh:mm:ss");
|
||||
float value = UnityEngine.Random.Range(60, 150);
|
||||
chart.AddXAxisData(category);
|
||||
chart.AddData(0, value);
|
||||
initCount++;
|
||||
if (initCount > maxCacheDataNumber) break;
|
||||
}
|
||||
chart.RefreshChart();
|
||||
}
|
||||
updateTime += Time.deltaTime;
|
||||
if (updateTime >= 1)
|
||||
{
|
||||
updateTime = 0;
|
||||
count++;
|
||||
string category = DateTime.Now.ToString("hh:mm:ss");
|
||||
float value = UnityEngine.Random.Range(60, 150);
|
||||
chart.AddXAxisData(category);
|
||||
chart.AddData(0, value);
|
||||
chart.RefreshChart();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7774c94c82584c0ca35e6f79d1fc29c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,55 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(CoordinateChart))]
|
||||
public class Demo_LargeData : MonoBehaviour
|
||||
{
|
||||
public int maxCacheDataNumber = 3000;
|
||||
public float initDataTime = 5;
|
||||
|
||||
private CoordinateChart chart;
|
||||
private float initTime;
|
||||
private int initCount = 0;
|
||||
private System.DateTime timeNow;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponentInChildren<CoordinateChart>();
|
||||
timeNow = System.DateTime.Now;
|
||||
chart.ClearAxisData();
|
||||
chart.series.ClearData();
|
||||
chart.series.list[0].maxCache = maxCacheDataNumber;
|
||||
chart.xAxises[0].maxCache = maxCacheDataNumber;
|
||||
chart.title.text = maxCacheDataNumber + "数据";
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (initCount < maxCacheDataNumber)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
initCount++;
|
||||
if (initCount > maxCacheDataNumber) break;
|
||||
chart.title.text = initCount + "数据";
|
||||
timeNow = timeNow.AddSeconds(1);
|
||||
float xvalue = Mathf.PI / 180 * initCount;
|
||||
float yvalue = Mathf.Sin(xvalue);
|
||||
|
||||
chart.AddData(0, 15 + yvalue * 2);
|
||||
chart.AddXAxisData(timeNow.ToString("hh:mm:ss"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c777ceb41c4c743d2ba0ea573287be9e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,46 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(PieChart))]
|
||||
public class Demo_PieChart : MonoBehaviour
|
||||
{
|
||||
private PieChart chart;
|
||||
private float time;
|
||||
private int count = 0;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
chart = transform.GetComponent<PieChart>();
|
||||
chart.ClearData();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
time += Time.deltaTime;
|
||||
if (time > 1)
|
||||
{
|
||||
time = 0;
|
||||
if (count < 5)
|
||||
{
|
||||
chart.AddData(0, Random.Range(10, 100), "time" + count);
|
||||
}
|
||||
else
|
||||
{
|
||||
int index = count % 5;
|
||||
chart.UpdateData(0, Random.Range(10, 100), index);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c85e69c8e4374481be85fda06a45209
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,56 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo_Test : MonoBehaviour
|
||||
{
|
||||
private float updateTime = 0;
|
||||
BaseChart chart;
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<BaseChart>();
|
||||
var btnTrans = transform.parent.Find("Button");
|
||||
if (btnTrans)
|
||||
{
|
||||
btnTrans.gameObject.GetComponent<Button>().onClick.AddListener(OnTestBtn);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
AddData();
|
||||
}
|
||||
}
|
||||
|
||||
void OnTestBtn()
|
||||
{
|
||||
chart.ClearData();
|
||||
}
|
||||
|
||||
void AddData()
|
||||
{
|
||||
chart.ClearData();
|
||||
int count = Random.Range(5, 20);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
(chart as CoordinateChart).AddXAxisData("x" + i);
|
||||
if (Random.Range(1, 3) == 2)
|
||||
chart.AddData(0, Random.Range(10, 200));
|
||||
else
|
||||
chart.AddData(0, Random.Range(10, 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e538728f2646249ae9c9206b8ceffe25
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,120 +0,0 @@
|
||||
# XCharts API
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
## `BaseChart`
|
||||
|
||||
* `BaseChart.themeInfo`:主题组件`ThemeInfo`。
|
||||
* `BaseChart.title`:标题组件`Title`。
|
||||
* `BaseChart.legend`:图例组件`Legend`。
|
||||
* `BaseChart.tooltip`:提示框组件`Tooltip`。
|
||||
* `BaseChart.series`:系列列表`Series`。
|
||||
* `BaseChart.chartWidth`:图表的宽。
|
||||
* `BaseChart.chartHeight`:图表的高。
|
||||
* `BaseChart.customDrawCallback`:自定义绘制回调函数。
|
||||
* `BaseChart.SetSize(float width, float height)`:设置图表的大小。
|
||||
* `BaseChart.ClearData()`:清除所有数据,系列列表会保留,只是移除列表中系列的数据。
|
||||
* `BaseChart.RemoveData()`:清除所有系列和图例数据,系列列表也会被清除。
|
||||
* `BaseChart.RemoveData(string serieName)`:清除指定系列名称的数据。
|
||||
* `BaseChart.AddSerie(SerieType type, string serieName = null, bool show = true)`:添加一个系列到系列列表中。
|
||||
* `BaseChart.AddData(string serieName, float data, string dataName = null)`:添加一个数据到指定的系列中。
|
||||
* `BaseChart.AddData(int serieIndex, float data, string dataName = null)`:添加一个数据到指定的系列中。
|
||||
* `BaseChart.AddData(string serieName, List<float> multidimensionalData, string dataName = null)`:添加多维数据`(x,y,z...)`到指定的系列中。
|
||||
* `BaseChart.AddData(int serieIndex, List<float> multidimensionalData, string dataName = null)`:添加多维数据`(x,y,z...)`到指定的系列中。
|
||||
* `BaseChart.AddData(string serieName, float xValue, float yValue, string dataName)`:添加`(x,y)`数据到指定系列中。
|
||||
* `BaseChart.AddData(int serieIndex, float xValue, float yValue, string dataName = null)`:添加`(x,y)`数据到指定系列中。
|
||||
* `BaseChart.UpdateData(string serieName,int dataIndex, float value)`:更新指定系列中的指定索引数据。
|
||||
* `BaseChart.UpdateData(int serieIndex,int dataIndex, float value)`:更新指定系列中的指定索引数据。
|
||||
* `BaseChart.UpdateData(string serieName, int dataIndex, List<float> multidimensionalData)`:更新指定系列指定索引的数据项的多维数据。
|
||||
* `BaseChart.UpdateData(int serieIndex, int dataIndex, List<float> multidimensionalData)`:更新指定系列指定索引的数据项的多维数据。
|
||||
* `BaseChart.UpdateData(string serieName, int dataIndex, int dimension, float value)`:更新指定系列指定索引指定维数的数据。维数从0开始。
|
||||
* `BaseChart.UpdateData(int serieIndex, int dataIndex, int dimension, float value)`:更新指定系列指定索引指定维数的数据。维数从0开始。
|
||||
* `BaseChart.UpdateDataName(string serieName,int dataIndex, string dataName)`:更新指定系列中的指定索引数据名称。
|
||||
* `BaseChart.UpdateDataName(int serieIndex, int dataIndex, string dataName)`:更新指定系列中的指定索引数据名称。
|
||||
* `BaseChart.SetActive(string serieName, bool active)`:设置指定系列是否显示。
|
||||
* `BaseChart.SetActive(int serieIndex, bool active)`:设置指定系列是否显示。
|
||||
* `BaseChart.IsActive(string serieName)`:获取指定系列是否显示。
|
||||
* `BaseChart.IsActive(int serieIndex)`:获取指定系列是否显示。
|
||||
* `BaseChart.IsActiveByLegend(string legendName)`:获得指定图例名字的系列是否显示。
|
||||
* `BaseChart.RefreshChart()`:在下一帧刷新图表。
|
||||
* `BaseChart.RefreshLabel()`:在下一帧刷新文本标签。
|
||||
* `BaseChart.RefreshTooltip()`:立即刷新`Tooltip`组件。
|
||||
* `BaseChart.UpdateTheme(Theme theme)`:切换图表主题。
|
||||
* `BaseChart.AnimationEnable(bool flag)`:启用或关闭动画。
|
||||
* `BaseChart.AnimationFadeIn()`:渐入动画。
|
||||
* `BaseChart.AnimationFadeOut()`:渐出动画。
|
||||
* `BaseChart.AnimationPause()`:暂停动画。
|
||||
* `BaseChart.AnimationResume()`:继续动画。
|
||||
* `BaseChart.AnimationReset()`:重置动画。
|
||||
* `BaseChart.ClickLegendButton(int legendIndex, string legendName, bool show)`:点击图例按钮。
|
||||
|
||||
## `CoordinateChart`
|
||||
|
||||
* `CoordinateChart.grid`:网格组件 `Grid`。
|
||||
* `CoordinateChart.xAxises`:左右两个 `X` 轴组件 `XAxis`。
|
||||
* `CoordinateChart.yAxises`:左右两个 `Y` 轴组件 `YAxis`。
|
||||
* `CoordianteChart.xAxis0`:X轴(下)。
|
||||
* `CoordianteChart.xAxis1`:X轴(上)。
|
||||
* `CoordianteChart.xAxis0`:Y轴(左)。
|
||||
* `CoordianteChart.yAxis1`:Y轴(右)。
|
||||
* `CoordinateChart.dataZoom`:区域缩放组件 `DataZoom`。
|
||||
* `CoordinateChart.coordinateX`:坐标系的左下角坐标 `X`。
|
||||
* `CoordinateChart.coordinateY`:坐标系的左下角坐标 `Y`。
|
||||
* `CoordinateChart.coordinateWidth`:坐标系的宽。
|
||||
* `CoordinateChart.coordinateHeight`:坐标系的高。
|
||||
* `CoordinateChart.ClearAxisData()`:清除所有x轴和y轴的类目数据。
|
||||
* `CoordinateChart.AddXAxisData(string category, int xAxisIndex = 0)`:添加一个类目数据到指定的 `X` 轴。
|
||||
* `CoordinateChart.AddYAxisData(string category, int yAxisIndex = 0)`:添加一个类目数据到指定的 `Y` 轴。
|
||||
* `CoordinateChart.IsValue()`:是否是纯数值坐标。
|
||||
* `CoordinateChart.RefreshDataZoom()`:在下一帧刷新DataZoom组件。
|
||||
* `CoordinateChart.RefreshAxisMinMaxValue()`:立即刷新数值坐标轴的最大最小值(更新坐标轴标签并触发重绘)。
|
||||
|
||||
## `LineChart`
|
||||
|
||||
* 继承 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `BarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `PieChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
|
||||
## `RadarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* `RadarChart.radars`:雷达坐标系组件列表 `Radar`。
|
||||
* `RadarChart.RemoveRadar()`:移除所有雷达坐标系组件。
|
||||
* `RadarChart.AddRadar(Radar radar)`:添加雷达坐标系组件。
|
||||
* `RadarChart.AddRadar(Radar.Shape shape, Vector2 center, float radius, int splitNumber = 5,float lineWidth = 0.6f, bool showIndicator = true, bool showSplitArea = true)`:添加雷达坐标系组件。
|
||||
* `RadarChart.AddIndicator(int radarIndex, string name, float min, float max)`:添加指示器。
|
||||
* `RadarChart.UpdateIndicator(int radarIndex, int indicatorIndex, string name, float min, float max)`:更新指示器。
|
||||
* `RadarChart.GetRadar(int radarIndex)`:获得指定索引的雷达坐标系组件。
|
||||
* `RadarChart.GetIndicator(int radarIndex, int indicatorIndex)`:获得指定雷达坐标系组件指定索引的指示器。
|
||||
|
||||
## `ScatterChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `HeatmapChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `RingChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* `RingChart.UpdateMax(int serieIndex, int dataIndex, float value)`:更新指定系列执行数据项的最大值。
|
||||
* `RingChart.UpdateMax(int serieIndex, float value)`:更新指定系列的所有数据项的最大值。
|
||||
* `RingChart.UpdateMax(float value)`:更新第一个系列第一个数据项的最大值。
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81071e0166b9e49958800af4678e69ae
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,854 +0,0 @@
|
||||
# 配置项手册
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
主组件:
|
||||
|
||||
* [Axis 坐标轴](#XAxis)
|
||||
* [DataZoom 区域缩放](#DataZoom)
|
||||
* [Grid 网格](#Grid)
|
||||
* [Legend 图例](#Legend)
|
||||
* [Radar 雷达](#Radar)
|
||||
* [Series 系列](#Series)
|
||||
* [Serie-Line 折线图](#Serie-Line)
|
||||
* [Serie-Bar 柱形图](#Serie-Bar)
|
||||
* [Serie-Pie 饼图](#Serie-Pie)
|
||||
* [Serie-Radar 雷达图](#Serie-Radar)
|
||||
* [Serie-Scatter 散点图](#Serie-Scatter)
|
||||
* [Serie-Heatmap 热力图](#Serie-Heatmap)
|
||||
* [Serie-Gauge 仪表盘](#Serie-Gauge)
|
||||
* [Serie-Ring 环形图](#Serie-Ring)
|
||||
* [Settings 设置](#Settings)
|
||||
* [Theme 主题](#Theme)
|
||||
* [Tooltip 提示框](#Tooltip)
|
||||
* [Title 标题](#Title)
|
||||
* [VisualMap 视觉映射](#VisualMap)
|
||||
|
||||
子组件:
|
||||
|
||||
* [AreaStyle 区域填充样式](#AreaStyle)
|
||||
* [AxisLabel 坐标轴刻度标签](#AxisLabel)
|
||||
* [AxisLine 坐标轴轴线](#AxisLine)
|
||||
* [AxisName 坐标轴名称](#AxisName)
|
||||
* [AxisSplitLine 坐标轴分割线条](#AxisSplitLine)
|
||||
* [AxisSplitArea 坐标轴分割区域](#AxisSplitArea)
|
||||
* [AxisTick 坐标轴刻度](#AxisTick)
|
||||
* [Emphasis 高亮样式](#Emphasis)
|
||||
* [ItemStyle 图形样式](#ItemStyle)
|
||||
* [LineArrow 折线图箭头](#LineArrow)
|
||||
* [LineStyle 折线图样式](#LineStyle)
|
||||
* [Location 位置](#Location)
|
||||
* [SerieAnimation 动画](#SerieAnimation)
|
||||
* [SerieData 数据项](#SerieData)
|
||||
* [SerieLabel 图形上的文本标签](#SerieLabel)
|
||||
* [SerieSymbol 图形标记](#SerieSymbol)
|
||||
* [TextLimit 文本自适应](#TextLimit)
|
||||
* [TextStyle 文本样式](#TextStyle)
|
||||
|
||||
## `Theme`
|
||||
|
||||
主题组件。主题用来配置图表的全局配色等其他参数。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `theme`:内置主题类型。有`Default`、`Light`、`Dark`三种可选内置主题。
|
||||
* `font`:所有文字的通用字体。
|
||||
* `backgroundColor`:图表背景颜色。
|
||||
* `titleTextColor`:主题的主标题文字颜色。
|
||||
* `titleSubTextColor`:主题的副标题文字颜色。
|
||||
* `legendTextColor`:图例的激活时文字颜色。
|
||||
* `legendUnableColor`:图例的非激活时文字颜色。
|
||||
* `axisTextColor`:坐标轴的文字颜色。
|
||||
* `axisLineColor`:坐标轴的轴线颜色。
|
||||
* `axisSplitLineColor`:坐标轴的分割线颜色,默认和轴线颜色一致。
|
||||
* `tooltipBackgroundColor`:提示框的背景颜色。
|
||||
* `tooltipFlagAreaColor`:提示框的阴影指示器的颜色。
|
||||
* `tooltipTextColor`:提示框的文字颜色。
|
||||
* `tooltipLabelColor`:提示框的十字指示器坐标轴标签的背景颜色。
|
||||
* `tooltipLineColor`:提示框的指示线的颜色。
|
||||
* `dataZoomTextColor`:区域缩放的文字颜色。
|
||||
* `dataZoomLineColor`:区域缩放的线条颜色。
|
||||
* `dataZoomSelectedColor`:区域缩放的选中区域颜色。
|
||||
* `colorPalette`:调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。
|
||||
|
||||
相关接口:
|
||||
|
||||
* `GetColor(int index)`:获得调色盘对应系列索引的颜色值。
|
||||
* `GetColorStr(int index)`:获得指定系列索引的十六进制颜色值字符串。
|
||||
* `GetColor(string hexColorStr)`:将字符串颜色值转成Color。
|
||||
|
||||
## `Title`
|
||||
|
||||
标题组件,包含主标题和副标题。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示标题组件。
|
||||
* `text`:主标题文本,支持使用 `\n` 换行。
|
||||
* `textStyle`:主标题文本样式 [TextStyle](#TextStyle)。
|
||||
* `subText`:副标题文本,支持使用 `\n` 换行。
|
||||
* `subTextStyle`:副标题文本样式 [TextStyle](#TextStyle)。
|
||||
* `itemGap`:主副标题之间的间距。
|
||||
* `location`:标题显示位置 [Location](#Location)。
|
||||
|
||||
## `TitleStyle`
|
||||
|
||||
标题样式。
|
||||
|
||||
* `show`:是否显示标题组件。
|
||||
* `rotate`:旋转。
|
||||
* `offset`:偏移。
|
||||
* `color`:颜色。
|
||||
* `fontSize`:字体大小。
|
||||
* `fontStyle`:字体风格。
|
||||
|
||||
## `Legend`
|
||||
|
||||
图例组件。图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示图例组件。
|
||||
* `selectedMode`:选择模式。控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 `None` 关闭。有以下三种选择方式:
|
||||
* `Multiple`:多选。
|
||||
* `Single`:单选。
|
||||
* `None`:无法选择。
|
||||
* `orient`:布局方式是横还是竖。
|
||||
* `Horizonal`:水平。
|
||||
* `Vertical`:垂直。
|
||||
* `location`:图例的显示位置 [Location](#Location)。
|
||||
* `itemWidth`:图例标记的图形宽度。
|
||||
* `itemHeight`:图例标记的图形高度。
|
||||
* `itemGap`:图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
|
||||
* `itemAutoColor`:图例标记的图形是否自动匹配颜色。
|
||||
* `formatter`:图例内容字符串模版格式器。支持用 `\n` 换行。模板变量为图例名称 `{name}`
|
||||
* `data`:图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 `name`(如果是饼图,也可以是饼图单个数据的 `name`)。如果 `data` 没有被指定,会自动从当前系列中获取。指定 `data` 时里面的数据项和 `serie` 匹配时才会生效。
|
||||
* `icons`:自定义的图例标记图形。
|
||||
* `textStyle`:图例的内容文本样式 [TextStyle](#TextStyle)。
|
||||
|
||||
相关接口:
|
||||
|
||||
* `ClearData()`:清空数据。
|
||||
* `ContainsData(string name)`:是否包括指定名字的图例。
|
||||
* `RemoveData(string name)`:移除指定名字的图例。
|
||||
* `AddData(string name)`:添加图例项。
|
||||
* `GetData(int index)`:获得指定索引的图例。
|
||||
* `GetIndex(string legendName)`:获得指定图例的索引。
|
||||
|
||||
## `Radar`
|
||||
|
||||
* `shape`:雷达图绘制类型。
|
||||
* `Polygon`:多边形。
|
||||
* `Circle`:圆形。
|
||||
* `positionType`:显示位置类型。
|
||||
* `Vertice`:显示在顶点处。
|
||||
* `Between`:显示在顶点之间。
|
||||
* `radius`:雷达图的半径。
|
||||
* `center`:雷达图的中心点。数组的第一项是横坐标,第二项是纵坐标。当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。
|
||||
* `splitLine`:分割线条 [AxisSplitLine](#AxisSplitLine)。
|
||||
* `splitArea`:分割区域 [AxisSplitArea](#AxisSplitArea)。
|
||||
* `indicator`:是否显示指示器。
|
||||
* `indicatorGap`:指示器和雷达的间距。
|
||||
* `indicatorList`指示器列表 [Radar.Indicator](#Radar.Indicator)。
|
||||
|
||||
## `Radar.Indicator`
|
||||
|
||||
* `name`:指示器名称。
|
||||
* `max`:指示器的最大值,默认为 0 无限制。
|
||||
* `min`:指示器的最小值,默认为 0 无限制。
|
||||
* `textStyle`:文本样式 [TextStyle](#TextStyle)。
|
||||
|
||||
## `TextLimit`
|
||||
|
||||
* `enable`:是否启用文本自适应。默认为`true`。
|
||||
* `maxWidth`:设定最大宽度。默认为`0`表示自动获取,否则表示自定义。当文本的宽度大于该值进行裁剪。
|
||||
* `gap`:两边留白像素距离。默认为`10`。
|
||||
* `suffix`: 长度超出被裁剪后附加的后缀。默认为`...`。
|
||||
|
||||
## `TextStyle`
|
||||
|
||||
* `rotate`:旋转。
|
||||
* `offset`:偏移。
|
||||
* `color`:颜色。
|
||||
* `backgroundColor`:背景颜色。
|
||||
* `font`:字体。
|
||||
* `fontSize`:字体大小。
|
||||
* `fontStyle`:字体风格。
|
||||
* `lineSpacing`:行间距。
|
||||
|
||||
## `Tooltip`
|
||||
|
||||
提示框组件。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示提示框组件。
|
||||
* `type`:提示框指示器类型。指示器类型有:
|
||||
* `Line`:线性指示器。
|
||||
* `Shadow`:阴影指示器。
|
||||
* `None`:无指示器。
|
||||
* `Corss`:十字准星指示器。坐标轴显示Label和交叉线。
|
||||
* `formatter`:提示框内容字符串模版格式器。支持用 `\n` 或 `<br/>` 换行。当`formatter`不为空时,优先使用`formatter`,否则使用`itemFormatter`。示例:`{a}:{c}`,`{a1}:{c1:f1}`。其中变量 `{a}`, `{b}`, `{c}`, `{d}` 在不同图表类型下代表数据含义为:
|
||||
* 折线(区域)图、柱状(条形)图、K线图 : `{a}`(系列名称),`{b}`(类目值),`{c}`(数值), `{d}`(无)。
|
||||
* 散点图(气泡)图 : `{a}`(系列名称),`{b}`(数据名称),`{c}`(数值数组), `{d}`(无)。
|
||||
* 地图 : `{a}`(系列名称),`{b}`(区域名称),`{c}`(合并数值), `{d}`(无)。
|
||||
* 饼图、仪表盘、漏斗图: `{a}`(系列名称),`{b}`(数据项名称),`{c}`(数值), `{d}`(百分比)。
|
||||
* `titleFormatter`:提示框标题内容的字符串模版格式器。支持用 `\n` 或 `<br/>` 换行。仅当`itemFormatter`生效时才有效。
|
||||
* `itemFormatter`:提示框单个`serie`或数据项内容的字符串模版格式器。支持用 `\n` 或 `<br/>` 换行。当`formatter`不为空时,优先使用`formatter`,否则使用`itemFormatter`。
|
||||
* `fixedWidth`:固定宽度。当同时设置 `fixedWidth` 和 `minWidth` 时,`fixedWidth` 比 `minWidth` 优先级高。
|
||||
* `fixedHeight`:固定高度。当同时设置 `fixedHeight` 和 `minHeight` 时,`fixedHeight` 比 `minHeight` 优先级高。
|
||||
* `minWidth`:最小宽度。当同时设置 `fixedWidth` 和 `minWidth` 时,`fixedWidth` 比 `minWidth` 优先级高。
|
||||
* `minHeight`:最小高度。当同时设置 f`ixedHeight` 和 `minHeight` 时,`fixedHeight` 比 `minHeight` 优先级高。
|
||||
* `paddingLeftRight`:文字和边框的左右边距。
|
||||
* `paddingTopBottom`:文字和边框的上下边距。
|
||||
* `backgroundImage`:提示框的背景图。
|
||||
* `forceENotation`:是否强制使用科学计数法格式化显示数值。默认为false,当小数精度大于3时才采用科学计数法。
|
||||
* `ignoreDataDefaultContent`:被忽略数据的默认显示字符信息。
|
||||
* `lineStyle`:指示器线条样式 [LineStyle](#LineStyle)。
|
||||
* `textStyle`:显示内容文本样式 [TextStyle](#TextStyle)。
|
||||
|
||||
## `DataZoom`
|
||||
|
||||
区域缩放组件。用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。
|
||||
目前只支持控制 `X` 轴。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `enable`:开启或关闭缩放区域功能。
|
||||
* `supportInside`:是否支持内置缩放。内置于坐标系中,可在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。
|
||||
* `supportSlider`:是否支持滑动条缩放。有单独的滑动条,可在滑动条上进行缩放或漫游。
|
||||
* ~~`filterMode`:数据过滤,暂未启用。支持以下几种类型:~~
|
||||
* ~~`Filter`:当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。~~
|
||||
* ~~`WeakFilter`:当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。~~
|
||||
* ~~`Empty`:当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。~~
|
||||
* ~~`None`:不过滤数据,只改变数轴范围。~~
|
||||
* ~~`xAxisIndex`:控制哪一个 `x` 轴。~~
|
||||
* ~~`yAxisIndex`:控制哪一个 `y` 轴。~~
|
||||
* `showDataShadow`:是否显示数据阴影。数据阴影可以简单地反应数据走势。
|
||||
* `showDetail`:是否显示 `detail`,即拖拽时候显示详细数值信息。
|
||||
* `zoomLock`:是否锁定选择区域(或叫做数据窗口)的大小。如果设置为 `true` 则锁定选择区域的大小,也就是说,只能平移,不能缩放。
|
||||
* ~~`realtime`:拖动时,是否实时更新系列的视图。如果设置为 `false`,则只在拖拽结束的时候更新。~~
|
||||
* ~~`backgroundColor`:组件的背景颜色。~~
|
||||
* `bottom`:组件离容器下侧的距离。
|
||||
* `height`:组件高度。
|
||||
* `rangeMode`:取值类型是取绝对值还是百分比。
|
||||
* `Percent`:百分比。
|
||||
* `start`:数据窗口范围的起始百分比。范围是:0 ~ 100。
|
||||
* `end`:数据窗口范围的结束百分比。范围是:0 ~ 100。
|
||||
* `scrollSensitivity`:缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。
|
||||
* `fontSize`:字体大小。
|
||||
* `fontStyle`:字体样式。
|
||||
* `minShowNum`:最小显示数据个数。当DataZoom放大到最大时,最小显示的数据个数。
|
||||
|
||||
## `VisualMap`
|
||||
|
||||
视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。
|
||||
|
||||
* `enable`:开启或关闭视觉映射功能。
|
||||
* `show`:是否显示组件。如果设置为 false,不会显示,但是数据映射的功能还存在。
|
||||
* `type`:组件类型。支持以下类型:
|
||||
* `Continuous`:连续型。
|
||||
* ~~`Piecewise`:分段型。~~
|
||||
* ~~`selectedMode`:分段型的选择模式,支持以下模式:~~
|
||||
* ~~`Multiple`:多选。~~
|
||||
* ~~`Single`:单选。~~
|
||||
* `min`:允许的最小值。'min' 必须用户指定。[visualMap.min, visualMap.max] 形成了视觉映射的『定义域』。
|
||||
* `max`:允许的最大值。'max' 必须用户指定。[visualMap.min, visualMax.max] 形成了视觉映射的『定义域』。
|
||||
* `range`:指定手柄对应数值的位置。range 应在 min max 范围内。
|
||||
* ~~`text`:两端的文本,如 ['High', 'Low']。~~
|
||||
* ~~`textGap`:两端文字主体之间的距离,单位为px。~~
|
||||
* `splitNumber`:对于连续型数据,自动平均切分成几段,默认为0时自动匹配inRange颜色列表大小。
|
||||
* `calculable`:是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。
|
||||
* ~~`realtime`:拖拽时,是否实时更新。~~
|
||||
* `itemWidth`:图形的宽度,即颜色条的宽度。
|
||||
* `itemHeight`:图形的高度,即颜色条的高度。
|
||||
* `borderWidth`:边框线宽,单位px。
|
||||
* `dimension`:指定用数据的『哪个维度』,映射到视觉元素上。『数据』即 series.data。从1开始,默认为0取 data 中最后一个维度。
|
||||
* `hoverLink`:打开 hoverLink 功能时,鼠标悬浮到 visualMap 组件上时,鼠标位置对应的数值 在 图表中对应的图形元素,会高亮。
|
||||
* `orient`:布局方式是横还是竖。
|
||||
* `location`:组件显示在图表中的位置。
|
||||
* `inRange`:定义 在选中范围中 的视觉颜色。
|
||||
* ~~`outOfRange`:定义 在选中范围外 的视觉颜色。~~
|
||||
|
||||
## `Grid`
|
||||
|
||||
网格组件。直角坐标系内绘图网格,单个 `grid` 内最多可以放置上下两个 `X` 轴,左右两个 `Y` 轴。可以在网格上绘制折线图,柱状图,散点图(气泡图)。目前最多只能存在一个 `grid` 组件。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示直角坐标系网格组件。
|
||||
* `left`:组件离容器左侧的距离。
|
||||
* `right`:组件离容器右侧的距离。
|
||||
* `top`:组件离容器顶部的距离。
|
||||
* `bottom`:组件离容器底部的距离。
|
||||
* `backgroundColor`:背景颜色。
|
||||
|
||||
## `GaugeAxis`
|
||||
|
||||
仪表盘坐标轴。
|
||||
|
||||
* `axisLine`:坐标轴轴线样式。
|
||||
* `splitLine`:坐标轴分割线样式。
|
||||
* `axisTick`:坐标轴刻度样式。
|
||||
* `axisLabel`:坐标轴刻度标签样式。
|
||||
* `axisLabelText`:坐标轴刻度标签自定义内容。当内容为空时,axisLabel根据刻度自动显示内容,否则取自该列表定义的内容。
|
||||
|
||||
## `GaugePointer`
|
||||
|
||||
仪表盘指针。
|
||||
|
||||
* `width`:指针宽度。
|
||||
* `length`:指针长度。当为0-1的浮点数时表示相对仪表盘半径的百分比。
|
||||
|
||||
## `XAxis`
|
||||
|
||||
直角坐标系 `grid` 中的 `X` 轴。单个 `grid` 组件最多只能放上下两个 `X` 轴。两个 `X` 轴存储在 `xAxises` 中。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示 `X` 轴。默认 `xAxises[0]` 为 `true`,`xAxises[1]` 为 `false`。
|
||||
* `type`:坐标轴类型。默认为 `Category`。支持以下类型:
|
||||
* `Value`:数值轴,用于连续数据。
|
||||
* `Category`:类目轴,适用于离散的类目数据,为该类型时必须通过 `data` 设置类目数据。
|
||||
* `Log`:对数轴,适用于对数数据。
|
||||
* `logBaseE`:对数轴是否以自然数 `e` 为底数,为 `true` 时 `logBase` 失效,只在对数轴(`type:'Log'`)中有效。
|
||||
* `logBase`:对数轴的底数,只在对数轴(`type:'Log'`)中有效。
|
||||
* `minMaxType`:坐标轴刻度最大最小值显示类型。默认为 `Default`。有以下三种类型:
|
||||
* `Default`:0-最大值。
|
||||
* `MinMax`:最小值-最大值。
|
||||
* `Custom`:自定义的最小值-最大值。
|
||||
* `min`:设定的坐标轴刻度最小值,当 `minMaxType` 为 `Custom` 时有效。
|
||||
* `max`:设定的坐标轴刻度最大值,当 `minMaxType` 为 `Custom` 时有效。
|
||||
* `splitNumber`:坐标轴的分割段数。默认为 `5`。当 `splitNumber` 设为 `0` 时,表示绘制所有的类目数据。
|
||||
* `interval`:强制设置坐标轴分割间隔。无法在类目轴中使用。设置改值时 `splitNumber` 无效。
|
||||
* `boundaryGap`:坐标轴两边是否留白。默认为 `true`。
|
||||
* `maxCache`:类目数据中可缓存的最大数据量。默认为0没有限制,大于0时超过指定值会移除旧数据再插入新数据。
|
||||
* `data`:类目数据,在类目轴(`type: 'Category'`)中有效。
|
||||
* `axisLine`:坐标轴轴线相关配置 [AxisLine](#AxisLine)。
|
||||
* `axisName`:坐标轴名称相关配置 [AxisName](#AxisName)。
|
||||
* `axisTick`:坐标轴刻度相关配置 [AxisTick](#AxisTick)。
|
||||
* `axisLabel`:坐标轴刻度标签 [AxisLabel](#AxisLabel)。
|
||||
* `splitLine`:坐标轴轴线坐标轴分割线 [AxisSplitLine](#SplitLine)。
|
||||
* `splitArea`:坐标轴轴线坐标轴分割区域 [AxisSplitArea](#AxisSplitArea)。
|
||||
|
||||
相关接口:
|
||||
|
||||
* `ClearData()`:清空类目数据。
|
||||
* `IsCategory()`:是否为类目轴。
|
||||
* `IsValue()`:是否为数值轴。
|
||||
* `AddData(string category, int maxDataNumber)`:添加一个类目到类目数据列表。
|
||||
|
||||
## `YAxis`
|
||||
|
||||
直角坐标系 `grid` 中的 `Y` 轴。单个 `grid` 组件最多只能放左右两个 `Y` 轴。两个 `Y` 轴存储在 `yAxises` 中。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示 `Y` 轴。默认 `yAxises[0]` 为 `true`,`yAxises[1]` 为 `false`。
|
||||
* `type`:坐标轴类型。默认为 `Value`。有以下两种类型:
|
||||
* `Value`:数值轴,用于连续数据。
|
||||
* `Category`:类目轴,适用于离散的类目数据,为该类型时必须通过 `data` 设置类目数据。
|
||||
* `minMaxType`:坐标轴刻度最大最小值显示类型。默认为 `Default`。有以下三种类型:
|
||||
* `Default`:0-最大值。
|
||||
* `MinMax`:最小值-最大值。
|
||||
* `Custom`:自定义的最小值-最大值。
|
||||
* `min`:设定的坐标轴刻度最小值,当 `minMaxType` 为 `Custom` 时有效。
|
||||
* `max`:设定的坐标轴刻度最大值,当 `minMaxType` 为 `Custom` 时有效。
|
||||
* `splitNumber`:坐标轴的分割段数。默认为 `5`。
|
||||
* `interval`:强制设置坐标轴分割间隔。无法在类目轴中使用。设置改值时 `splitNumber` 无效。
|
||||
* `splitLineType`:分割线类型。默认为 `Dashed`。支持以下五种类型:
|
||||
* `None`:不显示分割线。
|
||||
* `Solid`:实线。
|
||||
* `Dashed`:虚线。
|
||||
* `Dotted`:点线。
|
||||
* `DashDot`:点划线。
|
||||
* `DashDotDot`:双点划线。
|
||||
* `boundaryGap`:坐标轴两边是否留白。默认为 `false`。
|
||||
* `data`:类目数据,在类目轴(`type: 'Category'`)中有效。
|
||||
* `axisLine`:坐标轴轴线相关配置 [AxisLine](#AxisLine)。
|
||||
* `axisName`:坐标轴名称相关配置 [AxisName](#AxisName)。
|
||||
* `axisTick`:坐标轴刻度相关配置 [AxisTick](#AxisTick)。
|
||||
* `axisLabel`:坐标轴刻度标签 [AxisLabel](#AxisLabel)。
|
||||
* `splitArea`:坐标轴轴线坐标轴分割区域 [SplitArea](#SplitArea)。
|
||||
|
||||
相关接口:
|
||||
|
||||
* `ClearData()`:清空类目数据。
|
||||
* `IsCategory()`:是否为类目轴。
|
||||
* `IsValue()`:是否为数值轴。
|
||||
* `AddData(string category, int maxDataNumber)`:添加一个类目到类目数据列表。
|
||||
|
||||
## `Series`
|
||||
|
||||
系列列表。每个系列通过 type 决定自己的图表类型。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:系列的图表类型。有以下几种类型:
|
||||
* `Line`:折线图。
|
||||
* `Bar`:柱状图。
|
||||
* `Pie`:饼图。
|
||||
* `Radar`:雷达图。
|
||||
* `Scatter`:散点图。
|
||||
* `EffectScatter`:带有涟漪特效动画的散点图。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `stack`:数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。
|
||||
* `axisIndex`:使用的坐标轴轴的 `index`,在单个图表实例中存在多个坐标轴轴的时候有用。
|
||||
* `radarIndex`:雷达图所使用的 `radar` 组件的 `index`。
|
||||
* `minShow`:系列显示数据的最小索引。
|
||||
* `maxShow`:系列显示数据的最大索引。
|
||||
* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。
|
||||
* `sampleDist`采样的最小水平像素距离,默认为`0`时不采样。当两个数据点间的水平像素距离小于该值时,开启采样,保证两点间的水平像素距离不小于该值。
|
||||
* `sampleType`:采样类型。当`sampleDist`大于`0`时有效。支持以下五种采样类型:
|
||||
* `Peak`:取峰值。当过滤点的平均值大于等于`sampleAverage`时,取最大值;反之取最小值。
|
||||
* `Average`:取过滤点的平均值。
|
||||
* `Max`:取过滤点的最大值。
|
||||
* `Min`:取过滤点的最小值。
|
||||
* `Sum`:取过滤点之和。
|
||||
* `sampleAverage`:设定的采样平均值。当 `sampleType` 为 `Peak` 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为`0`时会实时计算所有数据的平均值。
|
||||
* `areaStyle`:区域填充样式 [AreaStyle](#AreaStyle)。
|
||||
* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `lineType`:折线图样式类型。支持以下十种类型:
|
||||
* `Normal`:普通折线图。
|
||||
* `Smooth`:平滑曲线。
|
||||
* `SmoothDash`:平滑虚线。
|
||||
* `StepStart`:阶梯线图:当前点。
|
||||
* `StepMiddle`:阶梯线图:当前点和下一个点的中间。
|
||||
* `StepEnd`:阶梯线图:下一个拐点。
|
||||
* `Dash`:虚线。
|
||||
* `Dot`:点线。
|
||||
* `DashDot`:点划线。
|
||||
* `DashDotDot`:双点划线。
|
||||
* `lineStyle`:线条样式 [LineStyle](#LineStyle)。
|
||||
* `barType`:柱状图类型。以下几种类型:
|
||||
* `Normal`:普通柱状图。
|
||||
* `Zebra`:斑马柱状图。
|
||||
* `Capsule`:胶囊柱状图。
|
||||
* `barPercentStack`:是否百分比堆叠柱状图,相同 `stack` 的 `serie` 只要有一个 `barPercentStack` 为 `true`,则就显示成百分比堆叠柱状图。
|
||||
* `barWidth`:柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。
|
||||
* `barGap`:不同系列的柱间距离。为百分比(如 `'0.3f'`,表示柱子宽度的 `30%`)。如果想要两个系列的柱子重叠,可以设置 `barGap` 为 `'-1f'`。这在用柱子做背景的时候有用。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。
|
||||
* `barCategoryGap`:同一系列的柱间距离,默认为类目间距的20%,可设固定值。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。
|
||||
* `barZebraWidth`:斑马线的粗细。`barType` 为 `Zebra` 时有效。
|
||||
* `barZebraGap`:斑马线的间距。`barType` 为 `Zebra` 时有效。
|
||||
* `pieClickOffset`:鼠标点击时是否开启偏移,一般用在PieChart图表中。
|
||||
* `pieRoseType`:是否展示成南丁格尔图,通过半径区分数据大小。
|
||||
* `pieSpace`:饼图项间的空隙留白。
|
||||
* `pieCenter`:饼图的中心点。
|
||||
* `pieRadius`:饼图的半径。`radius[0]` 表示内径,`radius[1]` 表示外径。
|
||||
* `roundCap`:启用圆弧效果。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `lineArrow`:折线图的箭头 [LineArrow](#LineArrow)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Line`
|
||||
|
||||
折线图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Line`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `stack`:数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。
|
||||
* `axisIndex`:使用的坐标轴轴的 `index`,在单个图表实例中存在多个坐标轴轴的时候有用。
|
||||
* `minShow`:系列显示数据的最小索引。
|
||||
* `maxShow`:系列显示数据的最大索引。
|
||||
* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。
|
||||
* `sampleDist`采样的最小水平像素距离,默认为`0`时不采样。当两个数据点间的水平像素距离小于该值时,开启采样,保证两点间的水平像素距离不小于该值。
|
||||
* `sampleType`:采样类型。当`sampleDist`大于`0`时有效。支持以下五种采样类型:
|
||||
* `Peak`:取峰值。当过滤点的平均值大于等于`sampleAverage`时,取最大值;反之取最小值。
|
||||
* `Average`:取过滤点的平均值。
|
||||
* `Max`:取过滤点的最大值。
|
||||
* `Min`:取过滤点的最小值。
|
||||
* `Sum`:取过滤点之和。
|
||||
* `sampleAverage`:设定的采样平均值。当 `sampleType` 为 `Peak` 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为`0`时会实时计算所有数据的平均值。
|
||||
* `clip`:是否裁剪超出坐标系部分的图形。
|
||||
* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`:忽略数据的默认值。当 `ignore` 为 `true` 才有效。
|
||||
* `areaStyle`:区域填充样式 [AreaStyle](#AreaStyle)。
|
||||
* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `lineType`:折线图样式类型。支持以下十种类型:
|
||||
* `Normal`:普通折线图。
|
||||
* `Smooth`:平滑曲线。
|
||||
* `SmoothDash`:平滑虚线。
|
||||
* `StepStart`:阶梯线图:当前点。
|
||||
* `StepMiddle`:阶梯线图:当前点和下一个点的中间。
|
||||
* `StepEnd`:阶梯线图:下一个拐点。
|
||||
* `Dash`:虚线。
|
||||
* `Dot`:点线。
|
||||
* `DashDot`:点划线。
|
||||
* `DashDotDot`:双点划线。
|
||||
* `lineStyle`:线条样式 [LineStyle](#LineStyle)。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `lineArrow`:折线图的箭头 [LineArrow](#LineArrow)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Bar`
|
||||
|
||||
折线图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Bar`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `stack`:数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。
|
||||
* `axisIndex`:使用的坐标轴轴的 `index`,在单个图表实例中存在多个坐标轴轴的时候有用。
|
||||
* `minShow`:系列显示数据的最小索引。
|
||||
* `maxShow`:系列显示数据的最大索引。
|
||||
* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。
|
||||
* `barType`:柱状图类型。以下几种类型:
|
||||
* `Normal`:普通柱状图。
|
||||
* `Zebra`:斑马柱状图。
|
||||
* `Capsule`:胶囊柱状图。
|
||||
* `barPercentStack`:是否百分比堆叠柱状图,相同 `stack` 的 `serie` 只要有一个 `barPercentStack` 为 `true`,则就显示成百分比堆叠柱状图。
|
||||
* `barWidth`:柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。
|
||||
* `barGap`:不同系列的柱间距离。为百分比(如 `'0.3f'`,表示柱子宽度的 `30%`)。如果想要两个系列的柱子重叠,可以设置 `barGap` 为 `'-1f'`。这在用柱子做背景的时候有用。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。
|
||||
* `barCategoryGap`:同一系列的柱间距离,默认为类目间距的20%,可设固定值。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。
|
||||
* `barZebraWidth`:斑马线的粗细。`barType` 为 `Zebra` 时有效。
|
||||
* `barZebraGap`:斑马线的间距。`barType` 为 `Zebra` 时有效。
|
||||
* `clip`:是否裁剪超出坐标系部分的图形。
|
||||
* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `itemStyle`:柱条样式 [ItemStyle](#ItemStyle)。
|
||||
* `areaStyle`:区域填充样式 [AreaStyle](#AreaStyle)。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Pie`
|
||||
|
||||
饼图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Pie`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `pieRoseType`:南丁格尔玫瑰图类型,支持以下类型:
|
||||
* `None`:不展示成南丁格尔玫瑰图。
|
||||
* `Radius`:扇区圆心角展现数据的百分比,半径展现数据的大小。
|
||||
* `Area`:所有扇区圆心角相同,仅通过半径展现数据大小。
|
||||
* `space`:扇区间隙。
|
||||
* `center`:中心点坐标。当值为0-1的浮点数时表示百分比。
|
||||
* `radius`:半径。`radius[0]`为内径,`radius[1]`为外径。当内径大于0时即为圆环图。
|
||||
* `roundCap`:是否启用圆弧效果。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Radar`
|
||||
|
||||
雷达图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Radar`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `radarIndex`:雷达图所使用的 `radar` 组件的 `index`。
|
||||
* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `lineStyle`:线条样式 [LineStyle](#LineStyle)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Scatter`
|
||||
|
||||
散点图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Scatter`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `clip`:是否裁剪超出坐标系部分的图形。
|
||||
* `symbol`:标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Heatmap`
|
||||
|
||||
热力图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Scatter`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Gauge`
|
||||
|
||||
仪表盘系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Gauge`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `gaugeType`:仪表盘类型,支持以下类型:
|
||||
* `Pointer`:指针类型。
|
||||
* `ProgressBar`:进度条类型。
|
||||
* `center`:中心点坐标。当值为0-1的浮点数时表示百分比。
|
||||
* `radius`:仪表盘半径。
|
||||
* `min`:最小的数据值。映射到startAngle。
|
||||
* `max`:最大的数据值。映射到endAngle。
|
||||
* `startAngle`:仪表盘起始角度。和时钟一样,12点钟位置是0度,顺时针到360度。
|
||||
* `endAngle`:仪表盘结束角度。和时钟一样,12点钟位置是0度,顺时针到360度。
|
||||
* `splitNumber`:仪表盘刻度分割段数。
|
||||
* `roundCap`:是否启用圆弧效果。
|
||||
* `titleStyle`:仪表盘标题 [TitleStyle](#TitleStyle)。
|
||||
* `gaugeAxis`: 仪表盘坐标轴 [GaugeAxis](#GaugeAxis)。
|
||||
* `gaugePointer`:仪表盘指针 [GaugePointer](#GaugePointer)。
|
||||
* `itemStyle`:仪表盘指针样式 [ItemStyle](#ItemStyle)。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。仪表盘的数据一般只有一个,值通过`label`样式显示,`name`通过`titleStyle`样式显示。
|
||||
|
||||
## `Serie-Ring`
|
||||
|
||||
环形图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Ring`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `center`:中心点坐标。当值为0-1的浮点数时表示百分比。
|
||||
* `radius`:仪表盘半径。
|
||||
* `startAngle`:仪表盘起始角度。和时钟一样,12点钟位置是0度,顺时针到360度。
|
||||
* `ringGap`:环形图的环间隙。
|
||||
* `roundCap`:是否启用圆弧效果。
|
||||
* `clockwise`:是否顺时针,默认为`true`。
|
||||
* `titleStyle`:环形图中心标题 [TitleStyle](#TitleStyle)。
|
||||
* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。环形图的数据只有二维,`data[0]`表示当前值,`data[1]`表示最大值。
|
||||
|
||||
## `Settings`
|
||||
|
||||
全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。
|
||||
|
||||
* `lineSmoothStyle`:曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。
|
||||
* `lineSmoothness`:曲线平滑度。值越小曲线越平滑,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。
|
||||
* `lineSegmentDistance`: 线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。
|
||||
* `cicleSmoothness`:圆形(包括扇形、环形等)的平滑度。数越小圆越平滑,但顶点数也会随之增加。
|
||||
|
||||
## `SerieAnimation`
|
||||
|
||||
* `enable`:是否开启动画系统。
|
||||
* ~~`threshold`:是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。~~
|
||||
* `fadeInDelay`:设定的渐入动画延时,单位毫秒。
|
||||
* `fadeInDuration`:设定的渐入动画时长,单位毫秒。
|
||||
* `fadeOutDuration`:设定的渐出动画时长,单位毫秒。
|
||||
* `dataChangeEnable`:是否开启数据变更动画。
|
||||
* `dataChangeDuration`:数据变更动画时长,单位毫秒。
|
||||
|
||||
## `AreaStyle`
|
||||
|
||||
* `show`:是否显示区域填充。
|
||||
* `origin`:区域填充的起始位置 `AreaOrigin`。有以下三种填充方式:
|
||||
* `Auto`:填充坐标轴轴线到数据间的区域。
|
||||
* `Start`:填充坐标轴底部到数据间的区域。
|
||||
* `End`:填充坐标轴顶部到数据间的区域。
|
||||
* `color`:区域填充的颜色,默认取 `serie` 对应的颜色。如果 `toColor` 不是默认值,则表示渐变色的起点颜色。
|
||||
* `toColor`:区域填充的渐变色的终点颜色。
|
||||
* `highlightColor`:高亮时区域填充的颜色,默认取 `serie` 对应的颜色。如果 `highlightToColor` 不是默认值,则表示渐变色的起点颜色。
|
||||
* `highlightToColor`:高亮时区域填充的渐变色的终点颜色。
|
||||
* `opacity`:图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。
|
||||
* `tooltipHighlight`:鼠标悬浮时是否高亮之前的区域。
|
||||
|
||||
## `AxisLabel`
|
||||
|
||||
* `show`:是否显示刻度标签。
|
||||
* `interval`:坐标轴刻度标签的显示间隔,在类目轴中有效。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。
|
||||
* `inside`:刻度标签是否朝内,默认朝外。
|
||||
* `rotate`:刻度标签旋转的角度,在类目轴的类目标签显示不下的时候可以通过旋转防止标签之间重叠。
|
||||
* `margin`:刻度标签与轴线之间的距离。
|
||||
* `color`:刻度标签文字的颜色,默认取主题Theme的axisTextColor。
|
||||
* `fontSize`:文字的字体大小。
|
||||
* `fontStyle`:文字字体的风格。
|
||||
* `formatter`:图例内容字符串模版格式器。支持用 \n 换行。模板变量为图例名称 {value},支持{value:f0},{value:f1},{value:f2}。
|
||||
* `forceENotation`:是否强制使用科学计数法格式化显示数值。默认为false,当小数精度大于3时才采用科学计数法。
|
||||
* `textLimit`:文本自适应 [TextLimit](#TextLimit)。只在类目轴中有效。
|
||||
|
||||
## `AxisLine`
|
||||
|
||||
* `show`:是否显示坐标轴轴线。
|
||||
* `onZero`:X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上,只有在另一个轴为数值轴且包含 0 刻度时有效。
|
||||
* `width`:坐标轴线线宽。
|
||||
* `symbol`:是否显示箭头。
|
||||
* `symbolWidth`:箭头宽。
|
||||
* `symbolHeight`:箭头高。
|
||||
* `symbolOffset`:箭头偏移。
|
||||
* `symbolDent`:箭头的凹陷程度。
|
||||
|
||||
## `AxisName`
|
||||
|
||||
* `show`:是否显示坐标名称。
|
||||
* `name`:坐标轴名称。
|
||||
* `location`:坐标轴名称的位置。支持以下类型:
|
||||
* `Start`:坐标轴起始处。
|
||||
* `Middle`:坐标轴中间。
|
||||
* `End`:坐标轴末端。
|
||||
* `offset`:坐标轴名称与轴线之间的偏移。
|
||||
* `rotate`:坐标轴名字旋转,角度值。
|
||||
* `color`:坐标轴名称的文字颜色。
|
||||
* `fontSize`:坐标轴名称的文字大小。
|
||||
* `fontStyle`:坐标轴名称的文字风格。
|
||||
|
||||
## `AxisSplitLine`
|
||||
|
||||
* `show`:是否显示坐标分割线。
|
||||
* `interval`:分割线的显示间隔。0表示显示所有分割线,1表示隔一个隔显示一个分割线,以此类推。
|
||||
* `lineStyle`:线条样式 [LineStyle](#LineStyle)。
|
||||
|
||||
## `AxisSplitArea`
|
||||
|
||||
* `show`:是否显示坐标分割区域。
|
||||
* `color`:分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
|
||||
|
||||
## `AxisTick`
|
||||
|
||||
* `show`:是否显示坐标轴刻度。
|
||||
* `alignWithLabel`:类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐。
|
||||
* `inside`:坐标轴刻度是否朝内,默认朝外。
|
||||
* `length`:坐标轴刻度的长度。
|
||||
|
||||
## `Emphasis`
|
||||
|
||||
* `show`:是否启用高亮样式。
|
||||
* `label`:图形文本标签样式 [SerieLabel](#SerieLabel)。
|
||||
* `itemStyle`:图形样式 [ItemStyle](#ItemStyle)。
|
||||
|
||||
## `ItemStyle`
|
||||
|
||||
* `show`:是否启用。
|
||||
* `color`:颜色。
|
||||
* `backgroundColor`:背景颜色。
|
||||
* `backgroundWidth`:背景的宽。
|
||||
* `centerColor`:中心区域的颜色。如环形图的中心区域。
|
||||
* `centerGap`:中心区域的间隙。如环形图的中心区域于最内环的间隙。
|
||||
* `borderType`:边框的类型。
|
||||
* `borderColor`:边框的颜色。
|
||||
* `borderWidth`:边框宽。
|
||||
* `opacity`:透明度。
|
||||
|
||||
## `LineArrow`
|
||||
|
||||
* `show`:是否显示箭头。
|
||||
* `position`:箭头显示位置。支持以下两种位置:
|
||||
* `End`:末端显示。最后一个数据上显示箭头。
|
||||
* `Start`:起始端显示。第一个数据上显示箭头。
|
||||
* `width`:箭头宽。
|
||||
* `height`:箭头长。
|
||||
* `offset`:箭头偏移。默认箭头的中心点和数据坐标点一致,可通过 `offset` 调整偏移。
|
||||
* `dent`:箭头的凹度。
|
||||
|
||||
## `LineStyle`
|
||||
|
||||
* `show`:是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。
|
||||
* `type`:线条类型。支持以下五种类型:
|
||||
* `None`:不显示分割线。
|
||||
* `Solid`:实线。
|
||||
* `Dashed`:虚线。
|
||||
* `Dotted`:点线。
|
||||
* `DashDot`:点划线。
|
||||
* `DashDotDot`:双点划线。
|
||||
* `color`:线条颜色。默认和 `serie` 一致。
|
||||
* `width`:线条宽。
|
||||
* `opacity`:线条的透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。
|
||||
|
||||
## `Location`
|
||||
|
||||
* `align`:对齐方式。有以下对齐方式。
|
||||
* `TopLeft`:左上角对齐。
|
||||
* `TopRight`:右上角对齐。
|
||||
* `TopCenter`:置顶居中对齐。
|
||||
* `BottomLeft`:左下对齐。
|
||||
* `BottomRight`:右下对齐。
|
||||
* `BottomCenter`:底部居中对齐。
|
||||
* `Center`:居中对齐。
|
||||
* `CenterLeft`:中部靠左对齐。
|
||||
* `CenterRight`:中部靠右对齐。
|
||||
* `left`:离容器左侧的距离。
|
||||
* `right`:离容器右侧的距离。
|
||||
* `top`:离容器上侧的距离。
|
||||
* `bottom`:离容器下侧的距离。
|
||||
|
||||
## `SerieData`
|
||||
|
||||
* `name`:数据项名称。
|
||||
* `selected`:该数据项是否被选中。
|
||||
* `radius`:自定义半径。可用在饼图中自定义某个数据项的半径。
|
||||
* `showIcon`:是否显示图标。
|
||||
* `iconImage`:图标的图片。
|
||||
* `iconColor`:图标颜色。
|
||||
* `iconWidth`:图标宽。
|
||||
* `iconHeight`:图标高。
|
||||
* `iconOffset`:图标偏移。
|
||||
|
||||
## `SerieLabel`
|
||||
|
||||
* `show`:是否显示文本标签。
|
||||
* `position`:标签的位置。折线图时强制默认为 `Center`,支持以下 `5` 种位置:
|
||||
* `Outside`:饼图扇区外侧,通过视觉引导线连到相应的扇区。只在饼图种可用。
|
||||
* `Inside`:饼图扇区内部。只在饼图可用。
|
||||
* `Center`:在中心位置(折线图,柱状图,饼图)。
|
||||
* `Top`:顶部(柱状图)。
|
||||
* `Bottom`:底部(柱状图)。
|
||||
* `formatter`:标签内容字符串模版格式器。支持用 `\n` 换行。模板变量有:`{a}`:系列名;`{b}`:数据名;`{c}`:数据值;`{d}`:百分比。示例:`{b}:{c:f1}`。
|
||||
* `offset`:距离图形元素的偏移。
|
||||
* `color`:自定义文字颜色,默认和系列的颜色一致。
|
||||
* `backgroundColor`:标签的背景色,默认无颜色。
|
||||
* `backgroundWidth`:标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。
|
||||
* `backgroundHeight`:标签的背景高度。一般不用指定,不指定时则自动是文字的高度。
|
||||
* `rotate`:标签的旋转。
|
||||
* `paddingLeftRight`:标签文字和边框的左右边距。
|
||||
* `paddingTopBottom`:标签文字和边框的上下边距。
|
||||
* `fontSize`:标签文字的字体大小。
|
||||
* `fontStyle`:标签文字的字体风格。
|
||||
* `line`:是否显示视觉引导线。在 `label` 位置 设置为 `'Outside'` 的时候会显示视觉引导线。
|
||||
* `lineType`:视觉引导线类型。支持以下几种类型:
|
||||
* `BrokenLine`:折线。
|
||||
* `Curves`:曲线。
|
||||
* `HorizontalLine`:水平线。
|
||||
* `lineColor`:视觉引导线自定义颜色。
|
||||
* `lineWidth`:视觉引导线的宽度。
|
||||
* `lineLength1`:视觉引导线第一段的长度。
|
||||
* `lineLength2`:视觉引导线第二段的长度。
|
||||
* `border`:是否显示边框。
|
||||
* `borderWidth`:边框宽度。
|
||||
* `borderColor`:边框颜色。
|
||||
* `forceENotation`:是否强制使用科学计数法格式化显示数值。默认为false,当小数精度大于3时才采用科学计数法。
|
||||
|
||||
## `SerieSymbol`
|
||||
|
||||
* `type`:标记类型。支持以下六种类型:
|
||||
* `EmptyCircle`:空心圆。
|
||||
* `Circle`:实心圆。
|
||||
* `Rect`:正方形。
|
||||
* `Triangle`:三角形。
|
||||
* `Diamond`:菱形。
|
||||
* `None`:不显示标记。
|
||||
* `gap`:图形标记的外留白距离。
|
||||
* `sizeType`:标记图形的大小获取方式。支持以下三种类型:
|
||||
* `Custom`:自定义大小。
|
||||
* `FromData`:通过 `dataIndex` 从数据中获取,再乘以一个比例系数 `dataScale` 。
|
||||
* `Callback`:通过回调函数 `sizeCallback` 获取。
|
||||
* `size`:标记的大小。
|
||||
* `selectedSize`:被选中的标记的大小。
|
||||
* `dataIndex`:当 `sizeType` 指定为 `FromData` 时,指定的数据源索引。
|
||||
* `dataScale`:当 `sizeType` 指定为 `FromData` 时,指定的倍数系数。
|
||||
* `selectedDataScale`:当 `sizeType` 指定为 `FromData` 时,指定的高亮倍数系数。
|
||||
* `sizeCallback`:当 `sizeType` 指定为 `Callback` 时,指定的回调函数。
|
||||
* `selectedSizeCallback`:当 `sizeType` 指定为 `Callback` 时,指定的高亮回调函数。
|
||||
* `color`:标记图形的颜色,默认和系列一致。
|
||||
* `opacity`:图形标记的透明度。
|
||||
* `startIndex`:开始显示图形标记的索引。
|
||||
* `interval`:显示图形标记的间隔。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。
|
||||
* `forceShowLast`:是否强制显示最后一个图形标记。默认为 `false`。
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f74b65f3be5d64689a5db6bdbc91df3e
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,130 +0,0 @@
|
||||
# XCharts问答
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
|
||||
[QA 1:如何调整坐标轴与背景的边距?](#如何调整坐标轴与背景的边距)
|
||||
[QA 2:如何让初始动画重新播放?](#如何让初始动画重新播放)
|
||||
[QA 3:如何自定义折线图、饼图等数据项的颜色?](#如何自定义折线图、饼图等数据项的颜色)
|
||||
[QA 4:如何格式化文字,如我想给坐标轴标签加上单位?](#如何格式化文字,如我想给坐标轴标签加上单位)
|
||||
[QA 5:如何让柱形图的柱子堆叠显示?](#如何让柱形图的柱子堆叠显示)
|
||||
[QA 6:如何让柱形图的柱子同柱但不重叠?](#如何让柱形图的柱子同柱但不重叠)
|
||||
[QA 7:如何调整柱形图的柱子宽度和间距?](#如何调整柱形图的柱子宽度和间距)
|
||||
[QA 8:如何调整柱形图单个柱子的颜色?](#如何调整柱形图单个柱子的颜色)
|
||||
[QA 9:如何调整图表的对齐方式?](#如何调整图表的对齐方式)
|
||||
[QA 10:可以显示超过1000以上的大数据吗?](#可以显示超过1000以上的大数据吗)
|
||||
[QA 11:折线图可以画虚线、点线、点划线吗?](#折线图可以画虚线、点线、点划线吗)
|
||||
[QA 12:如何限定Y轴(Value轴)的值范围?](#如何限定Y轴(Value轴)的值范围)
|
||||
[QA 13:如何自定义数值轴刻度大小?](#如何自定义数值轴刻度大小)
|
||||
[QA 14:如何在数据项顶上显示文本?](#如何在数据项顶上显示文本)
|
||||
[QA 15:如何给数据项自定义图标?](#如何给数据项自定义图标)
|
||||
[QA 16:锯齿太严重,如何让图表更顺滑?](#锯齿太严重,如何让图表更顺滑)
|
||||
[QA 17:为什么鼠标移上图表Tooltip不显示?](#为什么鼠标移上图表`Tooltip`不显示)
|
||||
[QA 18:如何取消Tooltip的竖线?](#如何取消`Tooltip`的竖线)
|
||||
[QA 19:如何让Y轴(数值轴)显示多位小数?](#如何让Y轴(数值轴)显示多位小数)
|
||||
[QA 20:如何用代码动态更新数据?](#如何用代码动态更新数据)
|
||||
[QA 21:如何显示图例?](#如何显示图例)
|
||||
[QA 22:如何做成预设?](#如何做成预设)
|
||||
[QA 23:如何在图表上画点画线等自定义内容?](#如何在图表上画点画线等自定义内容)
|
||||
[QA 24:如何实现心电图类似的数据移动效果?](#如何实现心电图类似的数据移动效果)
|
||||
|
||||
## 如何调整坐标轴与背景的边距
|
||||
|
||||
答:`Grid`组件,可调整上下左右边距。
|
||||
|
||||
## 如何让初始动画重新播放
|
||||
|
||||
答:调用`AnimationReset()`接口。
|
||||
|
||||
## 如何自定义折线图、饼图等数据项的颜色
|
||||
|
||||
答:通过`Theme`的`colorPalette`调整,或者部分`Serie`下的`LineStyle`和`ItemStyle`。
|
||||
|
||||
## 如何格式化文字,如我想给坐标轴标签加上单位
|
||||
|
||||
答:通过`formatter`参数,在`Legend`、`Axis`的`AxisLabel`、`Tooltop`、`Serie`的`Label`都提供改参数的配置。
|
||||
|
||||
## 如何让柱形图的柱子堆叠显示
|
||||
|
||||
答:设置`Serie`下的`stack`,`stack`相同的`serie`会堆叠显示在一个柱子上。
|
||||
|
||||
## 如何让柱形图的柱子同柱但不重叠
|
||||
|
||||
答:设置`Serie`下的`barGap`为`-1`,`stack`为空。
|
||||
|
||||
## 如何调整柱形图的柱子宽度和间距
|
||||
|
||||
答:调整`Serie`下的`barWidth`和`barGap`,多个`serie`时最后一个`serie`的`barWidth`和`barGap`有效。
|
||||
|
||||
## 如何调整柱形图单个柱子的颜色
|
||||
|
||||
答:目前暂不支持调整单子柱子的颜色,但可以通过两个`serie`同柱不堆叠来实现,通过设置数据项为`0`来达到类似效果。
|
||||
|
||||
## 如何调整图表的对齐方式
|
||||
|
||||
答:默认为左下角对齐,暂不支持调整。可以通过包一层parent来辅助控制。
|
||||
|
||||
## 可以显示超过1000以上的大数据吗
|
||||
|
||||
答:可以。但`UGUI`对单个`Graphic`限制`65000`个顶点,所以太多的数据不一定能显示完全。可通过设置采样距离`sampleDist`开启采样简化过密曲线。也可以通过设置一些参数来减少图表的顶点数有助于显示更多数据。如缩小图表的尺寸,关闭或减少坐标轴的客户端绘制,关闭`Serie`的`symbol`和`label`显示等。折线图的普通线图`Normal`比平滑线图`Smooth`占用顶点数更少。
|
||||
|
||||
## 折线图可以画虚线、点线、点划线吗
|
||||
|
||||
答:可以。通过`Serie`下的`lineType`选择线条样式。当要显示的数据过多(成千以上)数据间过密时建议使用`Normal`或者`Step`样式。
|
||||
|
||||
## 如何限定Y轴(Value轴)的值范围
|
||||
|
||||
答:设置`Axis`下的`minMaxType`为`Custom`,自定义`min`和`max`。
|
||||
|
||||
## 如何自定义数值轴刻度大小
|
||||
|
||||
答:默认时通过`Axis`下的`splitNumer`进行自动划分。也可以设置`interval`自定义刻度大小。
|
||||
|
||||
## 如何在数据项顶上显示文本
|
||||
|
||||
答:通过设置`Serie`下的`Label`。
|
||||
|
||||
## 如何给数据项自定义图标
|
||||
|
||||
答:通过设置`Serie`的`data`下的数据项可单独设置`icon`相关参数。
|
||||
|
||||
## 锯齿太严重,如何让图表更顺滑
|
||||
|
||||
答:开启抗锯齿设置。调整UI渲染模式为Camera模式,开启MSAA,设置4倍或更高抗锯齿。锯齿只能减少难以避免,像素越高锯齿越不明显。
|
||||
|
||||
## 为什么鼠标移上图表`Tooltip`不显示
|
||||
|
||||
答:确认`Tooltip`是否开启。确认父节点是否关闭了鼠标事件。
|
||||
|
||||
## 如何取消`Tooltip`的竖线
|
||||
|
||||
答:设置`Tooltip`的`type`为`None`。
|
||||
|
||||
## 如何让Y轴(数值轴)显示多位小数
|
||||
|
||||
答:设置`Axis`下的`AxisLabel`中的`formatter`为`{value:f1}`或`{value:f2}`
|
||||
|
||||
## 如何用代码动态更新数据
|
||||
|
||||
答:请查阅`Demo`下的代码,`Demo10_LineSimple.cs`就是一个简单添加数据构建折线图的例子,其他`Demo`也都是通过代码控制不同的组件实现不同的功能。
|
||||
|
||||
## 如何显示图例
|
||||
|
||||
答:首先,你的`serie`里的`name`需有值不为空。然后开启`Legend`显示,里面的`data`可以默认为空,表示显示所有的图例。如果你只想显示部分`serie`的图例,在`data`中填入要显示的图例即可。
|
||||
|
||||
## 如何做成预设
|
||||
|
||||
答:请删除chart下所有的子组件再拖成预设。
|
||||
|
||||
## 如何在图表上画点画线等自定义内容
|
||||
|
||||
答:xcharts有自定义绘制回调`customDrawCallback`,具体可参考`Demo12_CustomDrawing.cs`
|
||||
|
||||
## 如何实现心电图类似的数据移动效果
|
||||
|
||||
答:axis和serie都设置相同的maxCache。maxCache可固定数据个数,当数据超过设定时会先删除第一个在添加新数据,实现数据移动效果。
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
@@ -1,34 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI BarChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(BarChart), false)]
|
||||
public class BarChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_Target = (BarChart)target;
|
||||
}
|
||||
|
||||
protected override void OnEndInspectorGUI()
|
||||
{
|
||||
base.OnEndInspectorGUI();
|
||||
if (m_Target == null && target == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5acea6fd06c0e9c498c434f941e4cba9
|
||||
timeCreated: 1554219116
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,92 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI BaseChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(BaseChart), false)]
|
||||
public class BaseChartEditor : Editor
|
||||
{
|
||||
protected BaseChart m_Target;
|
||||
protected SerializedProperty m_Script;
|
||||
protected SerializedProperty m_ChartWidth;
|
||||
protected SerializedProperty m_ChartHeight;
|
||||
protected SerializedProperty m_Theme;
|
||||
protected SerializedProperty m_ThemeInfo;
|
||||
protected SerializedProperty m_Title;
|
||||
protected SerializedProperty m_Legend;
|
||||
protected SerializedProperty m_Tooltip;
|
||||
protected SerializedProperty m_Series;
|
||||
protected SerializedProperty m_Settings;
|
||||
protected SerializedProperty m_Large;
|
||||
|
||||
protected float m_DefaultLabelWidth;
|
||||
protected float m_DefaultFieldWidth;
|
||||
private int m_SeriesSize;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
m_Target = (BaseChart)target;
|
||||
m_Script = serializedObject.FindProperty("m_Script");
|
||||
m_ChartWidth = serializedObject.FindProperty("m_ChartWidth");
|
||||
m_ChartHeight = serializedObject.FindProperty("m_ChartHeight");
|
||||
m_Theme = serializedObject.FindProperty("m_Theme");
|
||||
m_ThemeInfo = serializedObject.FindProperty("m_ThemeInfo");
|
||||
m_Title = serializedObject.FindProperty("m_Title");
|
||||
m_Legend = serializedObject.FindProperty("m_Legend");
|
||||
m_Tooltip = serializedObject.FindProperty("m_Tooltip");
|
||||
m_Series = serializedObject.FindProperty("m_Series");
|
||||
|
||||
m_Large = serializedObject.FindProperty("m_Large");
|
||||
m_Settings = serializedObject.FindProperty("m_Settings");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (m_Target == null && target == null)
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
return;
|
||||
}
|
||||
serializedObject.Update();
|
||||
m_DefaultLabelWidth = EditorGUIUtility.labelWidth;
|
||||
m_DefaultFieldWidth = EditorGUIUtility.fieldWidth;
|
||||
|
||||
OnStartInspectorGUI();
|
||||
OnMiddleInspectorGUI();
|
||||
OnEndInspectorGUI();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
protected virtual void OnStartInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.PropertyField(m_Script);
|
||||
EditorGUILayout.PropertyField(m_ChartWidth);
|
||||
EditorGUILayout.PropertyField(m_ChartHeight);
|
||||
EditorGUILayout.PropertyField(m_ThemeInfo, true);
|
||||
EditorGUILayout.PropertyField(m_Title, true);
|
||||
EditorGUILayout.PropertyField(m_Legend, true);
|
||||
EditorGUILayout.PropertyField(m_Tooltip, true);
|
||||
}
|
||||
|
||||
protected virtual void OnMiddleInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.PropertyField(m_Series, true);
|
||||
EditorGUILayout.PropertyField(m_Settings, true);
|
||||
}
|
||||
|
||||
protected virtual void OnEndInspectorGUI()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
public class CheckVersionEditor : EditorWindow
|
||||
{
|
||||
private Vector2 scrollPos;
|
||||
private static CheckVersionEditor window;
|
||||
|
||||
[MenuItem("Component/XCharts/Check For Update")]
|
||||
private static void ShowWindow()
|
||||
{
|
||||
window = GetWindow<CheckVersionEditor>();
|
||||
window.titleContent = new GUIContent("XCharts Check For Update");
|
||||
window.minSize = new Vector2(550, window.minSize.y);
|
||||
window.Show();
|
||||
XChartsMgr.Instance.CheckVersion();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
var mgr = XChartsMgr.Instance;
|
||||
GUILayout.Label("");
|
||||
GUILayout.Label("当前版本:" + mgr.nowVersion);
|
||||
if (mgr.needUpdate && !mgr.isCheck)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("最新版本:" + mgr.newVersion);
|
||||
if (mgr.isCheck) GUILayout.Label("检测中...");
|
||||
else GUILayout.Label("有更新!");
|
||||
if (GUILayout.Button("去Github主页"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Label("");
|
||||
if (!string.IsNullOrEmpty(mgr.desc))
|
||||
{
|
||||
GUILayout.Label(mgr.desc);
|
||||
GUILayout.Label("");
|
||||
}
|
||||
|
||||
scrollPos = GUILayout.BeginScrollView(scrollPos);
|
||||
GUILayout.TextArea(mgr.changeLog);
|
||||
GUILayout.EndScrollView();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mgr.isCheck) GUILayout.Label("最新版本:检测中...");
|
||||
else GUILayout.Label("最新版本:" + mgr.newVersion);
|
||||
|
||||
if (!mgr.needUpdate && !mgr.isCheck)
|
||||
{
|
||||
GUILayout.Label("");
|
||||
GUILayout.Label("已是最新版本!");
|
||||
GUILayout.Label("");
|
||||
if (!string.IsNullOrEmpty(mgr.desc))
|
||||
{
|
||||
GUILayout.Label(mgr.desc);
|
||||
GUILayout.Label("");
|
||||
}
|
||||
if (GUILayout.Button("去Github主页"))
|
||||
{
|
||||
Application.OpenURL(mgr.homepage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98d1061c4167c4fff8ed25c3e8be8756
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,56 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI CoordinateChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(CoordinateChart), false)]
|
||||
public class CoordinateChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Grid;
|
||||
protected SerializedProperty m_MultipleXAxis;
|
||||
protected SerializedProperty m_XAxises;
|
||||
protected SerializedProperty m_MultipleYAxis;
|
||||
protected SerializedProperty m_YAxises;
|
||||
protected SerializedProperty m_DataZoom;
|
||||
protected SerializedProperty m_VisualMap;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_Target = (CoordinateChart)target;
|
||||
m_Grid = serializedObject.FindProperty("m_Grid");
|
||||
m_XAxises = serializedObject.FindProperty("m_XAxises");
|
||||
m_YAxises = serializedObject.FindProperty("m_YAxises");
|
||||
m_DataZoom = serializedObject.FindProperty("m_DataZoom");
|
||||
m_VisualMap = serializedObject.FindProperty("m_VisualMap");
|
||||
}
|
||||
|
||||
protected override void OnStartInspectorGUI()
|
||||
{
|
||||
base.OnStartInspectorGUI();
|
||||
EditorGUILayout.PropertyField(m_DataZoom);
|
||||
EditorGUILayout.PropertyField(m_VisualMap);
|
||||
EditorGUILayout.PropertyField(m_Grid);
|
||||
for (int i = 0; i < m_XAxises.arraySize; i++)
|
||||
{
|
||||
SerializedProperty axis = m_XAxises.GetArrayElementAtIndex(i);
|
||||
EditorGUILayout.PropertyField(axis);
|
||||
}
|
||||
for (int i = 0; i < m_YAxises.arraySize; i++)
|
||||
{
|
||||
SerializedProperty axis = m_YAxises.GetArrayElementAtIndex(i);
|
||||
EditorGUILayout.PropertyField(axis);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1dd7acd8b13f3f14e9891af4e8dd0b0b
|
||||
timeCreated: 1554475249
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,33 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI GaugeChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(GaugeChart), false)]
|
||||
public class GaugeChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Radar;
|
||||
protected SerializedProperty m_Radars;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_Target = (GaugeChart)target;
|
||||
}
|
||||
|
||||
protected override void OnEndInspectorGUI()
|
||||
{
|
||||
base.OnEndInspectorGUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd96c5068df484d1c95748a85d8380a8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,30 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI HeatmapChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(HeatmapChart), false)]
|
||||
public class HeatmapChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_Target = (HeatmapChart)target;
|
||||
}
|
||||
|
||||
protected override void OnEndInspectorGUI()
|
||||
{
|
||||
base.OnEndInspectorGUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1144057dfc00f4572913a63ba5291dd7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI LineChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(LineChart), false)]
|
||||
public class LineChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_Target = (LineChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bd1a238bc5b407408b8f902aa3db9fd
|
||||
timeCreated: 1554539035
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,32 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI PieChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(PieChart), false)]
|
||||
public class PieChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Pie;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
m_Target = (PieChart)target;
|
||||
}
|
||||
|
||||
protected override void OnEndInspectorGUI()
|
||||
{
|
||||
base.OnEndInspectorGUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28de30021bed0f945af09633584fcb44
|
||||
timeCreated: 1554768152
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ad1e8940e4805b49a18ea7a2cbd4bce
|
||||
folderAsset: yes
|
||||
timeCreated: 1554304641
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,79 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieAnimation), true)]
|
||||
public class AnimationDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_AnimationModuleToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
SerializedProperty m_Enable = prop.FindPropertyRelative("m_Enable");
|
||||
//SerializedProperty m_Easting = prop.FindPropertyRelative("m_Easting");
|
||||
SerializedProperty m_FadeInDuration = prop.FindPropertyRelative("m_FadeInDuration");
|
||||
SerializedProperty m_FadeOutDuration = prop.FindPropertyRelative("m_FadeOutDuration");
|
||||
SerializedProperty m_DataChangeEnable = prop.FindPropertyRelative("m_DataChangeEnable");
|
||||
SerializedProperty m_DataChangeDuration = prop.FindPropertyRelative("m_DataChangeDuration");
|
||||
SerializedProperty m_FadeInDelay = prop.FindPropertyRelative("m_FadeInDelay");
|
||||
SerializedProperty m_Threshold = prop.FindPropertyRelative("m_Threshold");
|
||||
SerializedProperty m_ActualDuration = prop.FindPropertyRelative("m_ActualDuration");
|
||||
// SerializedProperty m_CurrDetailProgress = prop.FindPropertyRelative("m_CurrDetailProgress");
|
||||
// SerializedProperty m_DestDetailProgress = prop.FindPropertyRelative("m_DestDetailProgress");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AnimationModuleToggle, prop, null, m_Enable, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_AnimationModuleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
//EditorGUI.PropertyField(drawRect, m_Easting);
|
||||
//drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Threshold);
|
||||
if (m_Threshold.intValue < 0) m_Threshold.intValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FadeInDelay);
|
||||
if (m_FadeInDelay.floatValue < 0) m_FadeInDelay.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FadeInDuration);
|
||||
if (m_FadeInDuration.floatValue < 0) m_FadeInDuration.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FadeOutDuration);
|
||||
if (m_FadeOutDuration.floatValue < 0) m_FadeOutDuration.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_DataChangeEnable);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_DataChangeDuration);
|
||||
if (m_DataChangeDuration.floatValue < 0) m_DataChangeDuration.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
// EditorGUI.LabelField(drawRect, "CurrDetailProgress:" + m_CurrDetailProgress.floatValue);
|
||||
// drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
// EditorGUI.LabelField(drawRect, "DestDetailProgress:" + m_DestDetailProgress.floatValue);
|
||||
// drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.LabelField(drawRect, "Actual duration:" + m_ActualDuration.floatValue + " ms");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_AnimationModuleToggle, prop))
|
||||
return 8 * EditorGUIUtility.singleLineHeight + 7 * EditorGUIUtility.standardVerticalSpacing;
|
||||
else
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AreaStyle), true)]
|
||||
public class AreaStyleDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_AreaStyleToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Origin = prop.FindPropertyRelative("m_Origin");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_ToColor = prop.FindPropertyRelative("m_ToColor");
|
||||
SerializedProperty m_HighlightColor = prop.FindPropertyRelative("m_HighlightColor");
|
||||
SerializedProperty m_HighlightToColor = prop.FindPropertyRelative("m_HighlightToColor");
|
||||
SerializedProperty m_Opacity = prop.FindPropertyRelative("m_Opacity");
|
||||
SerializedProperty m_TooltipHighlight = prop.FindPropertyRelative("m_TooltipHighlight");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AreaStyleToggle, prop, "Area Style", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_AreaStyleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Origin);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ToColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_HighlightColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_HighlightToColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Opacity);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_TooltipHighlight);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AreaStyleToggle, prop))
|
||||
{
|
||||
height += 8 * EditorGUIUtility.singleLineHeight + 7 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,212 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Axis), true)]
|
||||
public class AxisDrawer : PropertyDrawer
|
||||
{
|
||||
private List<bool> m_AxisModuleToggle = new List<bool>();
|
||||
private List<bool> m_DataFoldout = new List<bool>();
|
||||
private int m_DataSize = 0;
|
||||
private bool m_ShowJsonDataArea = false;
|
||||
private string m_JsonDataAreaText;
|
||||
|
||||
|
||||
protected virtual string GetDisplayName(string displayName)
|
||||
{
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
SerializedProperty m_Show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty m_LogBaseE = prop.FindPropertyRelative("m_LogBaseE");
|
||||
SerializedProperty m_LogBase = prop.FindPropertyRelative("m_LogBase");
|
||||
SerializedProperty m_SplitNumber = prop.FindPropertyRelative("m_SplitNumber");
|
||||
SerializedProperty m_Interval = prop.FindPropertyRelative("m_Interval");
|
||||
SerializedProperty m_AxisLabel = prop.FindPropertyRelative("m_AxisLabel");
|
||||
SerializedProperty m_BoundaryGap = prop.FindPropertyRelative("m_BoundaryGap");
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Data");
|
||||
SerializedProperty m_AxisLine = prop.FindPropertyRelative("m_AxisLine");
|
||||
SerializedProperty m_AxisName = prop.FindPropertyRelative("m_AxisName");
|
||||
SerializedProperty m_AxisTick = prop.FindPropertyRelative("m_AxisTick");
|
||||
SerializedProperty m_SplitArea = prop.FindPropertyRelative("m_SplitArea");
|
||||
SerializedProperty m_SplitLine = prop.FindPropertyRelative("m_SplitLine");
|
||||
SerializedProperty m_MinMaxType = prop.FindPropertyRelative("m_MinMaxType");
|
||||
SerializedProperty m_Min = prop.FindPropertyRelative("m_Min");
|
||||
SerializedProperty m_Max = prop.FindPropertyRelative("m_Max");
|
||||
|
||||
int index = InitToggle(prop);
|
||||
bool toggle = m_AxisModuleToggle[index];
|
||||
m_AxisModuleToggle[index] = ChartEditorHelper.MakeFoldout(ref drawRect, ref toggle,
|
||||
GetDisplayName(prop.displayName), m_Show);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_AxisModuleToggle[index])
|
||||
{
|
||||
Axis.AxisType type = (Axis.AxisType)m_Type.enumValueIndex;
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUI.PropertyField(drawRect, m_Type);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (type == Axis.AxisType.Log)
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, m_LogBaseE);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LogBase);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
if (type == Axis.AxisType.Value)
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, m_MinMaxType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
Axis.AxisMinMaxType minMaxType = (Axis.AxisMinMaxType)m_MinMaxType.enumValueIndex;
|
||||
switch (minMaxType)
|
||||
{
|
||||
case Axis.AxisMinMaxType.Default:
|
||||
break;
|
||||
case Axis.AxisMinMaxType.MinMax:
|
||||
break;
|
||||
case Axis.AxisMinMaxType.Custom:
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUI.PropertyField(drawRect, m_Min);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Max);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.indentLevel--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_SplitNumber);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Interval);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BoundaryGap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_AxisLine);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisLine);
|
||||
EditorGUI.PropertyField(drawRect, m_AxisName);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisName);
|
||||
EditorGUI.PropertyField(drawRect, m_AxisTick);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisTick);
|
||||
EditorGUI.PropertyField(drawRect, m_AxisLabel);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisLabel);
|
||||
EditorGUI.PropertyField(drawRect, m_SplitLine);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_SplitLine);
|
||||
EditorGUI.PropertyField(drawRect, m_SplitArea);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_SplitArea);
|
||||
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
m_DataFoldout[index] = EditorGUI.Foldout(drawRect, m_DataFoldout[index], "Data");
|
||||
ChartEditorHelper.MakeJsonData(ref drawRect, ref m_ShowJsonDataArea, ref m_JsonDataAreaText, prop, pos.width);
|
||||
drawRect.width = pos.width;
|
||||
if (m_DataFoldout[index])
|
||||
{
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_DataSize, m_Data);
|
||||
}
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
int index = InitToggle(prop);
|
||||
if (!m_AxisModuleToggle[index])
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
SerializedProperty m_Type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty m_AxisTick = prop.FindPropertyRelative("m_AxisTick");
|
||||
SerializedProperty m_AxisLine = prop.FindPropertyRelative("m_AxisLine");
|
||||
SerializedProperty m_AxisName = prop.FindPropertyRelative("m_AxisName");
|
||||
SerializedProperty m_AxisLabel = prop.FindPropertyRelative("m_AxisLabel");
|
||||
SerializedProperty m_SplitArea = prop.FindPropertyRelative("m_SplitArea");
|
||||
SerializedProperty m_SplitLine = prop.FindPropertyRelative("m_SplitLine");
|
||||
float height = 0;
|
||||
height += 10 * EditorGUIUtility.singleLineHeight + 9 * EditorGUIUtility.standardVerticalSpacing;
|
||||
Axis.AxisType type = (Axis.AxisType)m_Type.enumValueIndex;
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
if (m_DataFoldout[index])
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Data");
|
||||
int num = m_Data.arraySize + 2;
|
||||
if (num > 30) num = 14;
|
||||
height += num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
if (m_ShowJsonDataArea)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 3 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
else if (type == Axis.AxisType.Value)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
SerializedProperty m_MinMaxType = prop.FindPropertyRelative("m_MinMaxType");
|
||||
if (m_MinMaxType.enumValueIndex == (int)Axis.AxisMinMaxType.Custom)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 2 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
else if (type == Axis.AxisType.Log)
|
||||
{
|
||||
height += 2 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
SerializedProperty m_MinMaxType = prop.FindPropertyRelative("m_MinMaxType");
|
||||
if (m_MinMaxType.enumValueIndex == (int)Axis.AxisMinMaxType.Custom)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 2 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
height += EditorGUI.GetPropertyHeight(m_AxisName);
|
||||
height += EditorGUI.GetPropertyHeight(m_AxisLine);
|
||||
height += EditorGUI.GetPropertyHeight(m_AxisTick);
|
||||
height += EditorGUI.GetPropertyHeight(m_AxisLabel);
|
||||
height += EditorGUI.GetPropertyHeight(m_SplitArea);
|
||||
height += EditorGUI.GetPropertyHeight(m_SplitLine);
|
||||
return height;
|
||||
}
|
||||
}
|
||||
|
||||
private int InitToggle(SerializedProperty prop)
|
||||
{
|
||||
int index = 0;
|
||||
int.TryParse(prop.displayName.Split(' ')[1], out index);
|
||||
if (index >= m_DataFoldout.Count)
|
||||
{
|
||||
m_DataFoldout.Add(false);
|
||||
}
|
||||
if (index >= m_AxisModuleToggle.Count)
|
||||
{
|
||||
m_AxisModuleToggle.Add(false);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0544f1db7f17644bb3cbe7c85da84d5
|
||||
timeCreated: 1554507809
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,75 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AxisLabel), true)]
|
||||
public class AxisLabelDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_AxisLabelToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Formatter = prop.FindPropertyRelative("m_Formatter");
|
||||
SerializedProperty m_Inside = prop.FindPropertyRelative("m_Inside");
|
||||
SerializedProperty m_Interval = prop.FindPropertyRelative("m_Interval");
|
||||
SerializedProperty m_Rotate = prop.FindPropertyRelative("m_Rotate");
|
||||
SerializedProperty m_Margin = prop.FindPropertyRelative("m_Margin");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");
|
||||
SerializedProperty m_FontStyle = prop.FindPropertyRelative("m_FontStyle");
|
||||
SerializedProperty m_ForceENotation = prop.FindPropertyRelative("m_ForceENotation");
|
||||
SerializedProperty m_TextLimit = prop.FindPropertyRelative("m_TextLimit");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisLabelToggle, prop, "Axis Label", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLabelToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Inside);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Interval);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Rotate);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Margin);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontSize);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontStyle);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Formatter);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ForceENotation);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_TextLimit);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_TextLimit);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLabelToggle, prop))
|
||||
{
|
||||
height += 10 * EditorGUIUtility.singleLineHeight + 9 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TextLimit"));
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88f38952bcbcd448dbe12f98e9c9110d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,65 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AxisLine), true)]
|
||||
public class AxisLineDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_AxisLineToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_OnZero = prop.FindPropertyRelative("m_OnZero");
|
||||
SerializedProperty m_Width = prop.FindPropertyRelative("m_Width");
|
||||
SerializedProperty m_Symbol = prop.FindPropertyRelative("m_Symbol");
|
||||
SerializedProperty m_SymbolWidth = prop.FindPropertyRelative("m_SymbolWidth");
|
||||
SerializedProperty m_SymbolHeight = prop.FindPropertyRelative("m_SymbolHeight");
|
||||
SerializedProperty m_SymbolOffset = prop.FindPropertyRelative("m_SymbolOffset");
|
||||
SerializedProperty m_SymbolDent = prop.FindPropertyRelative("m_SymbolDent");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisLineToggle, prop, "Axis Line", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLineToggle,prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_OnZero);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Width);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SymbolWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SymbolHeight);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SymbolOffset);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SymbolDent);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLineToggle,prop))
|
||||
{
|
||||
height += 7 * EditorGUIUtility.singleLineHeight + 6 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 866eefe266c3c47809d9dff3e89be0ab
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,74 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AxisName), true)]
|
||||
public class AxisNameDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_AxisNameToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Name = prop.FindPropertyRelative("m_Name");
|
||||
SerializedProperty m_Location = prop.FindPropertyRelative("m_Location");
|
||||
SerializedProperty m_Offset = prop.FindPropertyRelative("m_Offset");
|
||||
SerializedProperty m_Rotate = prop.FindPropertyRelative("m_Rotate");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");
|
||||
SerializedProperty m_FontStyle = prop.FindPropertyRelative("m_FontStyle");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisNameToggle, prop, "Axis Name", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisNameToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Name);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Location);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Offset);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Offset);
|
||||
// EditorGUI.LabelField(drawRect, "Offset");
|
||||
// var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15;
|
||||
// var tempWidth = (pos.width - startX + 35) / 2;
|
||||
// var xRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
// var yRect = new Rect(xRect.x + tempWidth - 20, drawRect.y, tempWidth, drawRect.height);
|
||||
// var x = EditorGUI.FloatField(xRect, m_Offset.vector2Value.x);
|
||||
// var y = EditorGUI.FloatField(yRect, m_Offset.vector2Value.y);
|
||||
// m_Offset.vector2Value = new Vector2(x,y);
|
||||
// drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Rotate);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontSize);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontStyle);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisNameToggle, prop))
|
||||
{
|
||||
height += 7 * EditorGUIUtility.singleLineHeight + 6 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93f4873273d9c4d76bd651c8d774637f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,61 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AxisSplitArea), true)]
|
||||
public class AxisSplitAreaDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_ColorFoldout = false;
|
||||
private int m_ColorSize = 0;
|
||||
private Dictionary<string, bool> m_SplitAreaToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SplitAreaToggle, prop, "Split Area", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_SplitAreaToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
m_ColorFoldout = EditorGUI.Foldout(drawRect, m_ColorFoldout, "Color");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.width = pos.width;
|
||||
if (m_ColorFoldout)
|
||||
{
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_ColorSize, m_Color);
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_SplitAreaToggle, prop))
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_ColorFoldout)
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Color");
|
||||
int num = m_Data.arraySize + 1;
|
||||
height += num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 988570bd6485942da9879649ed4adb5b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,55 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AxisSplitLine), true)]
|
||||
public class AxisSplitLineDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_AxisSplitLineToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Interval = prop.FindPropertyRelative("m_Interval");
|
||||
SerializedProperty m_LineStyle = prop.FindPropertyRelative("m_LineStyle");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisSplitLineToggle, prop, "Split Line", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisSplitLineToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Interval);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_LineStyle);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisSplitLineToggle, prop))
|
||||
{
|
||||
height += 2 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle"));
|
||||
}
|
||||
else
|
||||
{
|
||||
height = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af473e9aba20f4f168b8f83a4db13f81
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,52 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AxisTick), true)]
|
||||
public class AxisTickDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_AxisTickToggle = false;
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_AlignWithLabel = prop.FindPropertyRelative("m_AlignWithLabel");
|
||||
SerializedProperty m_Inside = prop.FindPropertyRelative("m_Inside");
|
||||
SerializedProperty m_Length = prop.FindPropertyRelative("m_Length");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisTickToggle, "Axis Tick", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_AxisTickToggle)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_AlignWithLabel);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Inside);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Length);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (m_AxisTickToggle)
|
||||
{
|
||||
height += 3 * EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c7d45bc59dedc140b08f6e9d26ccd9d
|
||||
timeCreated: 1555890921
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,106 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(DataZoom), true)]
|
||||
public class DataZoomDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_DataZoomModuleToggle = false;
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Enable");
|
||||
//SerializedProperty m_FilterMode = prop.FindPropertyRelative("m_FilterMode");
|
||||
//SerializedProperty m_Orient = prop.FindPropertyRelative("m_Orient");
|
||||
SerializedProperty m_SupportInside = prop.FindPropertyRelative("m_SupportInside");
|
||||
SerializedProperty m_SupportSlider = prop.FindPropertyRelative("m_SupportSlider");
|
||||
//SerializedProperty m_SupportSelect = prop.FindPropertyRelative("m_SupportSelect");
|
||||
SerializedProperty m_ShowDataShadow = prop.FindPropertyRelative("m_ShowDataShadow");
|
||||
SerializedProperty m_ShowDetail = prop.FindPropertyRelative("m_ShowDetail");
|
||||
SerializedProperty m_ZoomLock = prop.FindPropertyRelative("m_ZoomLock");
|
||||
// SerializedProperty m_Realtime = prop.FindPropertyRelative("m_Realtime");
|
||||
// SerializedProperty m_BackgroundColor = prop.FindPropertyRelative("m_BackgroundColor");
|
||||
SerializedProperty m_Height = prop.FindPropertyRelative("m_Height");
|
||||
SerializedProperty m_Bottom = prop.FindPropertyRelative("m_Bottom");
|
||||
SerializedProperty m_RangeMode = prop.FindPropertyRelative("m_RangeMode");
|
||||
SerializedProperty m_Start = prop.FindPropertyRelative("m_Start");
|
||||
SerializedProperty m_End = prop.FindPropertyRelative("m_End");
|
||||
SerializedProperty m_MinShowNum = prop.FindPropertyRelative("m_MinShowNum");
|
||||
SerializedProperty m_ScrollSensitivity = prop.FindPropertyRelative("m_ScrollSensitivity");
|
||||
SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");
|
||||
SerializedProperty m_FontStyle = prop.FindPropertyRelative("m_FontStyle");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_DataZoomModuleToggle, "DataZoom", show);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_DataZoomModuleToggle)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_SupportInside);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SupportSlider);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_SupportSlider.boolValue)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_ShowDataShadow);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ShowDetail);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontSize);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontStyle);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
// EditorGUI.PropertyField(drawRect, m_Realtime);
|
||||
// drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Height);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Bottom);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
//EditorGUI.PropertyField(drawRect, m_SupportSelect);
|
||||
//drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ZoomLock);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ScrollSensitivity);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_RangeMode);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Start);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_End);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_MinShowNum);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_Start.floatValue < 0) m_Start.floatValue = 0;
|
||||
if (m_End.floatValue > 100) m_End.floatValue = 100;
|
||||
if (m_MinShowNum.intValue < 0) m_MinShowNum.intValue = 0;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
int num = 1;
|
||||
if (m_DataZoomModuleToggle)
|
||||
{
|
||||
num += 8;
|
||||
if (prop.FindPropertyRelative("m_SupportSlider").boolValue) num += 6;
|
||||
|
||||
}
|
||||
height += num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cba26e421f79077499f05aaf10d06b4f
|
||||
timeCreated: 1559609801
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,55 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Emphasis), true)]
|
||||
public class EmphasisDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_EmphasisToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Label = prop.FindPropertyRelative("m_Label");
|
||||
SerializedProperty m_ItemStyle = prop.FindPropertyRelative("m_ItemStyle");
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_EmphasisToggle, prop, "Emphasis", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_EmphasisToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_ItemStyle);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_EmphasisToggle, prop))
|
||||
{
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_ItemStyle"));
|
||||
}
|
||||
else
|
||||
{
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7de9b5e4c5d474fdd88ebb89f0924305
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,82 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(GaugeAxis), true)]
|
||||
public class GaugeAxisDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_DataFoldout = false;
|
||||
private int m_DataSize = 0;
|
||||
private Dictionary<string, bool> m_AxisLineToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_AxisLine = prop.FindPropertyRelative("m_AxisLine");
|
||||
SerializedProperty m_SplitLine = prop.FindPropertyRelative("m_SplitLine");
|
||||
SerializedProperty m_AxisTick = prop.FindPropertyRelative("m_AxisTick");
|
||||
SerializedProperty m_AxisLabel = prop.FindPropertyRelative("m_AxisLabel");
|
||||
SerializedProperty m_AxisLabelText = prop.FindPropertyRelative("m_AxisLabelText");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisLineToggle, prop, "Gauge Axis", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLineToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_AxisLine);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisLine);
|
||||
EditorGUI.PropertyField(drawRect, m_SplitLine);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_SplitLine);
|
||||
EditorGUI.PropertyField(drawRect, m_AxisTick);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisTick);
|
||||
EditorGUI.PropertyField(drawRect, m_AxisLabel);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisLabel);
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
m_DataFoldout = EditorGUI.Foldout(drawRect, m_DataFoldout, "Axis Label Text");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.width = pos.width;
|
||||
if (m_DataFoldout)
|
||||
{
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_DataSize, m_AxisLabelText);
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLineToggle, prop))
|
||||
{
|
||||
height += 2 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AxisLine"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_SplitLine"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AxisTick"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AxisLabel"));
|
||||
if (m_DataFoldout)
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_AxisLabelText");
|
||||
int num = m_Data.arraySize + 1;
|
||||
height += num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dec6cfc5ef85147738a81d8de84b079a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,76 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(GaugeAxis.AxisLine), true)]
|
||||
public class GaugeAxisLineDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_DataFoldout = false;
|
||||
private int m_DataSize = 0;
|
||||
private Dictionary<string, bool> m_Toggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Width = prop.FindPropertyRelative("m_Width");
|
||||
SerializedProperty m_Opacity = prop.FindPropertyRelative("m_Opacity");
|
||||
SerializedProperty m_BarBackgroundColor = prop.FindPropertyRelative("m_BarBackgroundColor");
|
||||
SerializedProperty m_BarColor = prop.FindPropertyRelative("m_BarColor");
|
||||
SerializedProperty m_StageColor = prop.FindPropertyRelative("m_StageColor");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_Toggle, prop, "Axis Line", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Width);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Opacity);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BarColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BarBackgroundColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
m_DataFoldout = EditorGUI.Foldout(drawRect, m_DataFoldout, "Stage Color");
|
||||
drawRect.width = pos.width;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_DataFoldout)
|
||||
{
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_DataSize, m_StageColor);
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
float height = 6 * EditorGUIUtility.singleLineHeight + 5 * EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_DataFoldout)
|
||||
{
|
||||
var arraySize = prop.FindPropertyRelative("m_StageColor").arraySize + 1;
|
||||
height += arraySize * EditorGUIUtility.singleLineHeight + (arraySize) * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += 2 * EditorGUIUtility.standardVerticalSpacing;
|
||||
return height;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb7a86643ea2349c8ac2475ab81cb2f9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc7cae70713a74fb496ef686296bc46b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,54 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(GaugeAxis.SplitLine), true)]
|
||||
public class GaugeAxisSplitDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_Toggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Length = prop.FindPropertyRelative("m_Length");
|
||||
SerializedProperty m_LineStyle = prop.FindPropertyRelative("m_LineStyle");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_Toggle, prop, "Split Line", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Length);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_LineStyle);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
float height = 2 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle"));
|
||||
return height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d11eb7847e5c74746a570a7c9f6b339a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,57 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(GaugeAxis.AxisTick), true)]
|
||||
public class GaugeAxisTickDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_Toggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Length = prop.FindPropertyRelative("m_Length");
|
||||
SerializedProperty m_SplitNumber = prop.FindPropertyRelative("m_SplitNumber");
|
||||
SerializedProperty m_LineStyle = prop.FindPropertyRelative("m_LineStyle");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_Toggle, prop, "Axis Tick", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Length);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SplitNumber);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_LineStyle);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
float height = 3 * EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle"));
|
||||
return height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f561506277b949c1b22116a3f3d3f4f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,51 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(GaugePointer), true)]
|
||||
public class GaugePointerDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_Toggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Width = prop.FindPropertyRelative("m_Width");
|
||||
SerializedProperty m_Length = prop.FindPropertyRelative("m_Length");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_Toggle, prop, "Gauge Pointer", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Width);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Length);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_Toggle, prop))
|
||||
{
|
||||
return 3 * EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3d180de37dd24cfc9bcbb46f650c902
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,58 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Grid), true)]
|
||||
public class GridDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_GridModuleToggle = false;
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
SerializedProperty m_Show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Left = prop.FindPropertyRelative("m_Left");
|
||||
SerializedProperty m_Right = prop.FindPropertyRelative("m_Right");
|
||||
SerializedProperty m_Top = prop.FindPropertyRelative("m_Top");
|
||||
SerializedProperty m_Bottom = prop.FindPropertyRelative("m_Bottom");
|
||||
SerializedProperty m_BackgroundColor = prop.FindPropertyRelative("m_BackgroundColor");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_GridModuleToggle, "Grid",m_Show);
|
||||
EditorGUI.LabelField(drawRect, "Grid", EditorStyles.boldLabel);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_GridModuleToggle)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Left);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Right);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Top);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Bottom);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BackgroundColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (m_GridModuleToggle)
|
||||
return 6 * EditorGUIUtility.singleLineHeight + 5 * EditorGUIUtility.standardVerticalSpacing;
|
||||
else
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4142159d55a64e1d88d81ac84b714d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,67 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(IconStyle), true)]
|
||||
public class IconStyleDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_IconStyleToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty m_Show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Layer = prop.FindPropertyRelative("m_Layer");
|
||||
SerializedProperty m_Sprite = prop.FindPropertyRelative("m_Sprite");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_Width = prop.FindPropertyRelative("m_Width");
|
||||
SerializedProperty m_Height = prop.FindPropertyRelative("m_Height");
|
||||
SerializedProperty m_Offset = prop.FindPropertyRelative("m_Offset");
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_IconStyleToggle, prop, null, m_Show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_IconStyleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Layer);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Sprite);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Width);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Height);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Offset);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Offset);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_IconStyleToggle, prop))
|
||||
{
|
||||
var hight = 6 * EditorGUIUtility.singleLineHeight + 6 * EditorGUIUtility.standardVerticalSpacing;
|
||||
hight += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Offset"));
|
||||
hight += EditorGUIUtility.standardVerticalSpacing;
|
||||
return hight;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ItemStyle), true)]
|
||||
public class ItemStyleDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_ItemStyleToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_BackgroundColor = prop.FindPropertyRelative("m_BackgroundColor");
|
||||
SerializedProperty m_BackgroundWidth = prop.FindPropertyRelative("m_BackgroundWidth");
|
||||
SerializedProperty m_CenterColor = prop.FindPropertyRelative("m_CenterColor");
|
||||
SerializedProperty m_CenterGap = prop.FindPropertyRelative("m_CenterGap");
|
||||
SerializedProperty m_BorderType = prop.FindPropertyRelative("m_BorderType");
|
||||
SerializedProperty m_BorderWidth = prop.FindPropertyRelative("m_BorderWidth");
|
||||
SerializedProperty m_BorderColor = prop.FindPropertyRelative("m_BorderColor");
|
||||
SerializedProperty m_Opacity = prop.FindPropertyRelative("m_Opacity");
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_ItemStyleToggle, prop, "Item Style", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_ItemStyleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BackgroundColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BackgroundWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_CenterColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_CenterGap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BorderType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BorderWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BorderColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Opacity);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_ItemStyleToggle, prop))
|
||||
{
|
||||
height += 10 * EditorGUIUtility.singleLineHeight + 9 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Legend), true)]
|
||||
public class LegendDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_DataFoldout = false;
|
||||
private bool m_IconsFoldout = false;
|
||||
private int m_DataSize = 0;
|
||||
private int m_IconsSize = 0;
|
||||
private bool m_ShowJsonDataArea = false;
|
||||
private string m_JsonDataAreaText;
|
||||
private bool m_LegendModuleToggle = false;
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_SelectedMode = prop.FindPropertyRelative("m_SelectedMode");
|
||||
SerializedProperty orient = prop.FindPropertyRelative("m_Orient");
|
||||
SerializedProperty location = prop.FindPropertyRelative("m_Location");
|
||||
SerializedProperty itemWidth = prop.FindPropertyRelative("m_ItemWidth");
|
||||
SerializedProperty itemHeight = prop.FindPropertyRelative("m_ItemHeight");
|
||||
SerializedProperty itemGap = prop.FindPropertyRelative("m_ItemGap");
|
||||
SerializedProperty m_ItemAutoColor = prop.FindPropertyRelative("m_ItemAutoColor");
|
||||
SerializedProperty m_Formatter = prop.FindPropertyRelative("m_Formatter");
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Data");
|
||||
SerializedProperty m_Icons = prop.FindPropertyRelative("m_Icons");
|
||||
SerializedProperty m_TextStyle = prop.FindPropertyRelative("m_TextStyle");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_LegendModuleToggle, "Legend", show);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_LegendModuleToggle)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, itemWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, itemHeight);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, itemGap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ItemAutoColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SelectedMode);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, orient);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, location);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(location);
|
||||
EditorGUI.PropertyField(drawRect, m_Formatter);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
m_DataFoldout = EditorGUI.Foldout(drawRect, m_DataFoldout, "Data");
|
||||
ChartEditorHelper.MakeJsonData(ref drawRect, ref m_ShowJsonDataArea, ref m_JsonDataAreaText, prop, pos.width);
|
||||
drawRect.width = pos.width;
|
||||
if (m_DataFoldout)
|
||||
{
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_DataSize, m_Data);
|
||||
}
|
||||
m_IconsFoldout = EditorGUI.Foldout(drawRect, m_IconsFoldout, "Icons");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_IconsFoldout)
|
||||
{
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_IconsSize, m_Icons);
|
||||
}
|
||||
EditorGUI.PropertyField(drawRect, m_TextStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_TextStyle);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (m_LegendModuleToggle)
|
||||
{
|
||||
SerializedProperty location = prop.FindPropertyRelative("m_Location");
|
||||
height += 8 * EditorGUIUtility.singleLineHeight + 7 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(location);
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_DataFoldout)
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Data");
|
||||
int num = m_Data.arraySize + 1;
|
||||
height += num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
if (m_IconsFoldout)
|
||||
{
|
||||
SerializedProperty m_Icons = prop.FindPropertyRelative("m_Icons");
|
||||
int num = m_Icons.arraySize + 1;
|
||||
height += num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TextStyle"));
|
||||
}
|
||||
if (m_ShowJsonDataArea)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 4 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b96d10541649a23468168ba0bf1c0bc5
|
||||
timeCreated: 1554395454
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,62 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(LineArrow), true)]
|
||||
public class LineArrowStyleDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_LineArrowToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Position = prop.FindPropertyRelative("m_Position");
|
||||
SerializedProperty m_Width = prop.FindPropertyRelative("m_Width");
|
||||
SerializedProperty m_Height = prop.FindPropertyRelative("m_Height");
|
||||
SerializedProperty m_Offset = prop.FindPropertyRelative("m_Offset");
|
||||
SerializedProperty m_Dent = prop.FindPropertyRelative("m_Dent");
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_LineArrowToggle, prop, "Line Arrow", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_LineArrowToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Position);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Width);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Height);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Offset);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Dent);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_LineArrowToggle, prop))
|
||||
{
|
||||
height += 6 * EditorGUIUtility.singleLineHeight + 5 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(LineStyle), true)]
|
||||
public class LineStyleDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_LineStyleToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_Width = prop.FindPropertyRelative("m_Width");
|
||||
SerializedProperty m_Opacity = prop.FindPropertyRelative("m_Opacity");
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_LineStyleToggle, prop, "Line Style", show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_LineStyleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Type);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Width);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Opacity);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_LineStyleToggle, prop))
|
||||
{
|
||||
height += 5 * EditorGUIUtility.singleLineHeight + 4 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Location), true)]
|
||||
public class LocationDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty align = prop.FindPropertyRelative("m_Align");
|
||||
SerializedProperty left = prop.FindPropertyRelative("m_Left");
|
||||
SerializedProperty right = prop.FindPropertyRelative("m_Right");
|
||||
SerializedProperty top = prop.FindPropertyRelative("m_Top");
|
||||
SerializedProperty bottom = prop.FindPropertyRelative("m_Bottom");
|
||||
EditorGUI.PropertyField(drawRect, align, new GUIContent("Location"));
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
++EditorGUI.indentLevel;
|
||||
switch ((Location.Align)align.enumValueIndex)
|
||||
{
|
||||
case Location.Align.TopCenter:
|
||||
EditorGUI.PropertyField(drawRect, top);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case Location.Align.TopLeft:
|
||||
EditorGUI.PropertyField(drawRect, top);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, left);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case Location.Align.TopRight:
|
||||
EditorGUI.PropertyField(drawRect, top);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, right);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case Location.Align.BottomCenter:
|
||||
EditorGUI.PropertyField(drawRect, bottom);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case Location.Align.BottomLeft:
|
||||
EditorGUI.PropertyField(drawRect, bottom);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, left);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case Location.Align.BottomRight:
|
||||
EditorGUI.PropertyField(drawRect, bottom);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, right);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case Location.Align.Center:
|
||||
break;
|
||||
case Location.Align.CenterLeft:
|
||||
EditorGUI.PropertyField(drawRect, left);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case Location.Align.CenterRight:
|
||||
EditorGUI.PropertyField(drawRect, right);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
SerializedProperty align = prop.FindPropertyRelative("m_Align");
|
||||
switch ((Location.Align)align.enumValueIndex)
|
||||
{
|
||||
case Location.Align.Center:
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
case Location.Align.TopCenter:
|
||||
case Location.Align.BottomCenter:
|
||||
case Location.Align.CenterLeft:
|
||||
case Location.Align.CenterRight:
|
||||
return 2 * EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing;
|
||||
default:
|
||||
return 3 * EditorGUIUtility.singleLineHeight + 3 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Radar), true)]
|
||||
public class RadarDrawer : PropertyDrawer
|
||||
{
|
||||
SerializedProperty m_Shape;
|
||||
SerializedProperty m_PositionType;
|
||||
SerializedProperty m_Radius;
|
||||
SerializedProperty m_SplitNumber;
|
||||
SerializedProperty m_Center;
|
||||
SerializedProperty m_SplitLine;
|
||||
SerializedProperty m_SplitArea;
|
||||
SerializedProperty m_Indicator;
|
||||
SerializedProperty m_IndicatorGap;
|
||||
SerializedProperty m_IndicatorList;
|
||||
|
||||
private Dictionary<string, bool> m_RadarModuleToggle = new Dictionary<string, bool>();
|
||||
private Dictionary<string, bool> m_IndicatorToggle = new Dictionary<string, bool>();
|
||||
private bool m_IndicatorJsonAreaToggle = false;
|
||||
private string m_IndicatorJsonAreaText;
|
||||
private int m_IndicatorSize;
|
||||
private int m_BackgroundColorSize;
|
||||
|
||||
private void InitProperty(SerializedProperty prop)
|
||||
{
|
||||
m_Shape = prop.FindPropertyRelative("m_Shape");
|
||||
m_PositionType = prop.FindPropertyRelative("m_PositionType");
|
||||
m_Radius = prop.FindPropertyRelative("m_Radius");
|
||||
m_SplitNumber = prop.FindPropertyRelative("m_SplitNumber");
|
||||
m_Center = prop.FindPropertyRelative("m_Center");
|
||||
m_SplitLine = prop.FindPropertyRelative("m_SplitLine");
|
||||
m_SplitArea = prop.FindPropertyRelative("m_SplitArea");
|
||||
m_Indicator = prop.FindPropertyRelative("m_Indicator");
|
||||
m_IndicatorGap = prop.FindPropertyRelative("m_IndicatorGap");
|
||||
m_IndicatorList = prop.FindPropertyRelative("m_IndicatorList");
|
||||
}
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
InitProperty(prop);
|
||||
Rect drawRect = pos;
|
||||
float defaultLabelWidth = EditorGUIUtility.labelWidth;
|
||||
float defaultFieldWidth = EditorGUIUtility.fieldWidth;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
int index = ChartEditorHelper.GetIndexFromPath(prop);
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_RadarModuleToggle, prop, "Radar " + index, null, true);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_RadarModuleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
EditorGUIUtility.labelWidth = defaultLabelWidth;
|
||||
EditorGUIUtility.fieldWidth = defaultFieldWidth;
|
||||
EditorGUI.PropertyField(drawRect, m_Shape);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_PositionType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.LabelField(drawRect, "Center");
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15;
|
||||
var tempWidth = (pos.width - startX + 35) / 2;
|
||||
var centerXRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
var centerYRect = new Rect(centerXRect.x + tempWidth - 20, drawRect.y, tempWidth, drawRect.height);
|
||||
while (m_Center.arraySize < 2)
|
||||
{
|
||||
m_Center.InsertArrayElementAtIndex(m_Center.arraySize);
|
||||
}
|
||||
EditorGUI.PropertyField(centerXRect, m_Center.GetArrayElementAtIndex(0), GUIContent.none);
|
||||
EditorGUI.PropertyField(centerYRect, m_Center.GetArrayElementAtIndex(1), GUIContent.none);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Radius);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SplitNumber);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_SplitLine);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_SplitLine);
|
||||
EditorGUI.PropertyField(drawRect, m_SplitArea);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_SplitArea);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_IndicatorToggle, prop, "Indicators", m_Indicator, false);
|
||||
ChartEditorHelper.MakeJsonData(ref drawRect, ref m_IndicatorJsonAreaToggle, ref m_IndicatorJsonAreaText, prop, pos.width, 20);
|
||||
drawRect.width = pos.width;
|
||||
drawRect.x = pos.x;
|
||||
if (ChartEditorHelper.IsToggle(m_IndicatorToggle, prop))
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, m_IndicatorGap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_IndicatorSize, m_IndicatorList);
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
int propNum = 1;
|
||||
if (ChartEditorHelper.IsToggle(m_RadarModuleToggle, prop))
|
||||
{
|
||||
propNum += 7;
|
||||
if (m_IndicatorJsonAreaToggle) propNum += 4;
|
||||
float height = propNum * EditorGUIUtility.singleLineHeight + (propNum - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_SplitLine"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_SplitArea"));
|
||||
|
||||
if (ChartEditorHelper.IsToggle(m_IndicatorToggle, prop))
|
||||
{
|
||||
m_IndicatorList = prop.FindPropertyRelative("m_IndicatorList");
|
||||
height += EditorGUIUtility.singleLineHeight * 3 + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
for (int i = 0; i < m_IndicatorList.arraySize; i++)
|
||||
{
|
||||
height += EditorGUI.GetPropertyHeight(m_IndicatorList.GetArrayElementAtIndex(i));
|
||||
}
|
||||
}
|
||||
return height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09bf71ecf64f321468ac28af28bec878
|
||||
timeCreated: 1555563898
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,64 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Radar.Indicator), true)]
|
||||
public class RadarIndicatorDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_RadarModuleToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
SerializedProperty m_Name = prop.FindPropertyRelative("m_Name");
|
||||
SerializedProperty m_Max = prop.FindPropertyRelative("m_Max");
|
||||
SerializedProperty m_Min = prop.FindPropertyRelative("m_Min");
|
||||
SerializedProperty m_TextStyle = prop.FindPropertyRelative("m_TextStyle");
|
||||
Rect drawRect = pos;
|
||||
float defaultLabelWidth = EditorGUIUtility.labelWidth;
|
||||
float defaultFieldWidth = EditorGUIUtility.fieldWidth;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
int index = ChartEditorHelper.GetIndexFromPath(prop);
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_RadarModuleToggle, prop, "Indicator " + index, m_Name, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_RadarModuleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Name);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Min);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Max);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_TextStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_TextStyle);
|
||||
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_RadarModuleToggle, prop))
|
||||
{
|
||||
var height = 4 * EditorGUIUtility.singleLineHeight + 3 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TextStyle"));
|
||||
return height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fb5d2a98871919459956dc252632435
|
||||
timeCreated: 1556220585
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,565 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Serie), true)]
|
||||
public class SerieDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_SerieModuleToggle = new Dictionary<string, bool>();
|
||||
private List<bool> m_DataFoldout = new List<bool>();
|
||||
private bool m_ShowJsonDataArea = false;
|
||||
private string m_JsonDataAreaText;
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty name = prop.FindPropertyRelative("m_Name");
|
||||
SerializedProperty stack = prop.FindPropertyRelative("m_Stack");
|
||||
SerializedProperty m_AxisIndex = prop.FindPropertyRelative("m_AxisIndex");
|
||||
SerializedProperty m_RadarIndex = prop.FindPropertyRelative("m_RadarIndex");
|
||||
SerializedProperty m_MinShow = prop.FindPropertyRelative("m_MinShow");
|
||||
SerializedProperty m_MaxShow = prop.FindPropertyRelative("m_MaxShow");
|
||||
SerializedProperty m_MaxCache = prop.FindPropertyRelative("m_MaxCache");
|
||||
|
||||
SerializedProperty m_LineStyle = prop.FindPropertyRelative("m_LineStyle");
|
||||
SerializedProperty m_ItemStyle = prop.FindPropertyRelative("m_ItemStyle");
|
||||
SerializedProperty m_LineArrow = prop.FindPropertyRelative("m_LineArrow");
|
||||
SerializedProperty m_LineType = prop.FindPropertyRelative("m_LineType");
|
||||
SerializedProperty m_SampleDist = prop.FindPropertyRelative("m_SampleDist");
|
||||
SerializedProperty m_SampleType = prop.FindPropertyRelative("m_SampleType");
|
||||
SerializedProperty m_SampleAverage = prop.FindPropertyRelative("m_SampleAverage");
|
||||
SerializedProperty m_BarType = prop.FindPropertyRelative("m_BarType");
|
||||
SerializedProperty m_BarPercentStack = prop.FindPropertyRelative("m_BarPercentStack");
|
||||
SerializedProperty m_BarWidth = prop.FindPropertyRelative("m_BarWidth");
|
||||
SerializedProperty m_BarGap = prop.FindPropertyRelative("m_BarGap");
|
||||
SerializedProperty m_BarZebraWidth = prop.FindPropertyRelative("m_BarZebraWidth");
|
||||
SerializedProperty m_BarZebraGap = prop.FindPropertyRelative("m_BarZebraGap");
|
||||
SerializedProperty m_AreaStyle = prop.FindPropertyRelative("m_AreaStyle");
|
||||
SerializedProperty m_Symbol = prop.FindPropertyRelative("m_Symbol");
|
||||
SerializedProperty m_RoseType = prop.FindPropertyRelative("m_RoseType");
|
||||
SerializedProperty m_Space = prop.FindPropertyRelative("m_Space");
|
||||
SerializedProperty m_Center = prop.FindPropertyRelative("m_Center");
|
||||
SerializedProperty m_Radius = prop.FindPropertyRelative("m_Radius");
|
||||
SerializedProperty m_Label = prop.FindPropertyRelative("m_Label");
|
||||
SerializedProperty m_Emphasis = prop.FindPropertyRelative("m_Emphasis");
|
||||
SerializedProperty m_Animation = prop.FindPropertyRelative("m_Animation");
|
||||
SerializedProperty m_DataDimension = prop.FindPropertyRelative("m_ShowDataDimension");
|
||||
SerializedProperty m_ShowDataName = prop.FindPropertyRelative("m_ShowDataName");
|
||||
SerializedProperty m_ShowDataIcon = prop.FindPropertyRelative("m_ShowDataIcon");
|
||||
SerializedProperty m_Min = prop.FindPropertyRelative("m_Min");
|
||||
SerializedProperty m_Max = prop.FindPropertyRelative("m_Max");
|
||||
SerializedProperty m_StartAngle = prop.FindPropertyRelative("m_StartAngle");
|
||||
SerializedProperty m_EndAngle = prop.FindPropertyRelative("m_EndAngle");
|
||||
SerializedProperty m_RingGap = prop.FindPropertyRelative("m_RingGap");
|
||||
SerializedProperty m_SplitNumber = prop.FindPropertyRelative("m_SplitNumber");
|
||||
SerializedProperty m_Clockwise = prop.FindPropertyRelative("m_Clockwise");
|
||||
SerializedProperty m_RoundCap = prop.FindPropertyRelative("m_RoundCap");
|
||||
SerializedProperty m_GaugeType = prop.FindPropertyRelative("m_GaugeType");
|
||||
SerializedProperty m_GaugeAxis = prop.FindPropertyRelative("m_GaugeAxis");
|
||||
SerializedProperty m_GaugePointer = prop.FindPropertyRelative("m_GaugePointer");
|
||||
SerializedProperty m_TitleStyle = prop.FindPropertyRelative("m_TitleStyle");
|
||||
SerializedProperty m_Clip = prop.FindPropertyRelative("m_Clip");
|
||||
SerializedProperty m_Ignore = prop.FindPropertyRelative("m_Ignore");
|
||||
SerializedProperty m_IgnoreValue = prop.FindPropertyRelative("m_IgnoreValue");
|
||||
SerializedProperty m_Datas = prop.FindPropertyRelative("m_Data");
|
||||
|
||||
int index = InitToggle(prop);
|
||||
string moduleName = "Serie " + index;
|
||||
var toggle = ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SerieModuleToggle, prop, moduleName, show);
|
||||
if (!toggle)
|
||||
{
|
||||
drawRect.x = EditorGUIUtility.labelWidth - (EditorGUI.indentLevel - 1) * 15 - 2 + 20;
|
||||
drawRect.width = pos.width - drawRect.x + 15;
|
||||
EditorGUI.PropertyField(drawRect, type, GUIContent.none);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
var serieType = (SerieType)type.enumValueIndex;
|
||||
|
||||
++EditorGUI.indentLevel;
|
||||
drawRect.x = pos.x;
|
||||
drawRect.width = pos.width;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, type);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, name);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
switch (serieType)
|
||||
{
|
||||
case SerieType.Line:
|
||||
EditorGUI.PropertyField(drawRect, stack);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_AxisIndex);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_MinShow);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_MaxShow);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_MaxCache);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_MinShow.intValue < 0) m_MinShow.intValue = 0;
|
||||
if (m_MinShow.intValue < 0) m_MinShow.intValue = 0;
|
||||
if (m_MaxCache.intValue < 0) m_MaxCache.intValue = 0;
|
||||
EditorGUI.PropertyField(drawRect, m_LineType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SampleDist);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SampleType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SampleAverage);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Clip);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Ignore);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_IgnoreValue);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Symbol);
|
||||
EditorGUI.PropertyField(drawRect, m_LineStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_LineStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_LineArrow);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_LineArrow);
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_ItemStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_AreaStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AreaStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
break;
|
||||
case SerieType.Bar:
|
||||
EditorGUI.PropertyField(drawRect, stack);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_AxisIndex);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_MinShow);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_MaxShow);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_MaxCache);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_MinShow.intValue < 0) m_MinShow.intValue = 0;
|
||||
if (m_MinShow.intValue < 0) m_MinShow.intValue = 0;
|
||||
if (m_MaxCache.intValue < 0) m_MaxCache.intValue = 0;
|
||||
EditorGUI.PropertyField(drawRect, m_BarType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BarPercentStack);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BarWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BarGap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BarZebraWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BarZebraGap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Clip);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Symbol);
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_ItemStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_AreaStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AreaStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
break;
|
||||
case SerieType.Pie:
|
||||
EditorGUI.PropertyField(drawRect, m_RoseType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Space);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
ChartEditorHelper.MakeTwoField(ref drawRect, pos.width, m_Center, "Center");
|
||||
ChartEditorHelper.MakeTwoField(ref drawRect, pos.width, m_Radius, "Radius");
|
||||
EditorGUI.PropertyField(drawRect, m_RoundCap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
break;
|
||||
case SerieType.Ring:
|
||||
ChartEditorHelper.MakeTwoField(ref drawRect, pos.width, m_Center, "Center");
|
||||
ChartEditorHelper.MakeTwoField(ref drawRect, pos.width, m_Radius, "Radius");
|
||||
EditorGUI.PropertyField(drawRect, m_StartAngle);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_RingGap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_RoundCap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Clockwise);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_TitleStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_TitleStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_ItemStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
break;
|
||||
case SerieType.Radar:
|
||||
EditorGUI.PropertyField(drawRect, m_RadarIndex);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Symbol);
|
||||
EditorGUI.PropertyField(drawRect, m_LineStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_LineStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_AreaStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AreaStyle);
|
||||
break;
|
||||
case SerieType.Scatter:
|
||||
case SerieType.EffectScatter:
|
||||
EditorGUI.PropertyField(drawRect, m_Clip);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Symbol);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
break;
|
||||
case SerieType.Heatmap:
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_ItemStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
break;
|
||||
case SerieType.Gauge:
|
||||
EditorGUI.PropertyField(drawRect, m_GaugeType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
ChartEditorHelper.MakeTwoField(ref drawRect, pos.width, m_Center, "Center");
|
||||
//ChartEditorHelper.MakeTwoField(ref drawRect, pos.width, m_Radius, "Radius");
|
||||
EditorGUI.PropertyField(drawRect, m_Radius.GetArrayElementAtIndex(0), new GUIContent("Radius"));
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Min);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Max);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_StartAngle);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_EndAngle);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SplitNumber);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_SplitNumber.intValue > 36)
|
||||
{
|
||||
m_SplitNumber.intValue = 36;
|
||||
}
|
||||
EditorGUI.PropertyField(drawRect, m_RoundCap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_TitleStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_TitleStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_GaugeAxis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_GaugeAxis);
|
||||
EditorGUI.PropertyField(drawRect, m_GaugePointer);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_GaugePointer);
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_ItemStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
break;
|
||||
}
|
||||
EditorGUI.PropertyField(drawRect, m_Animation);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Animation);
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
m_DataFoldout[index] = EditorGUI.Foldout(drawRect, m_DataFoldout[index], "Data");
|
||||
ChartEditorHelper.MakeJsonData(ref drawRect, ref m_ShowJsonDataArea, ref m_JsonDataAreaText, prop, pos.width);
|
||||
drawRect.width = pos.width;
|
||||
if (m_DataFoldout[index])
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
float nameWid = 42;
|
||||
EditorGUI.PropertyField(new Rect(drawRect.x, drawRect.y, pos.width - 2 * nameWid - 2, pos.height), m_DataDimension);
|
||||
var nameRect = new Rect(pos.width - 2 * nameWid + 14, drawRect.y, nameWid, pos.height);
|
||||
if (GUI.Button(nameRect, new GUIContent("Name")))
|
||||
{
|
||||
m_ShowDataName.boolValue = !m_ShowDataName.boolValue;
|
||||
}
|
||||
var iconRect = new Rect(pos.width - nameWid + 14, drawRect.y, nameWid, pos.height);
|
||||
if (GUI.Button(iconRect, new GUIContent("Other")))
|
||||
{
|
||||
m_ShowDataIcon.boolValue = !m_ShowDataIcon.boolValue;
|
||||
}
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
var listSize = m_Datas.arraySize;
|
||||
listSize = EditorGUI.IntField(drawRect, "Size", listSize);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
if (listSize < 0) listSize = 0;
|
||||
if (m_DataDimension.intValue < 1) m_DataDimension.intValue = 1;
|
||||
int dimension = m_DataDimension.intValue;
|
||||
bool showName = m_ShowDataName.boolValue;
|
||||
bool showIcon = m_ShowDataIcon.boolValue;
|
||||
bool showSelected = (serieType == SerieType.Pie);
|
||||
if (listSize != m_Datas.arraySize)
|
||||
{
|
||||
while (listSize > m_Datas.arraySize)
|
||||
m_Datas.InsertArrayElementAtIndex(m_Datas.arraySize);
|
||||
while (listSize < m_Datas.arraySize)
|
||||
m_Datas.DeleteArrayElementAtIndex(m_Datas.arraySize - 1);
|
||||
}
|
||||
if (listSize > 30)
|
||||
{
|
||||
int num = listSize > 10 ? 10 : listSize;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
DrawDataElement(ref drawRect, dimension, m_Datas, showName, showIcon, showSelected, i, pos.width);
|
||||
}
|
||||
if (num >= 10)
|
||||
{
|
||||
EditorGUI.LabelField(drawRect, "...");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
DrawDataElement(ref drawRect, dimension, m_Datas, showName, showIcon, showSelected, listSize - 1, pos.width);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_Datas.arraySize; i++)
|
||||
{
|
||||
DrawDataElement(ref drawRect, dimension, m_Datas, showName, showIcon, showSelected, i, pos.width);
|
||||
}
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawDataElement(ref Rect drawRect, int dimension, SerializedProperty m_Datas, bool showName,
|
||||
bool showDetail, bool showSelected, int index, float currentWidth)
|
||||
{
|
||||
var lastX = drawRect.x;
|
||||
var lastWid = drawRect.width;
|
||||
var lastFieldWid = EditorGUIUtility.fieldWidth;
|
||||
var lastLabelWid = EditorGUIUtility.labelWidth;
|
||||
var serieData = m_Datas.GetArrayElementAtIndex(index);
|
||||
var sereName = serieData.FindPropertyRelative("m_Name");
|
||||
var selected = serieData.FindPropertyRelative("m_Selected");
|
||||
|
||||
var data = serieData.FindPropertyRelative("m_Data");
|
||||
var fieldCount = dimension + (showName ? 1 : 0);
|
||||
|
||||
if (fieldCount <= 1)
|
||||
{
|
||||
while (2 > data.arraySize)
|
||||
data.InsertArrayElementAtIndex(data.arraySize);
|
||||
SerializedProperty element = data.GetArrayElementAtIndex(1);
|
||||
if (showSelected)
|
||||
{
|
||||
drawRect.width = drawRect.width - 18;
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + index));
|
||||
drawRect.x = currentWidth - 45;
|
||||
EditorGUI.PropertyField(drawRect, selected, GUIContent.none);
|
||||
drawRect.x = lastX;
|
||||
drawRect.width = lastWid;
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + index));
|
||||
}
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.LabelField(drawRect, "Element " + index);
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15;
|
||||
var dataWidTotal = (currentWidth - (startX + 20.5f + 1));
|
||||
var dataWid = dataWidTotal / fieldCount;
|
||||
var xWid = dataWid - 4;
|
||||
for (int i = 0; i < dimension; i++)
|
||||
{
|
||||
while (i >= data.arraySize - 1)
|
||||
{
|
||||
data.InsertArrayElementAtIndex(data.arraySize);
|
||||
}
|
||||
drawRect.x = startX + i * xWid;
|
||||
drawRect.width = dataWid + 40;
|
||||
SerializedProperty element = data.GetArrayElementAtIndex(dimension <= 1 ? 1 : i);
|
||||
EditorGUI.PropertyField(drawRect, element, GUIContent.none);
|
||||
}
|
||||
if (showName)
|
||||
{
|
||||
drawRect.x = startX + (fieldCount - 1) * xWid;
|
||||
drawRect.width = dataWid + 40;
|
||||
EditorGUI.PropertyField(drawRect, sereName, GUIContent.none);
|
||||
}
|
||||
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.x = lastX;
|
||||
drawRect.width = lastWid;
|
||||
EditorGUIUtility.fieldWidth = lastFieldWid;
|
||||
EditorGUIUtility.labelWidth = lastLabelWid;
|
||||
}
|
||||
if (showDetail)
|
||||
{
|
||||
EditorGUI.indentLevel += 2;
|
||||
var m_Icon = serieData.FindPropertyRelative("m_IconStyle");
|
||||
var m_EnableLabel = serieData.FindPropertyRelative("m_EnableLabel");
|
||||
var m_Label = serieData.FindPropertyRelative("m_Label");
|
||||
EditorGUI.PropertyField(drawRect, m_Icon);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Icon);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
ChartEditorHelper.MakeBool(ref drawRect, m_EnableLabel, 1, "(enable)");
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
|
||||
EditorGUI.indentLevel -= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
int index = InitToggle(prop);
|
||||
if (!m_SerieModuleToggle[prop.propertyPath])
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
SerializedProperty type = prop.FindPropertyRelative("m_Type");
|
||||
var serieType = (SerieType)type.enumValueIndex;
|
||||
switch (serieType)
|
||||
{
|
||||
case SerieType.Line:
|
||||
height += 16 * EditorGUIUtility.singleLineHeight + 15 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Symbol"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineArrow"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_ItemStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AreaStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Bar:
|
||||
height += 17 * EditorGUIUtility.singleLineHeight + 16 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_ItemStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AreaStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Pie:
|
||||
height += 9 * EditorGUIUtility.singleLineHeight + 8 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Ring:
|
||||
height += 10 * EditorGUIUtility.singleLineHeight + 9 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TitleStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_ItemStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Radar:
|
||||
height += 4 * EditorGUIUtility.singleLineHeight + 3 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Symbol"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AreaStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Scatter:
|
||||
case SerieType.EffectScatter:
|
||||
height += 5 * EditorGUIUtility.singleLineHeight + 4 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Symbol"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Heatmap:
|
||||
height += 4 * EditorGUIUtility.singleLineHeight + 3 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_ItemStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Gauge:
|
||||
height += 13 * EditorGUIUtility.singleLineHeight + 12 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TitleStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_GaugeAxis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_GaugePointer"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_ItemStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
}
|
||||
if (m_DataFoldout[index])
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Data");
|
||||
height += 2 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
int num = m_Data.arraySize;
|
||||
if (num > 30)
|
||||
{
|
||||
num = 11;
|
||||
height += (num + 1) * EditorGUIUtility.singleLineHeight + (num) * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += (num) * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
if (prop.FindPropertyRelative("m_ShowDataIcon").boolValue)
|
||||
{
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
var item = m_Data.GetArrayElementAtIndex(i);
|
||||
//height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(item.FindPropertyRelative("m_IconStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(item.FindPropertyRelative("m_Label"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_ShowJsonDataArea)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 4 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
|
||||
private int InitToggle(SerializedProperty prop)
|
||||
{
|
||||
int index = 0;
|
||||
var sindex = prop.propertyPath.LastIndexOf('[');
|
||||
var eindex = prop.propertyPath.LastIndexOf(']');
|
||||
if (sindex >= 0 && eindex >= 0)
|
||||
{
|
||||
var str = prop.propertyPath.Substring(sindex + 1, eindex - sindex - 1);
|
||||
int.TryParse(str, out index);
|
||||
}
|
||||
if (index >= m_DataFoldout.Count)
|
||||
{
|
||||
m_DataFoldout.Add(false);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c30d9496b99e39944a6987e390bed91f
|
||||
timeCreated: 1555200849
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,127 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieLabel), true)]
|
||||
public class SerieLabelDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_SerieLabelToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Position = prop.FindPropertyRelative("m_Position");
|
||||
SerializedProperty m_Formatter = prop.FindPropertyRelative("m_Formatter");
|
||||
SerializedProperty m_Offset = prop.FindPropertyRelative("m_Offset");
|
||||
SerializedProperty m_Margin = prop.FindPropertyRelative("m_Margin");
|
||||
SerializedProperty m_Rotate = prop.FindPropertyRelative("m_Rotate");
|
||||
SerializedProperty m_PaddingLeftRight = prop.FindPropertyRelative("m_PaddingLeftRight");
|
||||
SerializedProperty m_PaddingTopBottom = prop.FindPropertyRelative("m_PaddingTopBottom");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_BackgroundColor = prop.FindPropertyRelative("m_BackgroundColor");
|
||||
SerializedProperty m_BackgroundWidth = prop.FindPropertyRelative("m_BackgroundWidth");
|
||||
SerializedProperty m_BackgroundHeight = prop.FindPropertyRelative("m_BackgroundHeight");
|
||||
SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");
|
||||
SerializedProperty m_FontStyle = prop.FindPropertyRelative("m_FontStyle");
|
||||
SerializedProperty m_Line = prop.FindPropertyRelative("m_Line");
|
||||
SerializedProperty m_LineType = prop.FindPropertyRelative("m_LineType");
|
||||
SerializedProperty m_LineColor = prop.FindPropertyRelative("m_LineColor");
|
||||
SerializedProperty m_LineWidth = prop.FindPropertyRelative("m_LineWidth");
|
||||
SerializedProperty m_LineLength1 = prop.FindPropertyRelative("m_LineLength1");
|
||||
SerializedProperty m_LineLength2 = prop.FindPropertyRelative("m_LineLength2");
|
||||
SerializedProperty m_Border = prop.FindPropertyRelative("m_Border");
|
||||
SerializedProperty m_BorderWidth = prop.FindPropertyRelative("m_BorderWidth");
|
||||
SerializedProperty m_BorderColor = prop.FindPropertyRelative("m_BorderColor");
|
||||
SerializedProperty m_ForceENotation = prop.FindPropertyRelative("m_ForceENotation");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SerieLabelToggle, prop, null, show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_SerieLabelToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Position);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.LabelField(drawRect, "Offset");
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15;
|
||||
var tempWidth = (drawRect.width - startX + 52) / 2;
|
||||
var centerXRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
var centerYRect = new Rect(centerXRect.x + tempWidth - 38, drawRect.y, tempWidth, drawRect.height);
|
||||
var x = EditorGUI.FloatField(centerXRect, m_Offset.vector3Value.x);
|
||||
var y = EditorGUI.FloatField(centerYRect, m_Offset.vector3Value.y);
|
||||
m_Offset.vector3Value = new Vector3(x, y);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Margin);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Formatter);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BackgroundColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BackgroundWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BackgroundHeight);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Rotate);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_PaddingLeftRight);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_PaddingTopBottom);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontSize);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_FontStyle);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Border);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BorderWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_BorderColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Line);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineColor);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineWidth);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineLength1);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineLength2);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ForceENotation);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_SerieLabelToggle, prop))
|
||||
{
|
||||
height += 24 * EditorGUIUtility.singleLineHeight + 23 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
height = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d30d82b48b553451fad726478777a02e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,104 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieSymbol), true)]
|
||||
public class SerieSymbolDrawer : PropertyDrawer
|
||||
{
|
||||
private Dictionary<string, bool> m_SerieSymbolToggle = new Dictionary<string, bool>();
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty m_Type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty m_SizeType = prop.FindPropertyRelative("m_SizeType");
|
||||
SerializedProperty m_Size = prop.FindPropertyRelative("m_Size");
|
||||
SerializedProperty m_SelectedSize = prop.FindPropertyRelative("m_SelectedSize");
|
||||
SerializedProperty m_DataIndex = prop.FindPropertyRelative("m_DataIndex");
|
||||
SerializedProperty m_DataScale = prop.FindPropertyRelative("m_DataScale");
|
||||
SerializedProperty m_SelectedDataScale = prop.FindPropertyRelative("m_SelectedDataScale");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_Opacity = prop.FindPropertyRelative("m_Opacity");
|
||||
SerializedProperty m_StartIndex = prop.FindPropertyRelative("m_StartIndex");
|
||||
SerializedProperty m_Interval = prop.FindPropertyRelative("m_Interval");
|
||||
SerializedProperty m_ForceShowLast = prop.FindPropertyRelative("m_ForceShowLast");
|
||||
SerializedProperty m_Gap = prop.FindPropertyRelative("m_Gap");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SerieSymbolToggle, prop, null, m_Type, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_SerieSymbolToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Gap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SizeType);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
SerieSymbolSizeType sizeType = (SerieSymbolSizeType)m_SizeType.enumValueIndex;
|
||||
switch (sizeType)
|
||||
{
|
||||
case SerieSymbolSizeType.Custom:
|
||||
EditorGUI.PropertyField(drawRect, m_Size);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SelectedSize);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case SerieSymbolSizeType.FromData:
|
||||
EditorGUI.PropertyField(drawRect, m_DataIndex);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_DataScale);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SelectedDataScale);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case SerieSymbolSizeType.Callback:
|
||||
break;
|
||||
}
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Opacity);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_StartIndex);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Interval);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ForceShowLast);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (ChartEditorHelper.IsToggle(m_SerieSymbolToggle, prop))
|
||||
{
|
||||
SerializedProperty m_SizeType = prop.FindPropertyRelative("m_SizeType");
|
||||
SerieSymbolSizeType sizeType = (SerieSymbolSizeType)m_SizeType.enumValueIndex;
|
||||
switch (sizeType)
|
||||
{
|
||||
case SerieSymbolSizeType.Custom:
|
||||
return 10 * EditorGUIUtility.singleLineHeight + 10 * EditorGUIUtility.standardVerticalSpacing;
|
||||
case SerieSymbolSizeType.FromData:
|
||||
return 11 * EditorGUIUtility.singleLineHeight + 11 * EditorGUIUtility.standardVerticalSpacing;
|
||||
case SerieSymbolSizeType.Callback:
|
||||
return 10 * EditorGUIUtility.singleLineHeight + 10 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
return 10 * EditorGUIUtility.singleLineHeight + 10 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Series), true)]
|
||||
public class SeriesDrawer : PropertyDrawer
|
||||
{
|
||||
private int m_DataSize = 0;
|
||||
private bool m_ShowJsonDataArea = false;
|
||||
private string m_JsonDataAreaText;
|
||||
private bool m_SeriesModuleToggle = false;
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty m_Series = prop.FindPropertyRelative("m_Series");
|
||||
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SeriesModuleToggle, "Series");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
//ChartEditorHelper.MakeJsonData(ref drawRect, ref m_ShowJsonDataArea, ref m_JsonDataAreaText, prop);
|
||||
drawRect.width = pos.width;
|
||||
if (m_SeriesModuleToggle)
|
||||
{
|
||||
ChartEditorHelper.MakeList(ref drawRect, ref m_DataSize, m_Series);
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (m_SeriesModuleToggle)
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Series");
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
for (int i = 0; i < m_Data.arraySize; i++)
|
||||
{
|
||||
height += EditorGUI.GetPropertyHeight(m_Data.GetArrayElementAtIndex(i));
|
||||
}
|
||||
}
|
||||
if (m_ShowJsonDataArea)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 3 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user