mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-27 11:40:13 +00:00
Compare commits
598 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2c7779493 | ||
|
|
9e95b8daa7 | ||
|
|
6d16a9c16a | ||
|
|
3b7e8184b0 | ||
|
|
33b7e5c1a4 | ||
|
|
24270e5c69 | ||
|
|
e3fb5685bf | ||
|
|
89e7a09e64 | ||
|
|
ee5efa9f8d | ||
|
|
2fe9a40f42 | ||
|
|
ddbd82bebf | ||
|
|
549ee43a37 | ||
|
|
3b9af0f8ec | ||
|
|
caee79630b | ||
|
|
a12c98b1a5 | ||
|
|
8617475808 | ||
|
|
922901380e | ||
|
|
96cb7ffc74 | ||
|
|
74cf4fe4ce | ||
|
|
eb948f03d5 | ||
|
|
6a6ab72ed8 | ||
|
|
df66f5c7ee | ||
|
|
042f9d3c01 | ||
|
|
1e6140a138 | ||
|
|
86125c597e | ||
|
|
fc346d30fb | ||
|
|
3e8bf7caee | ||
|
|
4e3182edfc | ||
|
|
b86cae6717 | ||
|
|
0c92d08f0d | ||
|
|
b1522a27d4 | ||
|
|
120c6d5408 | ||
|
|
e2120b3da6 | ||
|
|
58e6108bb2 | ||
|
|
3ef2e7c23c | ||
|
|
a361e191da | ||
|
|
f5a41b5119 | ||
|
|
42079848dc | ||
|
|
4b8374b1ae | ||
|
|
0990b11c1c | ||
|
|
99b1624b54 | ||
|
|
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 |
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']
|
||||
20
.gitignore
vendored
20
.gitignore
vendored
@@ -1,26 +1,6 @@
|
||||
/.vs
|
||||
/.vscode
|
||||
.vs
|
||||
/XCharts-ios
|
||||
/Library
|
||||
/Temp
|
||||
/Logs
|
||||
/obj
|
||||
/UnityPackageManager
|
||||
/Packages
|
||||
/ProjectSettings/XRSettings.asset
|
||||
/Assets/Res
|
||||
/Assets/Res.meta
|
||||
/Assets/Package
|
||||
/Assets/Package.meta
|
||||
/Assets/TextMesh Pro
|
||||
/Assets/TextMesh Pro.meta
|
||||
/Doc/*.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,504 +0,0 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v2.2.3](#v2.2.3)
|
||||
[v2.2.2](#v2.2.2)
|
||||
[v2.2.1](#v2.2.1)
|
||||
[v2.2.0](#v2.2.0)
|
||||
[v2.1.1](#v2.1.1)
|
||||
[v2.1.0](#v2.1.0)
|
||||
[v2.0.1](#v2.0.1)
|
||||
[v2.0.0](#v2.0.0)
|
||||
[v2.0.0-preview.2](#v2.0.0-preview.2)
|
||||
[v2.0.0-preview.1](#v2.0.0-preview.1)
|
||||
[v1.6.3](#v1.6.3)
|
||||
[v1.6.1](#v1.6.1)
|
||||
[v1.6.0](#v1.6.0)
|
||||
[v1.5.2](#v1.5.2)
|
||||
[v1.5.1](#v1.5.1)
|
||||
[v1.5.0](#v1.5.0)
|
||||
[v1.4.0](#v1.4.0)
|
||||
[v1.3.1](#v1.3.1)
|
||||
[v1.3.0](#v1.3.0)
|
||||
[v1.2.0](#v1.2.0)
|
||||
[v1.1.0](#v1.1.0)
|
||||
[v1.0.5](#v1.0.5)
|
||||
[v1.0.4](#v1.0.4)
|
||||
[v1.0.3](#v1.0.3)
|
||||
[v1.0.2](#v1.0.2)
|
||||
[v1.0.1](#v1.0.1)
|
||||
[v1.0.0](#v1.0.0)
|
||||
[v0.8.3](#v0.8.3)
|
||||
[v0.8.2](#v0.8.2)
|
||||
[v0.8.1](#v0.8.1)
|
||||
[v0.8.0](#v0.8.0)
|
||||
[v0.5.0](#v0.5.0)
|
||||
[v0.1.0](#v0.1.0)
|
||||
|
||||
## master
|
||||
|
||||
# # v2.2.3
|
||||
|
||||
* (2021.06.20) Release `v2.2.3` version
|
||||
* (2021.06.20) Fixed the default display of `Icon` in `Axis`
|
||||
|
||||
## v2.2.2
|
||||
|
||||
* (2021.06.18) Release `v2.2.2` version
|
||||
* (2021.06.18) Optimize `Axis` to automatically hide `Icon` when `Label` is empty
|
||||
* (2021.06.17) Fixed an issue where `maxCache` was set to one more number of actual data
|
||||
* (2021.06.17) Fixed an issue where `TextMeshPro` could not be opened and closed in time to refresh
|
||||
* (2021.06.17) Fixed an issue where `XCharts` always pops up when importing `XCharts`
|
||||
|
||||
## v2.2.1
|
||||
|
||||
* (2021.06.13) Release `v2.2.1` version
|
||||
* (2021.06.13) Improved support for multiple screens
|
||||
* (2021.06.12) Add `iconStyle` `align` parameter to set the horizontal alignment of the icon
|
||||
* (2021.06.12) Improve `Theme` import (#148)
|
||||
* (2021.06.10) Fixed compatibility issues with `Unity` version (#154)
|
||||
* (2021.06.05) Improved Candlestickchart support for inverse (#152)
|
||||
* (2021.06.04) Fixed `Gauge` having an abnormal pointer position when the minimum value is negative (#153)
|
||||
|
||||
## v2.2.0
|
||||
|
||||
* (2021.05.30) Release `v2.2.0` version
|
||||
* (2021.05.25) Improved `TextStyle` support for `alignment`
|
||||
* (2021.05.24) Fixed the problem that `Label` could not display properly when `PieChart` data were all `0`
|
||||
* (2021.05.24) Fixed an issue where `Serie Name` was not working on the `Add Serie` panel (#149)
|
||||
* (2021.05.23) Added `TextStyle` `autoWrap` to set whether to wrap lines
|
||||
* (2021.05.23) Added `TextStyle` `autoAlign` whether to set alignment automatically
|
||||
* (2021.05.23) Added `width` and `height` of `axisLabel` to support custom text length and width
|
||||
* (2021.05.23) Added `Axis` `iconStyle` and `icons` to support setting coordinate Axis labels to display icons
|
||||
* (2021.05.20) Added the `insertDataHead` parameter to `Serie` and `Axis` to control whether data is inserted into the head or tail
|
||||
* (2021.05.18) Optimize chart creation under `Editor` #147
|
||||
* (2021.05.16) Pull out the `Ganttchart` chart and provide it as an extension module
|
||||
* (2021.05.11) Added support for `VisualMap` to set color by `Piecewise`
|
||||
* (2021.05.09) Fixed an issue where `RingChart` could not set the background color of the ring #141
|
||||
* (2021.05.08) Added `Liquidchart` support for `Rect` shape
|
||||
* (2021.05.07) Improved the `Axis` scale performance #135
|
||||
* (2021.05.01) Added `Settings` parameters for painter's material #140
|
||||
* (2021.05.01) Fixed an issue where some super large or super small values could not be properly represented
|
||||
* (2021.04.29) Fixed an issue with `Radar` switching to `Circle` anomaly #139
|
||||
* (2021.04.29) Added `Settings`'s `reversePainter` to set whether or not `Serie` is drawn in reverse order
|
||||
* (2021.04.28) Fixed bug where `AxisLabel` displayed incorrectly with `DataRoom` (#138)
|
||||
* (2021.04.26) Fixed dynamically creating chart at runtime would be abnormal #137
|
||||
* (2021.04.26) Added support for `Barchart` to draw gradient borders
|
||||
* (2021.04.23) Added support for custom charts
|
||||
* (2021.04.22) Fixed bug where `Gauge` `axisLabel`'s text color could not be adjusted
|
||||
* (2021.04.13) Add the `ShowStarttick` and '`ShowEndTick` parameters of 'AxisTick' to control whether the first and last ticks are displayed
|
||||
* (2021.04.13) Improved multi-axis support #132
|
||||
|
||||
## v2.1.1
|
||||
|
||||
* (2021.04.13) Define the code and clear `Warning`
|
||||
* (2021.04.13) Fixed compatibility issues with `Unity` version
|
||||
* (2021.04.12) Fixed problem `missing class attribute 'ExtensionOfNativeClass'` after Theme refactoring #131
|
||||
|
||||
## v2.1.0
|
||||
|
||||
* (2021.04.07) Release `v2.1.0` version
|
||||
* (2021.03.31) Optimized and refactor `Theme` to solve problems with the same or missing references #118
|
||||
* (2021.03.30) Optimized `Tooltip` to support setting different category axis data #129
|
||||
* (2021.03.29) Optimized the custom draw callback API
|
||||
* (2021.03.25) Added `Ganttchart`
|
||||
* (2021.03.22) Added `Theme` `Unbind` button to unbind theme when copying chart #118
|
||||
* (2021.03.18) Fixed an issue where the check box after `Foldout` in `Inspector` could not be checked
|
||||
* (2021.03.18) Fixed an issue with `BarChart` displaying an exception in the `0` value
|
||||
* (2021.03.14) Fixed `Tooltip` indicator was not indicating the correct location in some cases
|
||||
* (2021.03.13) Optimized the editing experience and component refresh after `MulticomponentMode` is enabled #128
|
||||
* (2021.03.10) Added `CandlestickChart` #124
|
||||
* (2021.03.06) Added `PieChart`'s `minAngle` parameter to support setting minimum sector angle #117
|
||||
* (2021.03.05) Added support for `Legend` for several built-in ICONS #90
|
||||
* (2021.03.02) Added `DataRoom` support for value axes #71
|
||||
* (2021.03.02) Optimized `TextMeshPro` compatibility issue #125
|
||||
* (2021.03.01) Fixed display exception of hidden gameObjects when enabling and disabling a chart #125
|
||||
|
||||
## v2.0.1
|
||||
|
||||
* (2021.02.26) Fixed incorrect position of `Tooltip` in `HeatmapChart` #123
|
||||
* (2021.02.22) Fixed compatibility issues with `Unity` version
|
||||
* (2021.02.21) Added `Tooltip` parameter `ignoreDataShow`
|
||||
* (2021.02.19) Fixed an issue where charts could appear abnormal when under `LayoutGroup` control #121
|
||||
* (2021.02.18) Fixed an issue where the `Radar` could not refresh itself after parameter changing #122
|
||||
|
||||
## v2.0.0
|
||||
|
||||
* (2021.02.05) Release `v2.0.0` version
|
||||
* (2021.02.03) Fixed an issue where `Axisline` `OnZero` did not work on `YAxis` #116
|
||||
* (2021.01.29) Fixed incorrect display of `Tick` on `Category` axis when `BoundaryGap` and `alignWithLabel` are `True` #115
|
||||
* (2021.01.25) Optimized some details
|
||||
* (2021.01.22) Fixed a `Inpsector` displayed error
|
||||
|
||||
## v2.0.0-preview.2
|
||||
|
||||
* (2021.01.21) Release `v2.0.0-preview.2` version
|
||||
* (2021.01.21) Fixed an error about `AxisTick` in `Inpsector`
|
||||
* (2021.01.21) Fixed a build compatibility error
|
||||
* (2021.01.19) Added `XChartsSettings` `editorShowAllListData` parameter to configure whether to display all the list's data in Inspector
|
||||
|
||||
## v2.0.0-preview.1
|
||||
|
||||
* (2021.01.19) Release `v2.0.0-preview.1` version
|
||||
|
||||
## v1.6.3
|
||||
|
||||
* (2021.01.02) Release `v1.6.3` version
|
||||
* (2020.12.18) fixed an issue where updating data when `Animation` was not enabled caused the chart to keep refreshing
|
||||
* (2020.12.01) fixed an issue where a newly created chart on `Unity2020` could not be drawn properly
|
||||
|
||||
## v1.6.2
|
||||
|
||||
* (2020.11.22) Release `v1.6.2` version
|
||||
* (2020.11.22) Fixed an issue where `LineChart` draws an exception when the data is too dense #99
|
||||
* (2020.11.21) Fixed an issue where the scale position of `LineChart` could be abnormal if `alignWithLabel` was `true`
|
||||
* (2020.11.21) Fixed `Unity5` compatibility error reporting problem
|
||||
* (2020.11.13) Improved `RadarChart` `Indicator` support for `\n` line feed
|
||||
* (2020.11.12) Fixed `LineChart` reporting errors when the type was `Smooth` when the data was too secure #100
|
||||
* (2020.10.22) Optimized the support of `VisualMap` for `Piecewise` in `HeatmapChart`
|
||||
* (2020.09.22) Fixed `PieChart` inconsistent border size
|
||||
* (2020.09.18) Added `Remove All Chart Object` to Remove All child nodes under the Chart (automatically reinitialized)
|
||||
* (2020.09.18) Fixed `SerieLabel` also displayed after hided `Serie` by clicked the legend #94
|
||||
* (2020.09.18) Optimized coordinate axis calibration and text display #93
|
||||
* (2020.09.17) Fixed `Package` import missing `meta` file causing failure #92
|
||||
* (2020.09.08) Optimized the color of `Legend` to automatically match the custom color of `ItemStyle`
|
||||
* (2020.09.05) Optimized `LineChart` to display `XAxis1` without using `XAxis1`.
|
||||
* (2020.08.29) Added `toColor` and `toColor2` of `LineStyle` to set the horizontal gradient of `LineChart`. Cancel `ItemStyle` to set the horizontal gradient of `LineChart`.
|
||||
* (2020.08.29) Added the `onPointerClickPie` of `PieChart`, a callback function of click pie area.
|
||||
* (2020.08.29) Added the `onPointerClickBar` of `BarChart`, a callback function of click bar.
|
||||
|
||||
## v1.6.0
|
||||
|
||||
* (2020.08.24) Release `v1.6.0` version
|
||||
* (2020.08.23) Refactor code, replace `Color` with `Color32` for reduce implicit conversion (Can cause custom colors to lose, reference [Q&A 29](https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Assets/XCharts/Documentation/xcharts-questions-and-answers-EN.md) to upgrade)
|
||||
* (2020.08.15) Optimized `PieChart` drawing performance effect #85
|
||||
* (2020.08.11) Added `LiquidChart` data change animation#83
|
||||
* (2020.08.11) Optimized `PieChart` text stack and lead line effects#85
|
||||
* (2020.08.08) Optimized `LineChart` the rendering performance of dense data
|
||||
* (2020.07.30) Added `LineChart` to configure gradient through `VisualMap` or `ItemStyle`#78
|
||||
* (2020.07.25) Fixed a problem with `LineChart` emerging abnormal in animation drawing#79
|
||||
* (2020.07.25) Fixed a problem with gradual discoloration on `LiquidChart` at `100%`#80
|
||||
* (2020.07.25) Added `RadarChart` support for `formatter` of `Tooltip`#77
|
||||
* (2020.07.23) Added `RingChart` ring gradient support#75
|
||||
* (2020.07.21) Added `formatter` of `AxisLabel` and `SerieLabel` to configure numeric formatting separately.
|
||||
* (2020.07.17) Added animation completion callback interface for `SerieAnimation`.
|
||||
* (2020.07.17) Optimized `Chart` under `ScrollView` without affecting the scrolling and dragging of `ScrollView`.
|
||||
* (2020.07.16) Fixed a problem with `Tooltip` that would also show up if it was blocked on top. #74
|
||||
* (2020.07.07) Fixed issue where `SerieLabel` position was out of order
|
||||
* (2020.07.07) Added `Tooltip` to the `offset` parameter
|
||||
* (2020.07.06) Added `Liquidchart`
|
||||
* (2020.07.01) Added `PolarChart`
|
||||
|
||||
## v1.5.2
|
||||
|
||||
* (2020.06.25) Fixed an issue where `BarChart` would draw a small number of bars when the value was `0`
|
||||
* (2020.06.24) Fixed an issue where `PieChart` was drawing abnormally after setting `Clockwise` #65
|
||||
* (2020.06.23) Optimized the drawing effect of `LineChart` when the difference between peak and valley is too large #64
|
||||
* (2020.06.18) Fixed an issue where `SerieLabel` might not be displayed when adding data again
|
||||
* (2020.06.17) Added `SerieData` to `serieSymbol` #66
|
||||
* (2020.06.17) Fixed `Check For Update` bug in `Unity 2018` version #63
|
||||
* (2020.06.16) Added `Serie` `avoidLabelOverlap` parameter to avoid pie chart TAB stacking #56
|
||||
* (2020.06.15) Fixed an issue where the `SerieLabel` control display could be deranged
|
||||
* (2020.06.11) Fixed `Check warning` not working
|
||||
* (2020.06.11) Fixed issue where `Piechart` and `Ringchart` were not displayed when data fraction was very small
|
||||
* (2020.06.11) Added `Tooltip` to `titleFormatter` to support configuration placeholder `{i}` to ignore not showing titles
|
||||
* (2020.06.07) Added `customFadeInDelay` and other custom data item delay and duration callback function #58
|
||||
* (2020.06.07) Optimized `Piechart` to display equal parts when all the data are `0` #59
|
||||
* (2020.06.04) Added `autoOffset` parameter setting for `SerieLabel` to determine whether the up and down offset is automatically determined
|
||||
* (2020.06.04) Added `Tooltip` to `AlwayShow` parameter setting to always show after triggering
|
||||
* (2020.06.04) Tooltip's `formatter` supports `{.1}` wildcards
|
||||
* (2020.06.04) Optimizes the number of `Legend` to automatically wrap to display #53
|
||||
|
||||
## v1.5.1
|
||||
|
||||
* (2020.06.03) 发布`v1.5.1`版本
|
||||
* (2020.06.02) 增加`Radar`的`ceilRate`,设置最大最小值的取整倍率
|
||||
* (2020.06.02) 优化`Tooltip`的`formatter`,支持`{c1:1-1:f1}`格式配置
|
||||
* (2020.05.31) 优化`Background`组件的生效条件,需要有单独的父节点(升级前需要自己处理旧的背景节点)
|
||||
* (2020.05.30) 优化`PieChart`支持设置`ignoreValue`不显示指定数据
|
||||
* (2020.05.30) 修复`RadarChart`为`Circle`时不绘制`SplitArea`的问题
|
||||
* (2020.05.30) 优化`RadarChart`在设置`max`为`0`时可自动刷新最大值
|
||||
* (2020.05.29) 修复`PieChart`设置`space`时只有一个数据时绘制异常的问题
|
||||
* (2020.05.27) 修复调用`UpdateDataName()`接口时不会自动刷新的问题
|
||||
* (2020.05.27) 优化`柱状图`的渐变色效果
|
||||
* (2020.05.24) 修复`Axis`同时设置`boundaryGap`和`alignWithLabel`时`Tick`绘制异常的问题
|
||||
* (2020.05.24) 优化版本更新检测
|
||||
* (2020.06.25) release `v1.5.2`
|
||||
|
||||
|
||||
## v1.5.0
|
||||
|
||||
* (2020.05.22) 发布`v1.5.0`版本
|
||||
* (2020.05.21) 增加`圆角柱图`支持渐变
|
||||
* (2020.05.21) 增加`Background`背景组件
|
||||
* (2020.05.19) 隐藏`Hierarchy`试图下自动生成的子节点
|
||||
* (2020.05.18) 增加`chartName`属性可指定图表的别称,可通过`XChartMgr.Instance.GetChart(chartName)`获取图表
|
||||
* (2020.05.16) 增加部分鼠标事件回调
|
||||
* (2020.05.15) 优化自带例子,`Demo`改名为`Example`
|
||||
* (2020.05.13) 增加`Serie`的`large`和`largeThreshold`参数配置折线图和柱状图的性能模式
|
||||
* (2020.05.13) 完善Demo,增加性能演示Demo
|
||||
* (2020.05.13) 优化性能,优化大数据绘制,重构代码
|
||||
* (2020.05.04) 增加`numericFormatter`参数可配置数值格式化显示,去掉`forceENotation`参数
|
||||
* (2020.04.28) 增加`自由锚点`支持,任意对齐方式
|
||||
* (2020.04.23) 优化`ScatterChart`的`Tooltip`显示效果
|
||||
* (2020.04.23) 增加`Tooltip`的`formatter`对`{.}`、`{c:0}`、`{c1:1}`的支持
|
||||
* (2020.04.19) 优化`LineChart`折线图的区域填充渐变效果
|
||||
* (2020.04.19) 增加`AxisLabel`的`onZero`参数可将`Label`显示在`0`刻度上
|
||||
* (2020.04.19) 增加`Serie`和`AxisLabel`的`showAsPositiveNumber`参数将负数数值显示为正数
|
||||
* (2020.04.18) 增加`Covert XY Axis`互换XY轴配置
|
||||
* (2020.04.17) 增加`Axis`可通过`inverse`参数设置坐标轴反转
|
||||
* (2020.04.16) 修复`Check warning`在`Unity2019.3`上的显示问题
|
||||
* (2020.04.16) 修复`PieChart`在设置`Space`参数后动画绘制异常的问题
|
||||
|
||||
## v1.4.0
|
||||
|
||||
* (2020.04.11) 发布`v1.4.0`版本
|
||||
* (2020.04.11) 增加`Check warning`检测功能
|
||||
* (2020.04.09) 修复`Legend`初始化异常的问题
|
||||
* (2020.04.08) 增加`PieChart`通过`ItemStyle`设置边框的支持
|
||||
* (2020.03.29) 增加`Axis`的`ceilRate`设置最大最小值的取整倍率
|
||||
* (2020.03.29) 增加`BarChart`可通过`itemStyle`的`cornerRadius`设置`圆角柱图`
|
||||
* (2020.03.29) 增加`itemStyle`的`cornerRadius`支持圆角矩形
|
||||
* (2020.03.24) 优化`Editor`参数编辑,兼容`Unity2019.3`及以上版本
|
||||
* (2020.03.24) 增加`Serie`在`inspector`上可进行调整顺序、添加和删除操作
|
||||
* (2020.03.23) 修复`Title`的`textStyle`和`subTextStyle`无效的问题
|
||||
* (2020.03.22) 增加`BarChart`通过`barType`参数设置`胶囊柱状图`
|
||||
* (2020.03.21) 增加`BarChart`和`HeatmapChart`可通过`ignore`参数设置忽略数据的支持
|
||||
* (2020.03.21) 增加`ItemStyle`的`tooltipFormatter`参数可单独配置`Serie`的`Tooltip`显示
|
||||
* (2020.03.20) 修复`X Axis 1`和`Y Axis 1`配置变更时不会自动刷新的问题
|
||||
* (2020.03.20) 增加`AxisTick`的`width`参数可单独设置坐标轴刻度的宽度
|
||||
* (2020.03.20) 增加`Serie`的`radarType`参数设置`多圈`和`单圈`雷达图
|
||||
* (2020.03.17) 增加`BarChart`可用`ItemStyle`的`backgroundColor`设置数据项背景颜色
|
||||
* (2020.03.17) 增加`SerieData`的`ItemStyle`和`Emphasis`可单独配置数据项样式的支持
|
||||
* (2020.03.15) 重构`EmptyCricle`类型的`Symbol`边宽取自`ItemStyle`的`borderWidth`参数
|
||||
* (2020.03.15) 重构`SerieSymbol`,去掉`color`和`opacity`参数,取自`ItemStyle`
|
||||
|
||||
## v1.3.1
|
||||
|
||||
* (2020.03.14) 发布`v1.3.1`版本
|
||||
* (2020.03.14) 修复`LineChart`开启`ingore`时部分数据可能绘制异常的问题
|
||||
* (2020.03.13) 修复`LineChart`的`label`偏移显示异常的问题
|
||||
|
||||
## v1.3.0
|
||||
|
||||
* (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`的支持
|
||||
|
||||
## v1.2.0
|
||||
|
||||
* (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接口
|
||||
|
||||
## v1.1.0
|
||||
|
||||
* (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`等参数不生效的问题
|
||||
|
||||
## v1.0.5
|
||||
|
||||
* (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`两部分
|
||||
|
||||
## v1.0.4
|
||||
|
||||
* (2019.11.05) 发布`v1.0.4`版本
|
||||
* (2019.11.05) 增加`Radar`雷达组件文本样式参数配置支持
|
||||
* (2019.11.04) 修复`Unity2018.3`以下版本代码不兼容的问题
|
||||
* (2019.11.04) 优化`SerieLabel`过多时引起的性能问题
|
||||
|
||||
## v1.0.3
|
||||
|
||||
* (2019.11.03) 发布`v1.0.3`版本
|
||||
* (2019.11.03) 增加`Editor`快捷添加图表:`Hierarchy`试图下右键`XCharts->LineChart`
|
||||
* (2019.11.02) 优化非配置参数变量命名和访问权限,简化`API`
|
||||
|
||||
## v1.0.2
|
||||
|
||||
* (2019.10.31) 发布`v1.0.2`版本
|
||||
* (2019.10.31) 修复`prefab`预设制作报错的问题
|
||||
* (2019.10.31) 增加访问主题组件API:`BaseChart.theme`
|
||||
|
||||
## v1.0.1
|
||||
|
||||
* (2019.10.26) 发布`v1.0.1`版本
|
||||
* (2019.10.26) 修复版本检查功能在非运行时异常的问题
|
||||
* (2019.10.26) 增加科学计数法显示数值的支持(查阅`forceENotation`参数)
|
||||
* (2019.10.26) 增加`Axis`类目轴数据为空时的默认显示支持
|
||||
* (2019.10.26) 增加`Axis`数值轴的最大最小值可设置为小数的支持,优化极小数图表的表现效果
|
||||
|
||||
## v1.0.0
|
||||
|
||||
* (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`中配置
|
||||
|
||||
## v0.8.3
|
||||
|
||||
* (2019.08.15) 发布`v0.8.3`版本
|
||||
* (2019.08.14) 修复`PieChart`的`Label`无法自动更新的问题
|
||||
* (2019.08.13) 修复`UpdateData`接口无法更新数据的问题
|
||||
* (2019.08.07) 增加`SerieSymbol`的`Color`、`Opacity`配置
|
||||
|
||||
## v0.8.2
|
||||
|
||||
* (2019.08.07) 发布`v0.8.2`版本
|
||||
* (2019.08.07) 修复区域平滑折线图显示异常的问题
|
||||
* (2019.08.06) 修复`serie`系列数超过调色盘颜色数时获取的颜色异常的问题
|
||||
* (2019.08.06) 修复当`Axis`的`minMaxType`为`Custom`时`max`设置为`100`不生效的问题
|
||||
|
||||
## v0.8.1
|
||||
|
||||
* (2019.08.04) 发布`v0.8.1`版本
|
||||
* (2019.08.04) 修复`Inspector`中修改数据不生效的问题
|
||||
|
||||
## v0.8.0
|
||||
|
||||
* (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) 增加`双坐标轴`支持,代码改动较大
|
||||
|
||||
## v0.5.0
|
||||
|
||||
* (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`三种默认主题
|
||||
|
||||
## v0.1.0
|
||||
|
||||
* (2018.09.05) 发布`v0.1.0`版本
|
||||
@@ -1,506 +0,0 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v2.2.3](#v2.2.3)
|
||||
[v2.2.2](#v2.2.2)
|
||||
[v2.2.1](#v2.2.1)
|
||||
[v2.2.0](#v2.2.0)
|
||||
[v2.1.1](#v2.1.1)
|
||||
[v2.1.0](#v2.1.0)
|
||||
[v2.0.1](#v2.0.1)
|
||||
[v2.0.0](#v2.0.0)
|
||||
[v2.0.0-preview.2](#v2.0.0-preview.2)
|
||||
[v2.0.0-preview.1](#v2.0.0-preview.1)
|
||||
[v1.6.3](#v1.6.3)
|
||||
[v1.6.1](#v1.6.1)
|
||||
[v1.6.0](#v1.6.0)
|
||||
[v1.5.2](#v1.5.2)
|
||||
[v1.5.1](#v1.5.1)
|
||||
[v1.5.0](#v1.5.0)
|
||||
[v1.4.0](#v1.4.0)
|
||||
[v1.3.1](#v1.3.1)
|
||||
[v1.3.0](#v1.3.0)
|
||||
[v1.2.0](#v1.2.0)
|
||||
[v1.1.0](#v1.1.0)
|
||||
[v1.0.5](#v1.0.5)
|
||||
[v1.0.4](#v1.0.4)
|
||||
[v1.0.3](#v1.0.3)
|
||||
[v1.0.2](#v1.0.2)
|
||||
[v1.0.1](#v1.0.1)
|
||||
[v1.0.0](#v1.0.0)
|
||||
[v0.8.3](#v0.8.3)
|
||||
[v0.8.2](#v0.8.2)
|
||||
[v0.8.1](#v0.8.1)
|
||||
[v0.8.0](#v0.8.0)
|
||||
[v0.5.0](#v0.5.0)
|
||||
[v0.1.0](#v0.1.0)
|
||||
|
||||
## master
|
||||
|
||||
## v2.2.3
|
||||
|
||||
* (2021.06.20) 发布`v2.2.3`版本
|
||||
* (2021.06.20) 修复`Axis`的`Icon`默认显示出来的问题
|
||||
|
||||
## v2.2.2
|
||||
|
||||
* (2021.06.18) 发布`v2.2.2`版本
|
||||
* (2021.06.18) 优化`Axis`的`Label`为空时自动隐藏`Icon`
|
||||
* (2021.06.17) 修复`maxCache`设置时实际数据个数多一个的问题
|
||||
* (2021.06.17) 修复`TextMeshPro`的开启和关闭不及时刷新的问题
|
||||
* (2021.06.17) 修复`XCharts`导入时总是弹出`XCharts Importer`的问题
|
||||
|
||||
## v2.2.1
|
||||
|
||||
* (2021.06.13) 发布`v2.2.1`版本
|
||||
* (2021.06.13) 完善对多屏幕的支持
|
||||
* (2021.06.12) 增加`IconStyle`的`align`参数设置图标的水平对齐
|
||||
* (2021.06.12) 完善`Theme`主题导入 (#148)
|
||||
* (2021.06.10) 修复`Unity`版本兼容问题 (#154)
|
||||
* (2021.06.05) 完善`CandlestickChart`对`inverse`的支持 (#152)
|
||||
* (2021.06.04) 修复`Gauge`在最小值为负数时指针指示位置异常的问题 (#153)
|
||||
|
||||
## v2.2.0
|
||||
|
||||
* (2021.05.30) 发布`v2.2.0`版本
|
||||
* (2021.05.25) 完善`TextStyle`的`alignment`的支持 (#150)
|
||||
* (2021.05.24) 修复`PieChart`数据全为`0`时`Label`无法正常显示的问题
|
||||
* (2021.05.24) 修复`Add Serie`面板上`Serie Name`不生效的问题 (#149)
|
||||
* (2021.05.23) 增加`TextStyle`的`autoWrap`设置是否自动换行
|
||||
* (2021.05.23) 增加`TextStyle`的`autoAlign`设置是否让系统自动设置对齐方式
|
||||
* (2021.05.23) 增加`AxisLabel`的`width`和`height`支持自定义文本的长宽
|
||||
* (2021.05.23) 增加`Axis`的`iconStyle`和`icons`支持设置坐标轴标签显示图标
|
||||
* (2021.05.20) 增加`Serie`和`Axis`的`insertDataToHead`参数控制数据插入头部还是尾部
|
||||
* (2021.05.18) 优化`Editor`下的图表创建 #147
|
||||
* (2021.05.16) 抽离`GanttChart`甘特图,通过扩展模块的方式来提供
|
||||
* (2021.05.11) 增加`VisualMap`对`Piecewise`分段设置颜色的支持
|
||||
* (2021.05.09) 修复`RingChart`无法设置环形的背景色的问题 #141
|
||||
* (2021.05.08) 增加`LiquidChart`的方形水位图支持
|
||||
* (2021.05.07) 优化`Axis`的刻度表现 #135
|
||||
* (2021.05.01) 增加`Settings`中关于关于材质球设置的参数 #140
|
||||
* (2021.05.01) 修复无法正确表示部分超大或超小数值的问题
|
||||
* (2021.04.29) 修复`Radar`切换到`Circle`异常的问题 #139
|
||||
* (2021.04.29) 增加`Settings`的`reversePainter`可设置`Serie`的绘制是否逆序
|
||||
* (2021.04.28) 增加`SerieData`的`ignore`可忽略当前数据项
|
||||
* (2021.04.28) 修复`DataZoom`下`AxisLabel`显示不准确的问题 #138
|
||||
* (2021.04.26) 修复运行时动态创建图表会异常的问题 #137
|
||||
* (2021.04.26) 增加`BarChart`绘制渐变边框的支持
|
||||
* (2021.04.23) 增加自定义图表支持
|
||||
* (2021.04.22) 修复`Gauge`的`AxisLabel`和文字颜色无法调整的问题
|
||||
* (2021.04.13) 增加`AxisTick`的`ShowStartTick`和`ShowEndTick`参数控制第一个和最后一个刻度是否显示
|
||||
* (2021.04.13) 完善多坐标轴的支持 #132
|
||||
|
||||
## v2.1.1
|
||||
|
||||
* (2021.04.13) 整理代码,清除`Warning`
|
||||
* (2021.04.13) 修复`Unity`版本兼容问题
|
||||
* (2021.04.12) 修复`Theme`重构后引起的`missing class attribute 'ExtensionOfNativeClass'`的问题 #131
|
||||
|
||||
## v2.1.0
|
||||
|
||||
* (2021.04.07) 发布`v2.1.0`版本
|
||||
* (2021.03.31) 优化和重构`Theme`,解决引用相同或丢失的问题 #118
|
||||
* (2021.03.30) 优化`Tooltip`支持设置不同的类目轴数据 #129
|
||||
* (2021.03.29) 优化自定义绘制回调接口,增加`onCustomDrawBeforeSerie`、`onCustomDrawAfterSerie`和`onCustomDrawTop`
|
||||
* (2021.03.25) 增加`GanttChart`甘特图
|
||||
* (2021.03.22) 增加`Theme`的`Unbind`按钮用于解绑复制图表时的主题 #118
|
||||
* (2021.03.18) 修复`Inspector`下`Foldout`后的勾选框无法选中的问题
|
||||
* (2021.03.18) 修复`BarChart`在`0`数值时显示异常的问题
|
||||
* (2021.03.14) 修复`Tooltip`的指示器在某些情况下指示位置不准的问题
|
||||
* (2021.03.13) 优化`MultiComponentMode`开启后的编辑体验和组件刷新 #128
|
||||
* (2021.03.10) 增加`CandlestickChart`K线图 #124
|
||||
* (2021.03.06) 增加`PieChart`的`minAngle`参数支持设置最小扇区角度 #117
|
||||
* (2021.03.05) 增加`Legend`几种内置图标的支持 #90
|
||||
* (2021.03.02) 增加`DataZoom`对数值轴的支持 #71
|
||||
* (2021.03.02) 优化`TextMeshPro`兼容问题 #125
|
||||
* (2021.03.01) 修复隐藏和显示图表时部分已隐藏的节点显示异常的问题 #125
|
||||
|
||||
## v2.0.1
|
||||
|
||||
* (2021.02.26) 修复`HeatmapChart`的`Tooltip`指示的位置不准的问题 #123
|
||||
* (2021.02.22) 修复`Unity`版本兼容问题
|
||||
* (2021.02.21) 增加`Tooltip`的`ignoreDataShow`参数
|
||||
* (2021.02.19) 修复图表在`LayoutGroup`控制下时可能显示错乱的问题 #121
|
||||
* (2021.02.18) 修复`Radar`参数变更后无法自刷新的问题 #122
|
||||
|
||||
## v2.0.0
|
||||
|
||||
* (2021.02.05) 发布`v2.0.0`版本
|
||||
* (2021.02.03) 修复`AxisLine`的`OnZero`对`YAxis`不生效的问题 #116
|
||||
* (2021.01.29) 修复`Category`轴在`BoundaryGap`和`AlignWithLabel`为`True`时`Tick`显示效果不对的问题 #115
|
||||
* (2021.01.25) 优化一些细节
|
||||
* (2021.01.22) 修复`Inpsector`上部分属性显示异常的问题
|
||||
|
||||
## v2.0.0-preview.2
|
||||
|
||||
* (2021.01.21) 发布`v2.0.0-preview.2`版本
|
||||
* (2021.01.21) 修复`Inpsector`上展开`AxisTick`时报错问题
|
||||
* (2021.01.21) 修复打包兼容报错问题
|
||||
* (2021.01.19) 增加`XChartsSettings`的`editorShowAllListData`参数配置是否在`Inspector`中显示列表的所有数据
|
||||
|
||||
## v2.0.0-preview.1
|
||||
|
||||
* (2021.01.19) 发布`v2.0.0-preview.1`版本
|
||||
|
||||
## v1.6.3
|
||||
|
||||
* (2021.01.02) 发布`v1.6.3`版本
|
||||
* (2020.12.18) 修复`Animation`不启用时更新数据会导致图表一直刷新的问题
|
||||
* (2020.12.01) 修复`Unity2020`上新创建的图表无法正常绘制的问题
|
||||
* (2020.11.22) 发布`v1.6.2`版本
|
||||
* (2020.11.22) 修复`LineChart`在数据过于密集时折线绘制异常的问题 #99
|
||||
* (2020.11.21) 修复`LineChart`的刻度位置在`alignWithLabel`为`true`时可能异常的问题
|
||||
* (2020.11.21) 修复`Unity5`兼容报错的问题
|
||||
* (2020.11.13) 完善`RadarChart`的`Indicator`对`\n`换行的支持
|
||||
* (2020.11.12) 修复`LineChart`当类型为`Smooth`时数据过密情况下报错的问题 #100
|
||||
* (2020.10.22) 完善`HeatmapChart`中`VisualMap`对`Piecewise`的支持
|
||||
* (2020.09.22) 修复`PieChart`边框大小不一致的问题
|
||||
|
||||
## v1.6.1
|
||||
|
||||
* (2020.09.19) 发布`v1.6.1`版本
|
||||
* (2020.09.19) 增加`Remove All Chart Object`移除图表下的所有子节点(会自动重新初始化)
|
||||
* (2020.09.18) 修复`SerieLabel`在点击图例隐藏`Serie`后还显示的问题#94
|
||||
* (2020.09.18) 优化`Axis`的类目轴刻度和文本显示#93
|
||||
* (2020.09.17) 修复`Package`导入时缺失`meta`文件导致失败的问题#92
|
||||
* (2020.09.08) 优化`Legend`的颜色可自动匹配`ItemStyle`的自定义颜色#89
|
||||
* (2020.09.05) 优化`LineChart`在不使用`XAxis1`时也能显示`XAxis1`
|
||||
* (2020.08.29) 增加`LineStyle`的`toColor`和`toColor2`设置`LineChart`的水平渐变,取消通过`ItemStyle`设置`LineChart`的水平渐变
|
||||
* (2020.08.29) 增加`PieChart`的`onPointerClickPie`点击扇形图扇区回调
|
||||
* (2020.08.29) 增加`BarChart`的`onPointerClickBar`点击柱形图柱条回调
|
||||
|
||||
## v1.6.0
|
||||
|
||||
* (2020.08.24) 发布`v1.6.0`版本
|
||||
* (2020.08.23) 重构代码,将与绘制相关的`Color`改为`Color32`,减少隐式转换(更新后会导致自定义的颜色丢失,可参考[问答29](https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Assets/XCharts/Documentation/XCharts问答.md)进行升级)
|
||||
* (2020.08.15) 优化`PieChart`绘制表现效果#85
|
||||
* (2020.08.11) 增加`LiquidChart`数据变更动画#83
|
||||
* (2020.08.11) 优化`PieChart`文本堆叠和引线效果#85
|
||||
* (2020.08.08) 优化`LineChart`密集数据的绘制表现效果
|
||||
* (2020.07.30) 增加`LineChart`可通过`VisualMap`或`ItemStyle`配置渐变#78
|
||||
* (2020.07.25) 修复`LineChart`渐出动画绘制异常的问题#79
|
||||
* (2020.07.25) 修复`LiquidChart`在`100%`时渐变色会失效的问题#80
|
||||
* (2020.07.25) 增加`RadarChart`对`Tooltip`的`formatter`支持#77
|
||||
* (2020.07.23) 增加`RingChart`环形渐变支持#75
|
||||
* (2020.07.21) 增加`AxisLabel`和`SerieLabel`的`formatter`可单独配置数值格式化#68
|
||||
* (2020.07.17) 增加`SerieAnimation`动画完成回调接口
|
||||
* (2020.07.17) 优化`Chart`放在`ScrollView`下时不影响`ScrollView`的滚动和拖动
|
||||
* (2020.07.16) 修复`Tooltip`在上层有遮挡还会显示的问题#74
|
||||
* (2020.07.08) 优化`Scatter`类型`Serie`支持`Log`轴#70
|
||||
* (2020.07.07) 修复`SerieLabel`位置错乱的问题
|
||||
* (2020.07.07) 增加`Tooltip`的`offset`参数配置偏移
|
||||
* (2020.07.06) 增加`LiquidChart`水位图
|
||||
* (2020.07.01) 增加`PolarChart`极坐标图表
|
||||
|
||||
## v1.5.2
|
||||
|
||||
* (2020.06.25) 发布`v1.5.2`版本
|
||||
* (2020.06.25) 修复`BarChart`在数值为`0`时还会绘制一小部分柱条的问题
|
||||
* (2020.06.24) 修复`PieChart`在设置`clockwise`后绘制异常的问题#65
|
||||
* (2020.06.23) 优化`LineChart`在峰谷差异过大时的绘制效果#64
|
||||
* (2020.06.18) 修复`SerieLabel`在重新添加数据时可能不显示的问题
|
||||
* (2020.06.17) 增加`SerieData`可单独设置`SerieSymbol`#66
|
||||
* (2020.06.17) 修复`Check For Update`在`Unity 2018`部分版本报错的问题#63
|
||||
* (2020.06.16) 增加`Serie`的`avoidLabelOverlap`参数避免饼图标签堆叠的情况#56
|
||||
* (2020.06.15) 修复`SerieLabel`单独控制显示时可能错乱的问题
|
||||
* (2020.06.11) 修复`Check warning`不生效的问题
|
||||
* (2020.06.11) 修复`PieChart`和`RingChart`在数据占比很小时不显示的问题
|
||||
* (2020.06.11) 增加`Tooltip`的`titleFormatter`支持配置占位符`{i}`表示忽略不显示标题
|
||||
* (2020.06.07) 增加`Animation`的`customFadeInDelay`等自定义数据项延时和时长回调函数#58
|
||||
* (2020.06.07) 优化`PieChart`在数据全为`0`时的显示为等份的效果#59
|
||||
* (2020.06.04) 增加`SerieLabel`的`autoOffset`参数设置是否自动判断上下偏移
|
||||
* (2020.06.04) 增加`Tooltip`的`alwayShow`参数设置触发后一直显示
|
||||
* (2020.06.04) 优化`Tooltip`的`formatter`支持`{.1}`通配符
|
||||
* (2020.06.04) 优化`Legend`数量过多时自动换行显示#53
|
||||
|
||||
## v1.5.1
|
||||
|
||||
* (2020.06.03) 发布`v1.5.1`版本
|
||||
* (2020.06.02) 增加`Radar`的`ceilRate`,设置最大最小值的取整倍率
|
||||
* (2020.06.02) 优化`Tooltip`的`formatter`,支持`{c1:1-1:f1}`格式配置
|
||||
* (2020.05.31) 优化`Background`组件的生效条件,需要有单独的父节点(升级前需要自己处理旧的背景节点)
|
||||
* (2020.05.30) 优化`PieChart`支持设置`ignoreValue`不显示指定数据
|
||||
* (2020.05.30) 修复`RadarChart`为`Circle`时不绘制`SplitArea`的问题
|
||||
* (2020.05.30) 优化`RadarChart`在设置`max`为`0`时可自动刷新最大值
|
||||
* (2020.05.29) 修复`PieChart`设置`space`时只有一个数据时绘制异常的问题
|
||||
* (2020.05.27) 修复调用`UpdateDataName()`接口时不会自动刷新的问题
|
||||
* (2020.05.27) 优化`柱状图`的渐变色效果
|
||||
* (2020.05.24) 修复`Axis`同时设置`boundaryGap`和`alignWithLabel`时`Tick`绘制异常的问题
|
||||
* (2020.05.24) 优化版本更新检测
|
||||
|
||||
## v1.5.0
|
||||
|
||||
* (2020.05.22) 发布`v1.5.0`版本
|
||||
* (2020.05.21) 增加`圆角柱图`支持渐变
|
||||
* (2020.05.21) 增加`Background`背景组件
|
||||
* (2020.05.19) 隐藏`Hierarchy`试图下自动生成的子节点
|
||||
* (2020.05.18) 增加`chartName`属性可指定图表的别称,可通过`XChartMgr.Instance.GetChart(chartName)`获取图表
|
||||
* (2020.05.16) 增加部分鼠标事件回调
|
||||
* (2020.05.15) 优化自带例子,`Demo`改名为`Example`
|
||||
* (2020.05.13) 增加`Serie`的`large`和`largeThreshold`参数配置折线图和柱状图的性能模式
|
||||
* (2020.05.13) 完善Demo,增加性能演示Demo
|
||||
* (2020.05.13) 优化性能,优化大数据绘制,重构代码
|
||||
* (2020.05.04) 增加`numericFormatter`参数可配置数值格式化显示,去掉`forceENotation`参数
|
||||
* (2020.04.28) 增加`自由锚点`支持,任意对齐方式
|
||||
* (2020.04.23) 优化`ScatterChart`的`Tooltip`显示效果
|
||||
* (2020.04.23) 增加`Tooltip`的`formatter`对`{.}`、`{c:0}`、`{c1:1}`的支持
|
||||
* (2020.04.19) 优化`LineChart`折线图的区域填充渐变效果
|
||||
* (2020.04.19) 增加`AxisLabel`的`onZero`参数可将`Label`显示在`0`刻度上
|
||||
* (2020.04.19) 增加`Serie`和`AxisLabel`的`showAsPositiveNumber`参数将负数数值显示为正数
|
||||
* (2020.04.18) 增加`Covert XY Axis`互换XY轴配置
|
||||
* (2020.04.17) 增加`Axis`可通过`inverse`参数设置坐标轴反转
|
||||
* (2020.04.16) 修复`Check warning`在`Unity2019.3`上的显示问题
|
||||
* (2020.04.16) 修复`PieChart`在设置`Space`参数后动画绘制异常的问题
|
||||
|
||||
## v1.4.0
|
||||
|
||||
* (2020.04.11) 发布`v1.4.0`版本
|
||||
* (2020.04.11) 增加`Check warning`检测功能
|
||||
* (2020.04.09) 修复`Legend`初始化异常的问题
|
||||
* (2020.04.08) 增加`PieChart`通过`ItemStyle`设置边框的支持
|
||||
* (2020.03.29) 增加`Axis`的`ceilRate`设置最大最小值的取整倍率
|
||||
* (2020.03.29) 增加`BarChart`可通过`itemStyle`的`cornerRadius`设置`圆角柱图`
|
||||
* (2020.03.29) 增加`itemStyle`的`cornerRadius`支持圆角矩形
|
||||
* (2020.03.24) 优化`Editor`参数编辑,兼容`Unity2019.3`及以上版本
|
||||
* (2020.03.24) 增加`Serie`在`inspector`上可进行调整顺序、添加和删除操作
|
||||
* (2020.03.23) 修复`Title`的`textStyle`和`subTextStyle`无效的问题
|
||||
* (2020.03.22) 增加`BarChart`通过`barType`参数设置`胶囊柱状图`
|
||||
* (2020.03.21) 增加`BarChart`和`HeatmapChart`可通过`ignore`参数设置忽略数据的支持
|
||||
* (2020.03.21) 增加`ItemStyle`的`tooltipFormatter`参数可单独配置`Serie`的`Tooltip`显示
|
||||
* (2020.03.20) 修复`X Axis 1`和`Y Axis 1`配置变更时不会自动刷新的问题
|
||||
* (2020.03.20) 增加`AxisTick`的`width`参数可单独设置坐标轴刻度的宽度
|
||||
* (2020.03.20) 增加`Serie`的`radarType`参数设置`多圈`和`单圈`雷达图
|
||||
* (2020.03.17) 增加`BarChart`可用`ItemStyle`的`backgroundColor`设置数据项背景颜色
|
||||
* (2020.03.17) 增加`SerieData`的`ItemStyle`和`Emphasis`可单独配置数据项样式的支持
|
||||
* (2020.03.15) 重构`EmptyCricle`类型的`Symbol`边宽取自`ItemStyle`的`borderWidth`参数
|
||||
* (2020.03.15) 重构`SerieSymbol`,去掉`color`和`opacity`参数,取自`ItemStyle`
|
||||
|
||||
## v1.3.1
|
||||
|
||||
* (2020.03.14) 发布`v1.3.1`版本
|
||||
* (2020.03.14) 修复`LineChart`开启`ingore`时部分数据可能绘制异常的问题
|
||||
* (2020.03.13) 修复`LineChart`的`label`偏移显示异常的问题
|
||||
|
||||
## v1.3.0
|
||||
|
||||
* (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`的支持
|
||||
|
||||
## v1.2.0
|
||||
|
||||
* (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接口
|
||||
|
||||
## v1.1.0
|
||||
|
||||
* (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`等参数不生效的问题
|
||||
|
||||
## v1.0.5
|
||||
|
||||
* (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`两部分
|
||||
|
||||
## v1.0.4
|
||||
|
||||
* (2019.11.05) 发布`v1.0.4`版本
|
||||
* (2019.11.05) 增加`Radar`雷达组件文本样式参数配置支持
|
||||
* (2019.11.04) 修复`Unity2018.3`以下版本代码不兼容的问题
|
||||
* (2019.11.04) 优化`SerieLabel`过多时引起的性能问题
|
||||
|
||||
## v1.0.3
|
||||
|
||||
* (2019.11.03) 发布`v1.0.3`版本
|
||||
* (2019.11.03) 增加`Editor`快捷添加图表:`Hierarchy`试图下右键`XCharts->LineChart`
|
||||
* (2019.11.02) 优化非配置参数变量命名和访问权限,简化`API`
|
||||
|
||||
## v1.0.2
|
||||
|
||||
* (2019.10.31) 发布`v1.0.2`版本
|
||||
* (2019.10.31) 修复`prefab`预设制作报错的问题
|
||||
* (2019.10.31) 增加访问主题组件API:`BaseChart.theme`
|
||||
|
||||
## v1.0.1
|
||||
|
||||
* (2019.10.26) 发布`v1.0.1`版本
|
||||
* (2019.10.26) 修复版本检查功能在非运行时异常的问题
|
||||
* (2019.10.26) 增加科学计数法显示数值的支持(查阅`forceENotation`参数)
|
||||
* (2019.10.26) 增加`Axis`类目轴数据为空时的默认显示支持
|
||||
* (2019.10.26) 增加`Axis`数值轴的最大最小值可设置为小数的支持,优化极小数图表的表现效果
|
||||
|
||||
## v1.0.0
|
||||
|
||||
* (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`中配置
|
||||
|
||||
## v0.8.3
|
||||
|
||||
* (2019.08.15) 发布`v0.8.3`版本
|
||||
* (2019.08.14) 修复`PieChart`的`Label`无法自动更新的问题
|
||||
* (2019.08.13) 修复`UpdateData`接口无法更新数据的问题
|
||||
* (2019.08.07) 增加`SerieSymbol`的`Color`、`Opacity`配置
|
||||
|
||||
## v0.8.2
|
||||
|
||||
* (2019.08.07) 发布`v0.8.2`版本
|
||||
* (2019.08.07) 修复区域平滑折线图显示异常的问题
|
||||
* (2019.08.06) 修复`serie`系列数超过调色盘颜色数时获取的颜色异常的问题
|
||||
* (2019.08.06) 修复当`Axis`的`minMaxType`为`Custom`时`max`设置为`100`不生效的问题
|
||||
|
||||
## v0.8.1
|
||||
|
||||
* (2019.08.04) 发布`v0.8.1`版本
|
||||
* (2019.08.04) 修复`Inspector`中修改数据不生效的问题
|
||||
|
||||
## v0.8.0
|
||||
|
||||
* (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) 增加`双坐标轴`支持,代码改动较大
|
||||
|
||||
## v0.5.0
|
||||
|
||||
* (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`三种默认主题
|
||||
|
||||
## v0.1.0
|
||||
|
||||
* (2018.09.05) 发布`v0.1.0`版本
|
||||
@@ -1,147 +0,0 @@
|
||||
# XCharts API
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
## `BaseChart`
|
||||
|
||||
* `BaseChart.theme`:主题组件`ThemeInfo`。
|
||||
* `BaseChart.title`:标题组件`Title`。
|
||||
* `BaseChart.legend`:图例组件`Legend`。
|
||||
* `BaseChart.tooltip`:提示框组件`Tooltip`。
|
||||
* `BaseChart.series`:系列列表`Series`。
|
||||
* `BaseChart.chartName`:图表的别称。
|
||||
* `BaseChart.chartWidth`:图表的宽。
|
||||
* `BaseChart.chartHeight`:图表的高。
|
||||
* `BaseChart.forceOpenRaycastTarget`:强制开启鼠标事件检测。一般不用手动设置,内部会自动判断是否需要检测。
|
||||
* `BaseChart.onCustomDraw`:自定义底部绘制回调。在绘制Serie前调用。
|
||||
* `BaseChart.onCustomDrawBeforeSerie`:自定义Serie绘制回调。在每个Serie绘制完前调用。
|
||||
* `BaseChart.onCustomDrawAfterSerie`:自定义Serie绘制回调。在每个Serie绘制完后调用。
|
||||
* `BaseChart.onCustomDrawTop`:自定义顶部绘制回调。在绘制Tooltip前调用。
|
||||
* `BaseChart.onPointerClick`:鼠标点击回调。
|
||||
* `BaseChart.onPointerDown`:鼠标按下回调。
|
||||
* `BaseChart.onPointerUp`:鼠标弹起回调。
|
||||
* `BaseChart.onPointerEnter`:鼠标进入图表回调。
|
||||
* `BaseChart.onPointerExit`:鼠标退出图表回调。
|
||||
* `BaseChart.onBeginDrag`:鼠标开始拖拽回调。
|
||||
* `BaseChart.onDrag`:鼠标拖拽回调。
|
||||
* `BaseChart.onEndDrag`:鼠标结束拖拽回调。
|
||||
* `BaseChart.onScroll`:鼠标滚动回调。
|
||||
* `BaseChart.onPointerClickPie`:点击柱条回调。参数:`eventData`, `serieIndex`, `dataIndex`
|
||||
* `BaseChart.SetSize(float width, float height)`: 设置图表的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform)。
|
||||
* `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)`:点击图例按钮。
|
||||
* `BaseChart.IsInChart(Vector2 local)`:坐标是否在图表范围内。
|
||||
* `BaseChart.IsInChart(float x, float y)`:坐标是否在图表范围内。
|
||||
* `BaseChart.EnableBackground(bool flag)`:开启背景组件。背景组件在`chart`受上层布局控制时无法开启。
|
||||
* `BaseChart.SetBasePainterMaterial(Material material)`:设置Base Painter的材质球。
|
||||
* `BaseChart.SetSeriePainterMaterial(Material material)`:设置Serie Painter的材质球。
|
||||
* `BaseChart.SetTopPainterMaterial(Material material)`:设置Top Painter的材质球。
|
||||
|
||||
## `CoordinateChart`
|
||||
|
||||
* `CoordinateChart.grid`:网格组件 `Grid`。
|
||||
* `CoordinateChart.xAxes`:左右两个 `X` 轴组件 `XAxis`。
|
||||
* `CoordinateChart.yAxes`:左右两个 `Y` 轴组件 `YAxis`。
|
||||
* `CoordianteChart.xAxis0`:X轴(下)。
|
||||
* `CoordianteChart.xAxis1`:X轴(上)。
|
||||
* `CoordianteChart.xAxis0`:Y轴(左)。
|
||||
* `CoordianteChart.yAxis1`:Y轴(右)。
|
||||
* `CoordinateChart.dataZoom`:区域缩放组件 `DataZoom`。
|
||||
* `CoordinateChart.ClearAxisData()`:清除所有x轴和y轴的类目数据。
|
||||
* `CoordinateChart.AddXAxisData(string category, int xAxisIndex = 0)`:添加一个类目数据到指定的 `X` 轴。
|
||||
* `CoordinateChart.AddYAxisData(string category, int yAxisIndex = 0)`:添加一个类目数据到指定的 `Y` 轴。
|
||||
* `CoordinateChart.AddXAxisIcon(Sprite icon, int xAxisIndex = 0)`:添加一个类目数据到指定的 `X` 轴。
|
||||
* `CoordinateChart.AddYAxisIcon(Sprite icon, int yAxisIndex = 0)`:添加一个类目数据到指定的 `Y` 轴。。
|
||||
|
||||
* `CoordinateChart.IsValue()`:是否是纯数值坐标。
|
||||
* `CoordinateChart.RefreshDataZoom()`:在下一帧刷新DataZoom组件。
|
||||
* `CoordinateChart.RefreshAxisMinMaxValue()`:立即刷新数值坐标轴的最大最小值(更新坐标轴标签并触发重绘)。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector3 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(float x, float y)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.ClampInGrid(grid, Vector3 pos)`:将坐标限制在坐标系内。
|
||||
* `CoordinateChart.CovertXYAxis(int index)`:转换X轴和Y轴的配置。
|
||||
* `CoordinateChart.UpdateCoordinate()`:更新坐标系原点和宽高。一般内部会自动更新,也可强制更新。
|
||||
* `CoordinateChart.SetMaxCache(int maxCache)`:设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。
|
||||
|
||||
## `LineChart`
|
||||
|
||||
* 继承 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `BarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
* `BarChart.onPointerClickBar`:点击柱条回调。参数:`eventData`, `dataIndex`
|
||||
|
||||
|
||||
## `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)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f74b65f3be5d64689a5db6bdbc91df3e
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,167 +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轴的值范围)
|
||||
[QA 13:如何自定义数值轴刻度大小?](#如何自定义数值轴刻度大小)
|
||||
[QA 14:如何在数据项顶上显示文本?](#如何在数据项顶上显示文本)
|
||||
[QA 15:如何给数据项自定义图标?](#如何给数据项自定义图标)
|
||||
[QA 16:锯齿太严重,如何让图表更顺滑?](#锯齿太严重_如何让图表更顺滑)
|
||||
[QA 17:为什么鼠标移上图表 Tooltip 不显示?](#为什么鼠标移上图表Tooltip不显示)
|
||||
[QA 18:如何取消 Tooltip 的竖线?](#如何取消Tooltip的竖线)
|
||||
[QA 19:如何自定义 Tooltip 的显示内容?](#如何自定义Tooltip的显示内容)
|
||||
[QA 20:如何让Y轴(数值轴)显示多位小数?](#如何让Y轴显示多位小数)
|
||||
[QA 21:如何用代码动态更新数据?](#如何用代码动态更新数据)
|
||||
[QA 22:如何显示图例?为什么有时候图例无法显示?](#如何显示图例_为什么有时候图例无法显示)
|
||||
[QA 23:如何做成预设?](#如何做成预设)
|
||||
[QA 24:如何在图表上画点画线等自定义内容?](#如何在图表上画点画线等自定义内容)
|
||||
[QA 25:如何实现心电图类似的数据移动效果?](#如何实现心电图类似的数据移动效果)
|
||||
[QA 26:如何使用背景组件?有什么条件限制?](#如何使用背景组件_有什么条件限制)
|
||||
[QA 27:Mesh can not have more than 65000 vertices?](#Mesh_cannot_have_more_than_65000_vertices)
|
||||
[QA 28:为什么serie里设置的参数运行后又被重置了?](#为什么serie里设置的参数运行后又被重置了)
|
||||
[QA 29:为什么升级到1.6.0版本后很多自定义颜色丢失了?应该如何升级?](#为什么升级到1_6_0版本后很多自定义颜色丢失了_应该如何升级)
|
||||
|
||||
## 如何调整坐标轴与背景的边距
|
||||
|
||||
答:`Grid`组件,可调整上下左右边距。
|
||||
|
||||
## 如何让初始动画重新播放
|
||||
|
||||
答:调用`AnimationReset()`接口。
|
||||
|
||||
## 如何自定义折线图_饼图等数据项的颜色
|
||||
|
||||
答:通过`Theme`的`colorPalette`调整,或者部分`Serie`下的`LineStyle`和`ItemStyle`。
|
||||
|
||||
## 如何格式化文字_如我想给坐标轴标签加上单位
|
||||
|
||||
答:通过`formatter`和`numericFormatter`参数,在`Legend`、`Axis`的`AxisLabel`、`Tooltop`、`Serie`的`Label`都提供该参数的配置。
|
||||
|
||||
## 如何让柱形图的柱子堆叠显示
|
||||
|
||||
答:设置`Serie`下的`stack`,`stack`相同的`serie`会堆叠显示在一个柱子上。
|
||||
|
||||
## 如何让柱形图的柱子同柱但不重叠
|
||||
|
||||
答:设置`Serie`下的`barGap`为`-1`,`stack`为空。
|
||||
|
||||
## 如何调整柱形图的柱子宽度和间距
|
||||
|
||||
答:调整`Serie`下的`barWidth`和`barGap`,多个`serie`时最后一个`serie`的`barWidth`和`barGap`有效。
|
||||
|
||||
## 如何调整柱形图单个柱子的颜色
|
||||
|
||||
答:可通过调整单个`Data`下的`ItemStyle`调整,也可以通过两个`serie`同柱不堆叠来实现,通过设置数据项为`0`来达到类似效果。
|
||||
|
||||
## 如何调整图表的对齐方式
|
||||
|
||||
答:默认为左下角对齐,暂不支持调整。可以通过包一层parent来辅助控制。(最新版本`1.5.0`及以上已支持任意锚点,可和做UI一样任意调整对其方式)。
|
||||
|
||||
## 可以显示超过1000以上的大数据吗
|
||||
|
||||
答:可以。但`UGUI`对单个`Graphic`限制`65000`个顶点,所以太多的数据不一定能显示完全。可通过设置采样距离`sampleDist`开启采样简化过密曲线。也可以通过设置一些参数来减少图表的顶点数有助于显示更多数据。如缩小图表的尺寸,关闭或减少坐标轴的客户端绘制,关闭`Serie`的`symbol`和`label`显示等。折线图的普通线图`Normal`比平滑线图`Smooth`占用顶点数更少。`1.5.0`以上版本可以设置`large`和`largeThreshold`参数来开启性能模式。
|
||||
|
||||
## 折线图可以画虚线_点线_点划线吗
|
||||
|
||||
答:可以。通过`Serie`下的`lineType`选择线条样式。当要显示的数据过多(成千以上)数据间过密时建议使用`Normal`或者`Step`样式。
|
||||
|
||||
## 如何限定Y轴的值范围
|
||||
|
||||
答:设置`Axis`下的`minMaxType`为`Custom`,自定义`min`和`max`。
|
||||
|
||||
## 如何自定义数值轴刻度大小
|
||||
|
||||
答:默认时通过`Axis`下的`splitNumer`进行自动划分。也可以设置`interval`自定义刻度大小。
|
||||
|
||||
## 如何在数据项顶上显示文本
|
||||
|
||||
答:通过设置`Serie`下的`Label`。
|
||||
|
||||
## 如何给数据项自定义图标
|
||||
|
||||
答:通过设置`Serie`的`data`下的数据项可单独设置`icon`相关参数。
|
||||
|
||||
## 锯齿太严重_如何让图表更顺滑
|
||||
|
||||
答:开启抗锯齿设置(在`Unity`里设置)。调整UI渲染模式为`Camera`模式,开启`MSAA`,设置`4`倍或更高抗锯齿。锯齿只能减少难以避免,像素越高锯齿越不明显。
|
||||
|
||||
## 为什么鼠标移上图表Tooltip不显示
|
||||
|
||||
答:确认`Tooltip`是否开启。确认父节点是否关闭了鼠标事件。
|
||||
|
||||
## 如何取消Tooltip的竖线
|
||||
|
||||
答:设置`Tooltip`的`type`为`None`。或者调整`lineStyle`的参数。
|
||||
|
||||
## 如何自定义Tooltip的显示内容
|
||||
|
||||
答:自定义总的内容可以通过`Tooltip`的`formatter`。如果只是想调整所有的`serie`的显示格式可以用`itemFormatter`和`titleFormatter`结合。如果想每个`serie`的显示格式不一样,可以定制`serie`的`itemStyle`里的`tooltipFormatter`。具体的用法请查阅[XCharts配置项手册](XCharts配置项手册.md)。
|
||||
|
||||
## 如何让Y轴显示多位小数
|
||||
|
||||
答:设置`Axis`下的`AxisLabel`中的`formatter`为`{value:f1}`或`{value:f2}`。`1.5.0`及以上版本通过`numericFormatter`设置。
|
||||
|
||||
## 如何用代码动态更新数据
|
||||
|
||||
答:请查阅`Example`下的代码,`Example13_LineSimple.cs`就是一个简单添加数据构建折线图的例子,其他`Demo`也都是通过代码控制不同的组件实现不同的功能,相关API请查看文档:[XChartsAPI接口](XChartsAPI.md) 。
|
||||
|
||||
## 如何显示图例_为什么有时候图例无法显示
|
||||
|
||||
答:首先,你的`serie`里的`name`需有值不为空。然后开启`Legend`显示,里面的`data`可以默认为空,表示显示所有的图例。如果你只想显示部分`serie`的图例,在`data`中填入要显示的图例的`name`即可。如果`data`中的值都不是系列的`name`,那图例就不会显示。
|
||||
|
||||
## 如何做成预设
|
||||
|
||||
答:请删除chart下所有的子组件再拖成预设。
|
||||
|
||||
## 如何在图表上画点画线等自定义内容
|
||||
|
||||
答:`XCharts`有自定义绘制回调`onCustomDraw`,具体可参考`Example12_CustomDrawing.cs`
|
||||
|
||||
## 如何实现心电图类似的数据移动效果
|
||||
|
||||
答:参考`Example`目录下的`Example_Dynamic.cs`。主要通过设置`maxCache`参数实现。`axis`和`serie`都设置相同的`maxCache`。`maxCache`可固定数据个数,当数据超过设定时会先删除第一个在添加新数据,实现数据移动效果。
|
||||
|
||||
## 如何使用背景组件_有什么条件限制
|
||||
|
||||
答:设置`background`组件的`show`为`true`。
|
||||
|
||||
## 区域折线图在用半透明颜色时有时候会一条叠加的线
|
||||
|
||||
答:这是区域折线图绘制的bug。可以用浅的不透的颜色替代半透明颜色。
|
||||
|
||||
## Mesh_cannot_have_more_than_65000_vertices
|
||||
|
||||
答:这是`UGUI`对单个`Graphic`的顶点数限制。`XCharts`是将图形绘制在单个`Graphic`上,所以也会有这个限制。解决的办法可以参考:[QA 10:可以显示超过1000以上的大数据吗?](#可以显示超过1000以上的大数据吗)
|
||||
|
||||
## 为什么serie里设置的参数运行后又被重置了
|
||||
|
||||
答:检测下代码里是否调用了`RemoveData()`并重新添加`Serie`了。如果想保留`Serie`的配置可以只`ClearData()`,然后重新添加数据。
|
||||
|
||||
## 为什么升级到1_6_0版本后很多自定义颜色丢失了_应该如何升级
|
||||
|
||||
答:1.6.0版本为了减少隐式转换,将所有的绘制相关的`Color`都改为了`Color32`,所以会导致一些自定义的颜色的丢失。影响到的主要组件有:`ItemStyle`,`LineStyle`,`AreaStyle`,`Vessel`,`VisualMap`,`AxisSplitArea`,`AxisSplitLine`,`GaugeAxis`,`SerieLabel`等。可以用脚本[UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs)进行升级。
|
||||
升级步骤如下:
|
||||
1. 备份好你的项目。
|
||||
2. 先不升级`XCharts`,只下载或拷贝脚本[UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs)放到旧项目的`Editor`下,由于旧版本可能不存在某些新版本才有的图表或者属性配置,可能会编译错误,需要处理按3,4步骤处理一下。
|
||||
3. 若是由`itemStyle.toColor2`引起的编译报错,可将导出地方的`itemStyle.toColor2`改为`Color.clear`;导入的地方注释掉即可。
|
||||
4. 若是由`LiquidChart`引起的编译报错,将所有涉及`LiquidChart`的地方都注释掉即可。
|
||||
5. 编译通过后,通过`菜单栏->XCharts->ExportColorConfig`导出旧版本的颜色配置文件(配置文件默认保存到`Assets`下的`color.config`)。
|
||||
6. 升级`XCharts`到最新版本。
|
||||
7. 通过`菜单栏->XCharts->ImportColorConfig`将`color.config`导入即可恢复自定义的颜色(如果`color.config`不在升级后的项目的`Assets`下的话需要拷贝到此目录下)。
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a4780a4fbaf446cc9d948b6b2c803d6
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,148 +0,0 @@
|
||||
# XCharts API
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
## `BaseChart`
|
||||
|
||||
* `BaseChart.theme`:主题组件`ThemeInfo`。
|
||||
* `BaseChart.title`:标题组件`Title`。
|
||||
* `BaseChart.legend`:图例组件`Legend`。
|
||||
* `BaseChart.tooltip`:提示框组件`Tooltip`。
|
||||
* `BaseChart.series`:系列列表`Series`。
|
||||
* `BaseChart.chartName`:图表的别称。
|
||||
* `BaseChart.chartWidth`:图表的宽。
|
||||
* `BaseChart.chartHeight`:图表的高。
|
||||
* `BaseChart.forceOpenRaycastTarget`:强制开启鼠标事件检测。一般不用手动设置,内部会自动判断是否需要检测。
|
||||
* `BaseChart.onCustomDraw`:自定义底部绘制回调。在绘制Serie前调用。
|
||||
* `BaseChart.onCustomDrawBeforeSerie`:自定义Serie绘制回调。在每个Serie绘制完前调用。
|
||||
* `BaseChart.onCustomDrawAfterSerie`:自定义Serie绘制回调。在每个Serie绘制完后调用。
|
||||
* `BaseChart.onCustomDrawTop`:自定义顶部绘制回调。在绘制Tooltip前调用。
|
||||
* `BaseChart.onPointerClick`:鼠标点击回调。
|
||||
* `BaseChart.onPointerDown`:鼠标按下回调。
|
||||
* `BaseChart.onPointerUp`:鼠标弹起回调。
|
||||
* `BaseChart.onPointerEnter`:鼠标进入图表回调。
|
||||
* `BaseChart.onPointerExit`:鼠标退出图表回调。
|
||||
* `BaseChart.onBeginDrag`:鼠标开始拖拽回调。
|
||||
* `BaseChart.onDrag`:鼠标拖拽回调。
|
||||
* `BaseChart.onEndDrag`:鼠标结束拖拽回调。
|
||||
* `BaseChart.onScroll`:鼠标滚动回调。
|
||||
* `BaseChart.SetSize(float width, float height)`: 设置图表的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform)。
|
||||
* `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)`:点击图例按钮。
|
||||
* `BaseChart.IsInChart(Vector2 local)`:坐标是否在图表范围内。
|
||||
* `BaseChart.IsInChart(float x, float y)`:坐标是否在图表范围内。
|
||||
* `BaseChart.EnableBackground(bool flag)`:开启背景组件。背景组件在`chart`受上层布局控制时无法开启。
|
||||
* `BaseChart.SetBasePainterMaterial(Material material)`:设置Base Painter的材质球。
|
||||
* `BaseChart.SetSeriePainterMaterial(Material material)`:设置Serie Painter的材质球。
|
||||
* `BaseChart.SetTopPainterMaterial(Material material)`:设置Top Painter的材质球。
|
||||
|
||||
## `CoordinateChart`
|
||||
|
||||
* `CoordinateChart.grid`:网格组件 `Grid`。
|
||||
* `CoordinateChart.xAxes`:左右两个 `X` 轴组件 `XAxis`。
|
||||
* `CoordinateChart.yAxes`:左右两个 `Y` 轴组件 `YAxis`。
|
||||
* `CoordianteChart.xAxis0`:X轴(下)。
|
||||
* `CoordianteChart.xAxis1`:X轴(上)。
|
||||
* `CoordianteChart.xAxis0`:Y轴(左)。
|
||||
* `CoordianteChart.yAxis1`:Y轴(右)。
|
||||
* `CoordinateChart.dataZoom`:区域缩放组件 `DataZoom`。
|
||||
* `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()`:立即刷新数值坐标轴的最大最小值(更新坐标轴标签并触发重绘)。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector3 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(float x, float y)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.ClampInGrid(grid, Vector3 pos)`:将坐标限制在坐标系内。
|
||||
* `CoordinateChart.CovertXYAxis(int index)`:转换X轴和Y轴的配置。
|
||||
* `CoordinateChart.UpdateCoordinate()`:更新坐标系原点和宽高。一般内部会自动更新,也可强制更新。
|
||||
* `CoordinateChart.SetMaxCache(int maxCache)`:设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。
|
||||
|
||||
## `LineChart`
|
||||
|
||||
* 继承 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `BarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
* `BarChart.onPointerClickBar`:点击柱条回调。参数:`eventData`, `dataIndex`
|
||||
|
||||
## `PieChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
|
||||
* `PieChart.onPointerClickPie`:点击柱条回调。参数:`eventData`, `serieIndex`, `dataIndex`
|
||||
|
||||
## `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: 529e55126e1d04a629b14d857f76fffd
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,935 +0,0 @@
|
||||
# XCharts Configuration
|
||||
|
||||
[XCharts Homepage](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts API](xcharts-api-EN.md)
|
||||
[XCharts Q&A](xcharts-questions-and-answers-EN.md)
|
||||
|
||||
The translation work is still in progress.
|
||||
|
||||
__Main component:__
|
||||
|
||||
* [Axis](#XAxis)
|
||||
* [Background](#Background)
|
||||
* [DataZoom](#DataZoom)
|
||||
* [Grid](#Grid)
|
||||
* [Legend](#Legend)
|
||||
* [Polar](#Polar)
|
||||
* [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)
|
||||
* [Serie-Liquid](#Serie-Liquid)
|
||||
* [Serie-Candlestick](#Serie-Candlestick)
|
||||
* [Serie-Gantt](#Serie-Gantt)
|
||||
* [Settings](#Settings)
|
||||
* [Theme](#Theme)
|
||||
* [Title](#Title)
|
||||
* [Tooltip](#Tooltip)
|
||||
* [Vessel](#Vessel)
|
||||
* [VisualMap](#VisualMap)
|
||||
|
||||
__Sub component:__
|
||||
|
||||
* [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)
|
||||
* [IconStyle](#IconStyle)
|
||||
|
||||
## `Theme`
|
||||
|
||||
Theme components. Topics are used to configure other parameters such as the global color scheme for the chart.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `theme`: Built-in theme types. There are `Default`, `Light`, `Dark` three optional built-in theme.
|
||||
* `font`: A common font for all text.
|
||||
* `backgroundColor`: Chart background color.
|
||||
* `titleTextColor`: The text color of the main title.
|
||||
* `titleSubTextColor`: The text color of the sub title.
|
||||
* `legendTextColor`: Legend text color when actived.
|
||||
* `legendUnableColor`: Legend text color when unactived.
|
||||
* `axisTextColor`: The text color of axis label.
|
||||
* `axisLineColor`: The color of axis line.
|
||||
* `axisSplitLineColor`: The color of the dividing line of the coordinate axis is the same as the default color of the axis.
|
||||
* `tooltipBackgroundColor`: The background color of the tooltip.
|
||||
* `tooltipFlagAreaColor`: The color of the shadow indicator for the tooltip.
|
||||
* `tooltipTextColor`: The text color of Tooltip.
|
||||
* `tooltipLabelColor`: The cross indicator in the tooltip coordinates the background color of the label.
|
||||
* `tooltipLineColor`: The color of the indicator line in the tooltip.
|
||||
* `dataZoomTextColor`: The text color of dataZoom.
|
||||
* `dataZoomLineColor`: The line color of dataZoom.
|
||||
* `dataZoomSelectedColor`: The selected area color of dataZoom.
|
||||
* `colorPalette`: Palette color list. The color list of palette. If no color is set in series, the colors would be adopted sequentially and circularly from this list as the colors of series.
|
||||
|
||||
API:
|
||||
|
||||
* `GetColor(int index)`: Gets the color of the specified index from the palette.
|
||||
* `GetColorStr(int index)`: Gets the hexadecimal color string of the specified index from the palette.
|
||||
* `GetColor(string hexColorStr)`: Convert the html string to color.
|
||||
|
||||
## `Title`
|
||||
|
||||
Title component, including main title and subtitle.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `show`: Whether to show title component.Set this to false to prevent the title component from showing.
|
||||
* `text`: The content of main title, supporting `\n` for newlines.
|
||||
* `textStyle`: The text style of main title [TextStyle](#TextStyle).
|
||||
* `subText`: The content of sub title, supporting `\n` for newlines.
|
||||
* `subTextStyle`: The text style of sub title [TextStyle](#TextStyle).
|
||||
* `itemGap`: The gap between the main title and sub title.
|
||||
* `location`: The location of title component [Location](#Location).
|
||||
|
||||
## `TitleStyle`
|
||||
|
||||
Sub component for serie title.
|
||||
|
||||
* `show`: Whether to show serie title.
|
||||
* `textStyle`: The text style of title [TextStyle](#TextStyle).
|
||||
|
||||
## `Legend`
|
||||
|
||||
Legend component.The legend component shows different sets of symbol, colors, and names. You can control which series are not displayed by clicking on the legend.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `show`: Whether show legend component.
|
||||
* `iconType`: the legend icon symbol type:
|
||||
* `Auto` : Auto match.
|
||||
* `Custom` : Custom icon.
|
||||
* `EmptyCircle` : hollow circle.
|
||||
* `Circle` : solid Circle.
|
||||
* `Rect` : square.
|
||||
* `Triangle` :
|
||||
* `Diamond` :
|
||||
* `selectedMode`: Selected mode of legend, which controls whether series can be toggled displaying by clicking legends:
|
||||
* `Multiple`: multi-select.
|
||||
* `Single`: single select.
|
||||
* `None`: can’t select.
|
||||
* `orient`: horizontal or vertical layout:
|
||||
* `Horizonal`: horizontal layout.
|
||||
* `Vertical`: vertical layout.
|
||||
* `location`: the localtion of legend in chart [Location](#Location).
|
||||
* `itemWidth`: the width of legend icon.
|
||||
* `itemHeight`: the height of legend icon.
|
||||
* `itemGap`: The distance between each legend, horizontal distance in horizontal layout, and vertical distance in vertical layout.
|
||||
* `itemAutoColor`: Whether the legend symbol matches the color automatically.
|
||||
* `formatter`: Legend content string template formatter. Support for wrapping lines with `\n`. Template:`{name}`.
|
||||
* `data`: Data array of legend. An array item is usually a name representing string. (If it is a pie chart, it could also be the name of a single data in the pie chart) of a series. If data is not specified, it will be auto collected from series.
|
||||
* `icons`: The list of cunstomize icons.
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
API:
|
||||
|
||||
* `ClearData()`: Clear legend data.
|
||||
* `ContainsData(string name)`: Whether include in legend data by the specified name.
|
||||
* `RemoveData(string name)`: Remove legend from data.
|
||||
* `AddData(string name)`: Add legend.
|
||||
* `GetData(int index)`: Get legend.
|
||||
* `GetIndex(string legendName)`: Get the index of legend.
|
||||
|
||||
## `Polar`
|
||||
|
||||
Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a radiusAxis.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `show`: Whether to show the polor component.
|
||||
* `center`: The center of ploar. The `center[0]` is the x-coordinate, and the `center[1]` is the y-coordinate. When value between 0 and 1 represents a percentage relative to the chart.
|
||||
* `radius`: the radius of polar.
|
||||
* `backgroundColor`: Background color of polar, which is transparent by default.
|
||||
|
||||
## `Radar`
|
||||
|
||||
Radar coordinate conponnet for radar charts.
|
||||
|
||||
* `shape`: Radar render type, in which `Polygon` and `Circle` are supported.
|
||||
* `Polygon`: Polygon.
|
||||
* `Circle`: Circle.
|
||||
* `positionType`: The position type of radar indicator label display.
|
||||
* `Vertice`: Display at the vertex.
|
||||
* `Between`: Display at the middle of line.
|
||||
* `radius`: The radius of radar.[default:0.3f].
|
||||
* `center`: the center of radar chart. The `center[0]` is the x-coordinate, and the `center[1]` is the y-coordinate. When value between 0 and 1 represents a percentage relative to the chart.[default:[0.5f,0.4f]].
|
||||
* `ceilRate`: The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated.[default:0].
|
||||
* `splitNumber`: Segments of indicator axis.[default:5].
|
||||
* `splitNumber`: Tooltip displays all the data on the axis.[default:false].
|
||||
* `splitLine`: The split line style of radar [AxisSplitLine](#AxisSplitLine).
|
||||
* `splitArea`: The split area style of radar [AxisSplitArea](#AxisSplitArea).
|
||||
* `indicator`: Whether to show indicator.
|
||||
* `indicatorGap`: The gap of indicator and radar.
|
||||
* `indicatorList`: The indicator list [Radar.Indicator](#Radar.Indicator).
|
||||
|
||||
## `Radar.Indicator`
|
||||
|
||||
Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart.
|
||||
|
||||
* `name`: The name of indicator.
|
||||
* `max`: The maximum value of indicator, with default value of 0, but we recommend to set it manually.
|
||||
* `min`: The minimum value of indicator, with default value of 0.
|
||||
* `textStyle`: The text style of indicator [TextStyle](#TextStyle).
|
||||
|
||||
## `TextLimit`
|
||||
|
||||
Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end. Only valid in the category axis.
|
||||
|
||||
* `enable`: Whether to enable text limit. [default: `true`].
|
||||
* `maxWidth`: Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom. Clipping occurs when the width of the text is greater than this value. [default: `0f`].
|
||||
* `gap`: White pixel distance at both ends. [default: `10f`].
|
||||
* `suffix`: Suffixes when the length exceeds. [default: `"..."`].
|
||||
|
||||
## `TextStyle`
|
||||
|
||||
The component of settings related to text.
|
||||
|
||||
* `rotate`: rotate of text. [default: `0f`].
|
||||
* `offset`: offset of text position. [default: `Vector2.zero`].
|
||||
* `color`: color of text. [default: `Color.clear`].
|
||||
* `backgroundColor`: color of text background. [default: `Color.clear`].
|
||||
* `font`: the font of text. When `null`, the theme's font is used by default. [default: `null`].
|
||||
* `fontSize`: the size of text. [default: `18`].
|
||||
* `fontStyle`: the font style of text. [default: `FontStyle.Normal`].
|
||||
* `lineSpacing`: the space of text line. [default: `1f`].
|
||||
* `autoWrap`: Whether to wrap lines.
|
||||
* `autoAlign`: Whether to let the system automatically set alignment. If true, the system automatically selects alignment, and if false, use alignment.
|
||||
|
||||
## `Tooltip`
|
||||
|
||||
Tooltip component.
|
||||
|
||||
* `show`: Whether to show the tooltip component.
|
||||
* `type`: Indicator type. Indicator types are:
|
||||
* `Line`: line indicator.
|
||||
* `Shadow`: shadow crosshair indicator.
|
||||
* `None`: no indicator displayed.
|
||||
* `Corss`: crosshair indicator, which is actually the shortcut of enable two axisPointers of two orthometric axes.
|
||||
* `formatter`: A string template formatter for the total content of the prompt box. Support for wrapping lines with `\n`. When formatter is not null, use formatter first, otherwise use itemFormatter.
|
||||
* Template variables are `{.}`, `{a}`, `{b}`, `{c}`, `{d}`.
|
||||
* `{.}` is the dot of the corresponding color of `serie` that is currently indicated or whose `index` is `0`.`
|
||||
* `{a}` is the `name` of the `serie` that is currently indicated or whose `index` is `0`.
|
||||
* `{b}` is the `name` of the `serieData` that is currently indicated or whose `index` is `0`, or a `category` value (such as the X-axis of a line chart).
|
||||
* `{c}` is the value of a Y-dimension (`dimesion` is 1) from the `serie` that is currently indicated or whose `index` is `0`.
|
||||
* `{d}` is the percentage value of Y-dimensions (`dimesion` is 1) from the `serie` that is currently indicated or whose `index` is `0`, with no `%` sign.
|
||||
* `{.1}` represents a dot from serie corresponding color that specifies `index` as `1`.
|
||||
* `1` in `{a1}`, `{b1}`, `{c1}` represents a `serie` that specifies an `index` of `1`.
|
||||
* `{c1:2}` represents the third data from `serie`'s current indication data item indexed to `1` (a data item has multiple data, `index` 2 represents the third data).
|
||||
* `{c1:2-2}` represents the third data item from `serie`'s third data item indexed to `1` (i.e., which data item must be specified to specify).
|
||||
* `{d1:2: F2}` indicates that a formatted string with a value specified separately is `F2` (`numericFormatter` is used when not specified).
|
||||
* Example: `"{a}, {c}"`, `"{a1}, {c1: f1}"`, `"{a1}, {c1:0: f1}"`, `"{a1} : {c1:1-1: f1}"`
|
||||
* `titleFormatter`: The string template formatter for the tooltip title content. Support for wrapping lines with `\n`. This is only valid if the `itemFormatter` is in effect. The placeholder `{I}` can be set separately to indicate that the title is ignored and not displayed.
|
||||
* `itemFormatter`: a string template formatter for a single Serie or data item content. Support for wrapping lines with `\n`. When `formatter` is not null, use `formatter` first, otherwise use `itemFormatter`.
|
||||
* `numericFormatter`: Standard numeric format string. Used to format numeric values to display as strings. Using `Axx` form: `A` is the single character of the format specifier, supporting `C` currency, `D` decimal, `E` exponent, `F` number of vertices, `G` regular, `N` digits, `P` percentage, `R` round tripping, `X` hex etc. `XX` is the precision specification, from `0` - `99`. see: <https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings>
|
||||
* `fixedWidth`: Fixed width. Higher priority than `minWidth`.
|
||||
* `fixedHeight`: Fixed height. Higher priority than `minHeight`.
|
||||
* `minWidth`: Minimum width. If `fixedWidth` has a value, get `fixedWidth` first.
|
||||
* `minHeight`: Minimum height. If `fixedHeight` has a value, get `fixedHeight` first.
|
||||
* `paddingLeftRight`: the text padding of left and right. [defaut: `5f`].
|
||||
* `paddingTopBottom`: the text padding of top and bottom. [defaut: `5f`].
|
||||
* `backgroundImage`: The image of icon.
|
||||
* `ignoreDataShow`: Whether to show ignored data on tooltip. [defaut: `false`].
|
||||
* `ignoreDataDefaultContent`: The default display character information for ignored data.
|
||||
* `alwayShow`: Whether to trigger after always display.
|
||||
* `offset`: `(since v1.5.3)`The position offset of tooltip relative to the mouse position.
|
||||
* `lineStyle`: the line style of indicator line [LineStyle](#LineStyle).
|
||||
* `textStyle`: the text style of content [TextStyle](#TextStyle).
|
||||
|
||||
## `Vessel`
|
||||
|
||||
Vessel component for liquid chart. There can be multiple vessels in a Chart, which can be matched by vesselIndex in Serie.
|
||||
|
||||
* `show`: Whether to show the vessel. [defaut: `true`]
|
||||
* `shape`: The shape of vessel. [default: `Shape.Circle`]
|
||||
* `shapeWidth`: Thickness of vessel. [defaut: `5f`]
|
||||
* `gap`: The gap between the vessel and the liquid. [defaut: `10f`]
|
||||
* `center`: The center of vessel. The `center[0]` is the x-coordinate, and the `center[1]` is the y-coordinate. When value between `0` and `1` represents a percentage relative to the chart. [default: `[0.5f,0.45f]`]
|
||||
* `radius`: The radius of vessel. When value between 0 and 1 represents a percentage relative to the chart. [default: `0.35f`]
|
||||
* `smoothness`: The smoothness of wave. [default: `1f`]
|
||||
* `backgroundColor`: Background color of polar, which is transparent by default. [default: `Color.clear`]
|
||||
* `color`: Vessel color. The default is consistent with Serie. [default: `Color32(70, 70, 240, 255)`]
|
||||
* `autoColor`: Whether automatic color. If true, the color matches serie. [default: `true`]
|
||||
* `width`:The width of vessel. This value is valid when `shape` is `Rect`.
|
||||
* `height`:The height of vessel. This value is valid when `shape` is `Rect`.
|
||||
* `cornerRadius`: The radius of rounded corner. This value is valid when `shape` is `Rect`.
|
||||
|
||||
## `DataZoom`
|
||||
|
||||
DataZoom component is used for zooming a specific area, which enables user to investigate data in detail, or get an overview of the data, or get rid of outlier points.
|
||||
Currently only the control `X` axis is supported.
|
||||
|
||||
* `enable`: Whether to show dataZoom.
|
||||
* `supportInside`: Whether built-in support is supported. Built into the coordinate system to allow the user to zoom in and out of the coordinate system by mouse dragging, mouse wheel, finger swiping (on the touch screen).
|
||||
* `supportSlider`: Whether a slider is supported. There are separate sliders on which the user zooms or roams.
|
||||
* ~~`filterMode`: The mode of data filter, not support yet.~~
|
||||
* ~~`Filter`: data that outside the window will be filtered, which may lead to some changes of windows of other axes. For each data item, it will be filtered if one of the relevant dimensions is out of the window.~~
|
||||
* ~~`WeakFilter`: data that outside the window will be filtered, which may lead to some changes of windows of other axes. For each data item, it will be filtered only if all of the relevant dimensions are out of the same side of the window.~~
|
||||
* ~~`Empty`: data that outside the window will be set to NaN, which will not lead to changes of windows of other axes.~~
|
||||
* ~~`None`: Do not filter data.~~
|
||||
* ~~`xAxisIndex`: Specify which xAxis is controlled by the dataZoom.~~
|
||||
* ~~`yAxisIndex`: Specify which yAxis is controlled by the dataZoom.~~
|
||||
* `showDataShadow`: Whether to show data shadow, to indicate the data tendency in brief. [default: `true`]
|
||||
* `showDetail`: Whether to show detail, that is, show the detailed data information when dragging. [default: `false`]
|
||||
* `zoomLock`: Specify whether to lock the size of window (selected area). [default: `false`]
|
||||
* ~~`realtime`: Whether to show data shadow in dataZoom-silder component, to indicate the data tendency in brief. [default: `true`]~~
|
||||
* `backgroundColor`: The background color of the component.
|
||||
* `selectedAreaColor`: The color of the selected area.
|
||||
* `bottom`: Distance between dataZoom component and the bottom side of the container. [default: `10f`]
|
||||
* `top`: Distance between dataZoom component and the top side of the container. [default: `0`]
|
||||
* `left`: Distance between dataZoom component and the left side of the container. [default: `0`]
|
||||
* `right`: Distance between dataZoom component and the right side of the container. [default: `0`]
|
||||
* `height`: The height of dataZoom component. height value is a instant pixel value like 10. [default: `50f`]
|
||||
* `rangeMode`: Use absolute value or percent value in `DataZoom.start` and `DataZoom.end`. [default: `RangeMode.Percent`].
|
||||
* `Percent`: percent.
|
||||
* `start`: The start percentage of the window out of the data extent, in the range of `0 ~ 100`. [default: `30f`]
|
||||
* `end`: The end percentage of the window out of the data extent, in the range of 0 ~ 100. [default: `70f`]
|
||||
* `scrollSensitivity`: The sensitivity of dataZoom scroll. The larger the number, the more sensitive it is. [default: `10f`]
|
||||
* `textStyle`: style of datazoom label.
|
||||
* `minShowNum`: Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum. [default: `1`]
|
||||
|
||||
## `VisualMap`
|
||||
|
||||
VisualMap component. mapping data to visual elements such as colors.
|
||||
|
||||
* `enable`: Whether enable visualMap component. [default: false]
|
||||
* `show`: Whether to display components. If set to false, it will not show up, but the data mapping function still exists. [default: true]
|
||||
* `type`: the type of visualmap component.
|
||||
* `Continuous`: Continuous.
|
||||
* ~~`Piecewise`: Piecewise.~~
|
||||
* ~~`selectedMode`: the selected mode for Piecewise visualMap.~~
|
||||
* ~~`Multiple`: Multiple.~~
|
||||
* ~~`Single`: Single.~~
|
||||
|
||||
* `autoMinMax`: Automatically set min, Max value.
|
||||
* `min`: The minimum allowed. `min` must be user specified. `[min, max]` forms the domain of the visualMap.
|
||||
* `max`: The maximum allowed. `max` must be user specified. `[min, max]` forms the domain of the visualMap.
|
||||
* `range`: Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max].
|
||||
* ~~`text`: Text on both ends. such as [`High`, `Low`].~~
|
||||
* ~~`textGap`: The distance between the two text bodies.~~
|
||||
* `splitNumber`: For continuous data, it is automatically evenly divided into several segments and automatically matches the size of inRange color list when the default is 0.
|
||||
* `calculable`: Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range).
|
||||
* ~~`realtime`: Whether to update in real time while dragging.~~
|
||||
* `itemWidth`: The width of the figure, that is, the width of the color bar.
|
||||
* `itemHeight`: The height of the figure, that is, the height of the color bar.
|
||||
* `borderWidth`: 边框线宽,单位px。
|
||||
* `dimension`: Specifies which `dimension` of the `Data` to map to the visual element. `Data` is series.data. Starting at 1, the default is 0 to take the last dimension in data.
|
||||
* `hoverLink`: When the hoverLink function is turned on, when the mouse hovers over the visualMap component, the corresponding value of the mouse position is highlighted in the corresponding graphic element in the diagram. Conversely, when the mouse hovers over a graphic element in a diagram, the corresponding value of the visualMap component is triangulated in the corresponding position.
|
||||
* `orient`: Is the layout horizontal or vertical.
|
||||
* `location`: The location of component.
|
||||
* `inRange`: Defines the visual color in the selected range.
|
||||
* ~~`outOfRange`: Defines a visual color outside of the selected range.~~
|
||||
|
||||
## `Grid`
|
||||
|
||||
Grid component. Drawing grid in rectangular coordinate. In a single grid, at most two X and Y axes each is allowed. Line chart, bar chart, and scatter chart can be drawn in grid. There is only one single grid component at most in a single echarts instance.
|
||||
|
||||
* `show`: Whether to show the grid in rectangular coordinate.
|
||||
* `left`: Distance between grid component and the left side of the container.
|
||||
* `right`: Distance between grid component and the right side of the container.
|
||||
* `top`: Distance between grid component and the top side of the container.
|
||||
* `bottom`: Distance between grid component and the bottom side of the container.
|
||||
* `backgroundColor`: Background color of grid, which is transparent by default.
|
||||
|
||||
## `GaugeAxis`
|
||||
|
||||
GaugeAxis sub component. Settings related to gauge axis line.
|
||||
|
||||
* `axisLine`: axis line style.
|
||||
* `splitLine`: slit line style.
|
||||
* `axisTick`: axis tick style.
|
||||
* `axisLabel`: axis label style.
|
||||
* `axisLabelText`: Coordinate axis scale label custom content. When the content is empty, `axisLabel` automatically displays the content according to the scale; otherwise, the content is taken from the list definition.
|
||||
|
||||
## `GaugePointer`
|
||||
|
||||
GaugePointer sub component. Settings related to gauge pointer.
|
||||
|
||||
* `show`: Whether to display a pointer.
|
||||
* `width`: Pointer width.
|
||||
* `length`: Pointer length. It can be an absolute value, or it can be a percentage relative to the radius (0-1).
|
||||
|
||||
## `XAxis`
|
||||
|
||||
The x axis in cartesian(rectangular) coordinate. a grid component can place at most 2 x axis, one on the bottom and another on the top.
|
||||
|
||||
* `show`: Whether to show axis. By default `xAxes[0]` is `true` and `xAxes[1]` is `false`.
|
||||
* `gridIndex`: The index of the grid on which the axis are located, by default, is in the first grid.
|
||||
* `type`: the type of axis. The default is `Category`.
|
||||
* `Value`: Numerical axis for continuous data.
|
||||
* `Category`: Category axis, applicable to discrete category data, category data must be set through `data` for this type.
|
||||
* `Log`: Log axis, it applies to logarithmic data.
|
||||
* `position`: the position of axis in grid.
|
||||
* `Left`: left of grid.
|
||||
* `Right`: right of grid.
|
||||
* `Bottom`: bottom of grid.
|
||||
* `Top`: top of grid.
|
||||
* `offset`: the offset of axis from the default position. Useful when the same position has multiple axes.
|
||||
* `logBaseE`: On the log axis, if base e is the natural number, and is true, logBase fails.
|
||||
* `logBase`: Base of logarithm, which is valid only for numeric axes with type: `Log`.
|
||||
* `minMaxType`: the type of axis minmax.The default is `Default`.
|
||||
* `Default`: 0 - max.
|
||||
* `MinMax`: min - max.
|
||||
* `Custom`: Custom min - max.
|
||||
* `min`: The minimun value of axis. Valid when `minMaxType` is `Custom`.
|
||||
* `max`: The maximum value of axis. Valid when `minMaxType` is `Custom`.
|
||||
* `ceilRate`: The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated.
|
||||
* `splitNumber`: Number of segments that the axis is split into. The default is `5`, When `splitNumber` is set to `0`, it draws all the category data.
|
||||
* `interval`: Compulsively set segmentation interval for axis.This is unavailable for category axis. The `splitNumber` is invalid when set.
|
||||
* `boundaryGap`: The boundary gap on both sides of a coordinate axis.
|
||||
* `maxCache`: The max number of axis data cache. The first data will be remove when the size of axis data is larger then `maxCache`.
|
||||
* `inverse`: Whether the axis are reversed or not. Invalid in `Category` axis.
|
||||
* `insertDataToHead`: Whether to add new data at the head or at the end of the list.
|
||||
* `data`: Category data, valid in the `Category` axis.
|
||||
* `icons`: icon list.
|
||||
* `axisLine`: the style of axis line [AxisLine](#AxisLine).
|
||||
* `axisName`: the style of axis name [AxisName](#AxisName).
|
||||
* `axisTick`: the style of axis tick [AxisTick](#AxisTick).
|
||||
* `axisLabel`: the style of axis label [AxisLabel](#AxisLabel).
|
||||
* `splitLine`: the style of axis split line [AxisSplitLine](#SplitLine).
|
||||
* `splitArea`: the style of axis split area [AxisSplitArea](#AxisSplitArea).
|
||||
* `iconStyle`: the style of the axis scale icon [IconStyle](#IconStyle).
|
||||
|
||||
## `Background`
|
||||
|
||||
Background component.Due to the limitations of the framework, there are two limitations to the use of background component:
|
||||
1: The parent node of chart cannot have a layout control class component.
|
||||
2: The parent node of Chart can only have one child node of the current chart.
|
||||
|
||||
* `show`: Whether to enable the background component. However, the ability to activate the background component is subject to other conditions.
|
||||
* `image`: the image of background.
|
||||
* `imageType`: the fill type of background image.
|
||||
* `imageColor`: the color of background image, The default is `white`.
|
||||
* `hideThemeBackgroundColor`: Whether to hide the background color set in the `theme` when the background component is on.
|
||||
|
||||
## `YAxis`
|
||||
|
||||
The y axis in cartesian(rectangular) coordinate. a grid component can place at most 2 y axis, one on the left and another on the right.
|
||||
|
||||
The parameters are the same as XAxis.
|
||||
|
||||
## `Series`
|
||||
|
||||
Serie list. Each serie determines its own chart type by `type`.
|
||||
|
||||
Check each serie for parameters.
|
||||
|
||||
## `Serie-Line`
|
||||
|
||||
Line chart serie.
|
||||
|
||||
* `show`: Whether to show serie in chart.
|
||||
* `type`: `Line`.
|
||||
* `name`: Series name used for displaying in tooltip and filtering with legend.
|
||||
* `stack`: If stack the value. On the same category axis, the series with the same stack name would be put on top of each other.
|
||||
* `xAxisIndex`: Index of x axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `yAxisIndex`: Index of y axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `minShow`: The min number of data to show in chart.
|
||||
* `maxShow`: The max number of data to show in chart.
|
||||
* `maxCache`: The max number of serie data cache. The first data will be remove when the size of serie data is larger then maxCache.
|
||||
* `sampleDist`: The minimum horizontal pixel distance of sampling, which defaults to `0` without sampling. When the horizontal pixel distance between two data points is less than this value, start sampling to ensure that the horizontal pixel distance between two points is not less than this value.
|
||||
* `sampleType`: Sample type. This is valid when `sampleDist` is greater than `0`. The following five sampling types are supported:
|
||||
* `Peak`: Take a peak. When the average value of the filter point is greater than or equal to `sampleAverage`, take the maximum value; If you do it the other way around, you get the minimum.
|
||||
* `Average`: Take the average of the filter points.
|
||||
* `Max`: Take the maximum value of the filter point.
|
||||
* `Min`: Take the minimum value of the filter point.
|
||||
* `Sum`: Take the sum of the filter points.
|
||||
* `sampleAverage`: Set the sampling average. When `sampleType` is `Peak`, is the maximum or minimum value used to compare the average value of the filtered data. The default of `0` is to calculate the average of all data in real time.
|
||||
* `clip`: 是否裁剪超出坐标系部分的图形。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。
|
||||
* `large`: 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点: 优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。
|
||||
* `largeThreshold`: 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。
|
||||
* `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)。
|
||||
* `insertDataToHead`: Whether to add new data at the head or at the end of the list.
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Bar`
|
||||
|
||||
折线图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Bar`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `stack`: 数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。
|
||||
* `xAxisIndex`: Index of x axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `yAxisIndex`: Index of y axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `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`: 是否裁剪超出坐标系部分的图形。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。
|
||||
* `large`: 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点: 优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。
|
||||
* `largeThreshold`: 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。
|
||||
* `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时即为圆环图。
|
||||
* `minAngle`: The minimum angle of sector(0-360). It prevents some sector from being too small when value is small.
|
||||
* `roundCap`: 是否启用圆弧效果。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制,对应的`Label`和`Legend`也不会显示。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `avoidLabelOverlap`: 在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Radar`
|
||||
|
||||
雷达图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Radar`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `radarType`: 雷达图类型`RadarType`,支持以下类型:
|
||||
* `Multiple`: 多圈雷达图。此时可一个雷达里绘制多个圈,一个`serieData`就可组成一个圈(多维数据)。
|
||||
* `Single`: 单圈雷达图。此时一个雷达只能绘制一个圈,多个`serieData`组成一个圈,数据取自`data[1]`。
|
||||
* `radarIndex`: 雷达图所使用的 `radar` 组件的 `index`。
|
||||
* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。
|
||||
* `itemStyle`: 标记样式 [ItemStyle](#ItemStyle)。
|
||||
* `areaStyle`: 区域填充样式 [AreaStyle](#AreaStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `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` 的图例筛选。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为`0`,当 `ignore` 为 `true` 才有效。
|
||||
* `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]`表示最大值。
|
||||
|
||||
## `Serie-Liquid`
|
||||
|
||||
水位图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Liquid`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `vesselIndex`: 水位图所使用的`vessel`组件的`index`。
|
||||
* `min`: 最小值。
|
||||
* `max`: 最大值。
|
||||
* `waveLength`: 水波长。
|
||||
* `waveHeight`: 水波高。
|
||||
* `waveSpeed`: 水波移动速度。正数时左移,负数时右移。
|
||||
* `waveOffset`: 水波偏移。
|
||||
* `itemStyle`: 环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。水位图的数据一般只有一个,表示当前水位值,用`max`设置最大水位值。
|
||||
|
||||
## `Serie-Candlestick`
|
||||
|
||||
K线图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Candlestick`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `xAxisIndex`:使用的坐标轴X轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。
|
||||
* `yAxisIndex`:使用的坐标轴Y轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。
|
||||
* `minShow`:系列显示数据的最小索引。
|
||||
* `maxShow`:系列显示数据的最大索引。
|
||||
* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。
|
||||
* `clip`:是否裁剪超出坐标系部分的图形。
|
||||
* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`:忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `showAsPositiveNumber`:将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。
|
||||
* `large`:是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点:优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。
|
||||
* `largeThreshold`:开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。
|
||||
* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,K线图至少需要4个维度的数组`[open, close, lowest, highest]`。
|
||||
|
||||
## `Settings`
|
||||
|
||||
全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。
|
||||
|
||||
* `reversePainter`:Painter是否逆序。逆序时index大的serie最先绘制。
|
||||
* `maxPainter`:默认最大Painter数据,当Serie数量大于maxPainter时会平均分配Painter。
|
||||
* `basePainterMaterial`:Base Pointer 材质球,设置后会影响Axis等。
|
||||
* `seriePainterMaterial`:Serie Pointer 材质球,设置后会影响所有Serie。
|
||||
* `topPainterMaterial`:Top Pointer 材质球,设置后会影响Tooltip等。
|
||||
* `lineSmoothStyle`: 曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。
|
||||
* `lineSmoothness`: 曲线平滑度。值越小曲线越平滑,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。
|
||||
* `lineSegmentDistance`: 线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。
|
||||
* `cicleSmoothness`: 圆形(包括扇形、环形等)的平滑度。数越小圆越平滑,但顶点数也会随之增加。
|
||||
|
||||
## `SerieAnimation`
|
||||
|
||||
* `enable`: 是否开启动画系统。
|
||||
* ~~`threshold`: 是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。~~
|
||||
* `fadeInDelay`: 设定的渐入动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制: `customFadeInDelay`。
|
||||
* `fadeInDuration`: 设定的渐入动画时长,单位毫秒。如果要设置单个数据项的渐入时长,可以用代码定制: `customFadeInDuration`。
|
||||
* `fadeOutDelay`: 设定的渐出动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制: `customFadeOutDelay`。
|
||||
* `fadeOutDuration`: 设定的渐出动画时长,单位毫秒。如果要设置单个数据项的渐出时长,可以用代码定制: `customFadeOutDuration`。
|
||||
* `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`: 刻度标签是否朝内,默认朝外。
|
||||
* `margin`: 刻度标签与轴线之间的距离。
|
||||
* `formatter`: 图例内容字符串模版格式器。支持用 `\n` 换行。模板变量为图例名称 `{value}`,数值格式化通过`numericFormatter`。
|
||||
* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。
|
||||
* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`Serie`的`showAsPositiveNumber`配合使用。
|
||||
* `onZero`: 刻度标签显示在`0`刻度上。
|
||||
* `width`:刻度标签的宽。当为0时系统自动设置。
|
||||
* `height`:刻度标签的高。当为0时系统自动设置。
|
||||
|
||||
* `textLimit`: 文本自适应 [TextLimit](#TextLimit)。只在类目轴中有效。
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
## `AxisLine`
|
||||
|
||||
* `show`: 是否显示坐标轴轴线。
|
||||
* `onZero`: `X` 轴或者 `Y` 轴的轴线是否在另一个轴的 `0` 刻度上,只有在另一个轴为数值轴且包含 `0` 刻度时有效。
|
||||
* `width`: 坐标轴线线宽。
|
||||
* `symbol`: 是否显示箭头。
|
||||
* `symbolWidth`: 箭头宽。
|
||||
* `symbolHeight`: 箭头高。
|
||||
* `symbolOffset`: 箭头偏移。
|
||||
* `symbolDent`: 箭头的凹陷程度。
|
||||
|
||||
## `AxisName`
|
||||
|
||||
* `show`: 是否显示坐标名称。
|
||||
* `name`: 坐标轴名称。
|
||||
* `location`: 坐标轴名称的位置。支持以下类型:
|
||||
* `Start`: 坐标轴起始处。
|
||||
* `Middle`: 坐标轴中间。
|
||||
* `End`: 坐标轴末端。
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
## `AxisSplitLine`
|
||||
|
||||
* `show`: 是否显示坐标分割线。
|
||||
* `interval`: 分割线的显示间隔。`0` 表示显示所有分割线,`1` 表示隔一个隔显示一个分割线,以此类推。
|
||||
* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。
|
||||
|
||||
## `AxisSplitArea`
|
||||
|
||||
* `show`: 是否显示坐标分割区域。
|
||||
* `color`: 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
|
||||
|
||||
## `AxisTick`
|
||||
|
||||
* `show`: 是否显示坐标轴刻度。
|
||||
* `alignWithLabel`: 类目轴中在 `boundaryGap` 为 `true` 的时候有效,可以保证刻度线和标签对齐。
|
||||
* `inside`: 坐标轴刻度是否朝内,默认朝外。
|
||||
* `length`: 坐标轴刻度的长度。
|
||||
* `width`: 坐标轴刻度的宽度。默认为0时宽度和坐标轴一致。
|
||||
* `showStartTick`:是否显示第一个刻度。
|
||||
* `showEndTick`:是否显示最后一个刻度。
|
||||
|
||||
## `Emphasis`
|
||||
|
||||
* `show`: 是否启用高亮样式。
|
||||
* `label`: 图形文本标签样式 [SerieLabel](#SerieLabel)。
|
||||
* `itemStyle`: 图形样式 [ItemStyle](#ItemStyle)。
|
||||
|
||||
## `ItemStyle`
|
||||
|
||||
* `show`: 是否启用。
|
||||
* `color`: 颜色。对于K线图,对应阳线的颜色。
|
||||
* `color0`: 颜色。对于K线图,对应阴线的颜色。
|
||||
* `toColor`: 渐变颜色1。
|
||||
* `toColor2`: 渐变颜色2。只在折线图中有效。
|
||||
* `backgroundColor`: 背景颜色。
|
||||
* `backgroundWidth`: 背景的宽。
|
||||
* `centerColor`: 中心区域的颜色。如环形图的中心区域。
|
||||
* `centerGap`: 中心区域的间隙。如环形图的中心区域于最内环的间隙。
|
||||
* `borderType`: 边框的类型。
|
||||
* `borderColor`: 边框的颜色。对于K线图,对应阳线的边框颜色。
|
||||
* `borderColor0`: 边框的颜色。对于K线图,对应阴线的边框颜色。
|
||||
* `borderWidth`: 边框宽。
|
||||
* `opacity`: 透明度。
|
||||
* `tooltipFormatter`: 提示框单项的字符串模版格式器。具体配置参考`Tooltip`的`formatter`。
|
||||
* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。此字段优先于`SerieLabel`和`Tooltip`的`numericFormatter`。
|
||||
* `cornerRadius`: 圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。支持用0-1的浮点数设置百分比。
|
||||
|
||||
## `LineArrow`
|
||||
|
||||
* `show`: 是否显示箭头。
|
||||
* `position`: 箭头显示位置。支持以下两种位置:
|
||||
* `End`: 末端显示。最后一个数据上显示箭头。
|
||||
* `Start`: 起始端显示。第一个数据上显示箭头。
|
||||
* `width`: 箭头宽。
|
||||
* `height`: 箭头长。
|
||||
* `offset`: 箭头偏移。默认箭头的中心点和数据坐标点一致,可通过 `offset` 调整偏移。
|
||||
* `dent`: 箭头的凹度。
|
||||
|
||||
## `LineStyle`
|
||||
|
||||
* `show`: 是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。
|
||||
* `type`: 线条类型。支持以下五种类型:
|
||||
* `None`: 不显示分割线。
|
||||
* `Solid`: 实线。
|
||||
* `Dashed`: 虚线。
|
||||
* `Dotted`: 点线。
|
||||
* `DashDot`: 点划线。
|
||||
* `DashDotDot`: 双点划线。
|
||||
* `color`: 线条颜色。默认和 `serie` 一致。
|
||||
* `toColor`: 线的渐变颜色(需要水平方向渐变时)。
|
||||
* `toColor2`: 线的渐变颜色2(需要水平方向三个渐变色的渐变时)。
|
||||
* `width`: 线条宽。
|
||||
* `opacity`: 线条的透明度。支持从 `0` 到 `1` 的数字,为 `0` 时不绘制该图形。
|
||||
|
||||
## `Location`
|
||||
|
||||
* `align`: 对齐方式。有以下对齐方式。
|
||||
* `TopLeft`: 左上角对齐。
|
||||
* `TopRight`: 右上角对齐。
|
||||
* `TopCenter`: 置顶居中对齐。
|
||||
* `BottomLeft`: 左下对齐。
|
||||
* `BottomRight`: 右下对齐。
|
||||
* `BottomCenter`: 底部居中对齐。
|
||||
* `Center`: 居中对齐。
|
||||
* `CenterLeft`: 中部靠左对齐。
|
||||
* `CenterRight`: 中部靠右对齐。
|
||||
* `left`: 离容器左侧的距离。
|
||||
* `right`: 离容器右侧的距离。
|
||||
* `top`: 离容器上侧的距离。
|
||||
* `bottom`: 离容器下侧的距离。
|
||||
|
||||
## `SerieData`
|
||||
|
||||
* `name`: 数据项名称。
|
||||
* `selected`: 该数据项是否被选中。
|
||||
* `radius`: 自定义半径。可用在饼图中自定义某个数据项的半径。
|
||||
* `iconStyle`: 数据项图标样式。
|
||||
* `enableLabel`: 是否启用单个数据项的标签设置。
|
||||
* `label`: 单个数据项的标签设置。
|
||||
* `enableItemStyle`: 是否启用单个数据项的样式。
|
||||
* `itemStyle`: 单个数据项的样式设置。
|
||||
* `enableEmphasis`: 是否启用单个数据项的高亮样式。
|
||||
* `emphasis`: 单个数据项的高亮样式设置。
|
||||
* `enableSymbol`: 是否启用单个数据项的标记设置。
|
||||
* `symbol`: 单个数据项的标记设置。
|
||||
* `data`: 可指定任意维数的数值列表。对于折线图和柱状图,`data`其实是`size`为`2`的数组,`data[0]`是x的编号,`data[1]`是`y`的数值,默认显示`data[1]`。其他图表看需求而定是长度大于`2`的数组。可通过`Serie`的`showDataDimension`指定数据长度。
|
||||
|
||||
## `SerieLabel`
|
||||
|
||||
* `show`: 是否显示文本标签。
|
||||
* `position`: 标签的位置。折线图时强制默认为 `Center`,支持以下 `5` 种位置:
|
||||
* `Outside`: 饼图扇区外侧,通过视觉引导线连到相应的扇区。只在饼图种可用。
|
||||
* `Inside`: 饼图扇区内部。只在饼图可用。
|
||||
* `Center`: 在中心位置(折线图,柱状图,饼图)。
|
||||
* `Top`: 顶部(柱状图)。
|
||||
* `Bottom`: 底部(柱状图)。
|
||||
* `formatter`: 标签内容字符串模版格式器。支持用 `\n` 换行。模板变量有: `{a}`: 系列名;`{b}`: 数据名;`{c}`: 数据值;`{d}`: 百分比。示例: `{b}:{c}`。
|
||||
* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。
|
||||
* `offset`: 距离图形元素的偏移。
|
||||
* `autoOffset`: 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。
|
||||
* `backgroundWidth`: 标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。
|
||||
* `backgroundHeight`: 标签的背景高度。一般不用指定,不指定时则自动是文字的高度。
|
||||
* `paddingLeftRight`: 标签文字和边框的左右边距。
|
||||
* `paddingTopBottom`: 标签文字和边框的上下边距。
|
||||
* `line`: 是否显示视觉引导线。在 `label` 位置 设置为 `'Outside'` 的时候会显示视觉引导线。
|
||||
* `lineType`: 视觉引导线类型。支持以下几种类型:
|
||||
* `BrokenLine`: 折线。
|
||||
* `Curves`: 曲线。
|
||||
* `HorizontalLine`: 水平线。
|
||||
* `lineColor`: 视觉引导线自定义颜色。
|
||||
* `lineWidth`: 视觉引导线的宽度。
|
||||
* `lineLength1`: 视觉引导线第一段的长度。
|
||||
* `lineLength2`: 视觉引导线第二段的长度。
|
||||
* `border`: 是否显示边框。
|
||||
* `borderWidth`: 边框宽度。
|
||||
* `borderColor`: 边框颜色。
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
## `SerieSymbol`
|
||||
|
||||
* `show`: 是否显示标记。
|
||||
* `type`: 标记类型。支持以下六种类型:
|
||||
* `EmptyCircle`: 空心圆。
|
||||
* `Circle`: 实心圆。
|
||||
* `Rect`: 正方形。可通过设置`itemStyle`的`cornerRadius`变成圆角矩形。
|
||||
* `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`。
|
||||
|
||||
## `IconStyle`
|
||||
|
||||
* `show` : whether to show the icon.
|
||||
* `Layer` : Shows on top or bottom.
|
||||
* `Sprite` : Icon.
|
||||
* `color` : color.
|
||||
* `width` : The width of the icon.
|
||||
* `height` : the height of the icon.
|
||||
* `Offset` : Offset.
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fa7a80a30cd846139159beaadba05f2
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,161 +0,0 @@
|
||||
# XCharts Q&A
|
||||
|
||||
[XCharts Homepage](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts API](xcharts-api-EN.md)
|
||||
[XCharts Configuration](xcharts-configuration-EN.md)
|
||||
|
||||
[QA 1: How to adjust the margin between the axis and the background?](#How-to-adjust-the-margin-between-the-axis-and-the=-background)
|
||||
[QA 2: How to play agian the fadeIn animation?](#How-to-play-agian-the-fadeIn-animation)
|
||||
[QA 3: How to customize the color of data item in line chart and pie chart?](#How-to-customize-the-color-of-data-item-in-line-chart-and-pie-chart)
|
||||
[QA 4: How to formatter the text of axis label, such as add a units text?](#How-to-formatter-the-text-of-axis-label-such-as-add-a-units-text)
|
||||
[QA 5: How to stack the bar of bar chart](#How-to-stack-the-bar-of-bar-chart)
|
||||
[QA 6: How to make the bar serie in the same bar but not stack?](#How-to-make-the-bar-serie-in-the-same-bar-but-not-stack)
|
||||
[QA 7: How to adjust the bar width and gap of barchart?](#How-to-adjust-the-bar-width-and-gap-of-barchart)
|
||||
[QA 8: How to adjust the color of bar?](#How-to-adjust-the-color-of-bar)
|
||||
[QA 9: Can I adjust the anchor of chart?](#Can-I-adjust-the-anchor-of-chart)
|
||||
[QA 10: Can display more than 1000 data?](#Can-display-more-than-1000-data)
|
||||
[QA 11: Can line chart drawing be dash, dot and dash-dot?](#Can-line-chart-drawing-be-dash-dot-and-dash-dot)
|
||||
[QA 12: How to limit the value range of the Y-axis?](#How-to-limit-the-value-range-of-the-Y-axis)
|
||||
[QA 13: How to customize the tick value range of value axis?](#How-to-customize-the-tick-value-range-of-value-axis)
|
||||
[QA 14: How to display text at the top of data items?](#How-to-display-text-at-the-top-of-data-items)
|
||||
[QA 15: How do I customize icons for data items?](#How-do-I-customize-icons-for-data-items)
|
||||
[QA 16: How to anti-aliasing and make the chart smoother?](#How-to-anti-aliasing-and-make-the-chart-smoother)
|
||||
[QA 17: Why does mouse over chart Tooltip not show?](#Why-does-mouse-over-chart-Tooltip-not-show)
|
||||
[QA 18: How not to display the bar line of Tooltip?](#How-not-to-display-the-bar-line-of-Tooltip)
|
||||
[QA 19: How do I customize the display of Tooltip?](#How-do-I-customize-the-display-of-Tooltip)
|
||||
[QA 20: How do I get the Y-axis to display multiple decimal places?](#How-do-I-get-the-Y-axis-to-display-multiple-decimal-places)
|
||||
[QA 21: How do I dynamically update data with code?](#How-do-I-dynamically-update-data-with-code)
|
||||
[QA 22: How to display legend? Why are legends sometimes not displayed?](#How-to-display-legend?Why-are-legends-sometimes-not-displayed)
|
||||
[QA 23: How to make chart as prefab?](#How-to-make-chart-as-prefab)
|
||||
[QA 24: How do I draw custom graphic in chart,such as line or dot?](#How-do-I-draw-custom-content-in-chart-such-as-line-or-dot)
|
||||
[QA 25: How to achieve similar data movement effect of ELECTRO cardiogram?](#How-to-achieve-similar-data-movement-effect-of-ELECTRO-cardiogram)
|
||||
[QA 26: How do I use the background component? What are the conditions?](#How-do-I-use-the-background-component-What-are-the-conditions)
|
||||
[QA 27: Mesh can not have more than 65000 vertices?](#Mesh-cannot-have-more-than-65000-vertices)
|
||||
[QA 28: Why are the parameters set in Serie reset after they run?](#Why-are-the-parameters-set-in-Serie-reset-after-they-run)
|
||||
[QA 29: Why are many custom colors lost after upgrading to 1.6.0? How should I upgrade?](#Why_are_many_custom_colors_lost_after_upgrading_to_1_6_0_How_should_I_upgrade)
|
||||
|
||||
## How-to-adjust-the-margin-between-the-axis-and-the=-background
|
||||
|
||||
A: `Grid` conponent,which can adjust the left, right, up, down margins of chart.
|
||||
|
||||
## How-to-play-agian-the-fadeIn-animation
|
||||
|
||||
A: call the `chart.AnimationReset()` API.
|
||||
|
||||
## How-to-customize-the-color-of-data-item-in-line chart-and-pie-chart
|
||||
|
||||
A: `Theme`->`colorPalette`, or the sub component `LineStyle` and `ItemStyle` of `Serie`.
|
||||
|
||||
## How-to-formatter-the-text-of-axis-label-such-as-add-a-units-text
|
||||
|
||||
A: Adjust `formatter` and `numericFormatter` parameter of `Legend`, `AxisLabel`, `Tooltop`, `SerieLabel`.
|
||||
|
||||
## How-to-stack-the-bar-of-bar-chart
|
||||
|
||||
A: Set the `stack` parameter of `Serie`, the series will stack in a bar with the same `stack`.
|
||||
|
||||
## How-to-make-the-bar-serie-in-the-same-bar-but-not-stack
|
||||
|
||||
A: Set the `barGap` of `Serie` to `-1`,`stack` to null.
|
||||
|
||||
## How-to-adjust-the-bar-width-and-gap-of-barchart
|
||||
|
||||
A: Adjust the `barWidth` and `barGap` parameter of `Serie`, the last `serie`'s `barWidth` and `barGap` are valid when multiple `serie`.
|
||||
|
||||
## How-to-adjust-the-color-of-bar
|
||||
|
||||
A: Adjust the `ItemStyle` of `Data` in `inspector`.
|
||||
|
||||
## Can-I-adjust-the-anchor-of-chart
|
||||
|
||||
A: Yes, you can set any one of 16 anchors but the value use default.
|
||||
|
||||
## Can-display-more-than-1000-data
|
||||
|
||||
A: Yes. But `UGUI` limits `65000` vertices to a single `Graphic`, so too much data may not be displayed completely. The sampling simplification curve can be turned on by setting the sampling distance `sampleDist`. You can also set some parameters to reduce the number of vertices in the chart to help show more data. Such as reducing the size of the chart, close or reduce the axis of the client drawing, close `Symbol` and `Label` display. A `Normal` line chart occupies fewer vertices than a `Smooth` line chart. The `1.5.0` and above versions can set `large` and `largeThreshold` parameters to enable performance mode.
|
||||
|
||||
## Can-line-chart-drawing-be-dash-dot-and-dash-dot
|
||||
|
||||
A: Yes. Adjust the `lineType` of `Serie`.
|
||||
|
||||
## How-to-limit-the-value-range-of-the-Y-axis
|
||||
|
||||
A: Select the `minMaxType` of `Axis` as `Custom`, then set `min` and `max` to the values you want.
|
||||
|
||||
## How-to-customize-the-tick-value-range-of-value-axis
|
||||
|
||||
A: By default, it is automatically split by the `splitNumber` of `Axis`. Also, you can customize the `interval` to the range you want.
|
||||
|
||||
## How-to-display-text-at-the-top-of-data-items
|
||||
|
||||
A: Adjust the `Label` of `Serie`.
|
||||
|
||||
## How-do-I-customize-icons-for-data-items
|
||||
|
||||
A: Set the `Icon` of `Data` in `Serie`.
|
||||
|
||||
## How-to-anti-aliasing-and-make-the-chart-smoother
|
||||
|
||||
A: Open the `Anti-Aliasing` setting in `Unity`. Selected the UI Canvas `Render Mode` as `Screen Space-Camera`, selected `MSAA`, set `4` times or higher anti-aliasing. The sawtooth can only be reduced and unavoidable. The higher the pixel, the less obvious the sawtooth is.
|
||||
|
||||
## Why-does-mouse-over-chart-Tooltip-not-show
|
||||
|
||||
A: Verify `Toolip` is opened. Verify that the parent node of chart has turned off mouse events.
|
||||
|
||||
## How-not-to-display-the-bar-line-of-Tooltip
|
||||
|
||||
A: Set the `type` of `Tooltup` as `None`. Or adjust the parameters of `lineStyle`.
|
||||
|
||||
## How-do-I-customize-the-display-of-Tooltip
|
||||
|
||||
A: See the `formatter`, `itemFormatter`, `titleFormatter` parameters of `Tooltip`.
|
||||
|
||||
## How-do-I-get-the-Y-axis-to-display-multiple-decimal-places
|
||||
|
||||
A: Set the `numericFormatter` parameter of `AxisLabel`.
|
||||
|
||||
## How-do-I-dynamically-update-data-with-code
|
||||
|
||||
A: See example: `Example01_UpdateData.cs`
|
||||
|
||||
## How-to-display-legend?Why-are-legends-sometimes-not-displayed
|
||||
|
||||
A: First, the `name` in `Serie` must have a value that is not null. Then set `Legend` is `show`, where `data` can be empty by default, indicating that all legends are displayed. If you only want to display part of the `Serie` legend, fill in `data` with the `name` of the legend you want to display. If none of the values in `data` are `name` of the series, the legend will not be displayed.
|
||||
|
||||
## How-to-make-chart-as-prefab
|
||||
|
||||
A: Before make prefab, please delete all sub gameObject under chart which auto-created by `XCharts`.
|
||||
|
||||
## How-do-I-draw-custom-content-in-chart-such-as-line-or-dot
|
||||
|
||||
A: Implement `onCustomDraw` of chart, see `Example12_CustomDrawing.cs`.
|
||||
|
||||
## How-to-achieve-similar-data-movement-effect-of-ELECTRO-cardiogram
|
||||
|
||||
A: See `Example_Dynamic.cs`.
|
||||
|
||||
## How-do-I-use-the-background-component-What-are-the-conditions
|
||||
|
||||
A: Setting `show` to `true` for the `background` component.
|
||||
|
||||
## Mesh-cannot-have-more-than-65000-vertices
|
||||
|
||||
A: This is the limit of `UGUI` on the number of vertices for a single `Graphic`. `XCharts` is draw chart on a single `Graphic`, so there is also this limitation. The solution can be referred to: [QA 10: Can display more than 1000 data](#Can-display-more-than-1000-data)
|
||||
|
||||
## Why-are-the-parameters-set-in-Serie-reset-after-they-run
|
||||
|
||||
A: Check whether `RemoveData()` and add new `Serie` in the code. If you want to keep the configuration of `Serie`, you can only `ClearData()` which just clear data and then readd the data to the old serie.
|
||||
|
||||
## Why_are_many_custom_colors_lost_after_upgrading_to_1_6_0_How_should_I_upgrade
|
||||
|
||||
A: In version `1.6.0`, in order to reduce implicit conversion, all drawing related `Color` was changed to `Color32`, so some custom colors were lost. The main components affected are: `ItemStyle`, `LineStyle`, `AreaStyle`, `Vessel`, `VisualMap`, `AxisSplitArea`, `AxisSplitLine`, `GaugeAxis`,`SerieLabel`, etc. Can use the script [UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs) to upgrade.
|
||||
The upgrade steps are as follows:
|
||||
1. Back up the project.
|
||||
2. Download or copy the script [UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs) in the old project `Editor`, Change the `color` field inside to `color.clear` (because some fields may not exist in the old version).
|
||||
3. After compilation, the old version of color configuration file is exported through `menu bar -> XCharts-> ExportColorConfig` (the configuration file is saved by default to `color.config` under `Assets`).
|
||||
4. Upgrade `XCharts` to the latest version.
|
||||
5. The custom color can be restored by importing `color.config` through `menu bar -> XCharts-> ImportColorConfig` (if `color.config` is not under `Assets` of the upgraded project, copy it to this directory).
|
||||
|
||||
[XCharts Homepage](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts API](xcharts-api-EN.md)
|
||||
[XCharts Configuration](xcharts-configuration-EN.md)
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca54a17a3a60f4b36b0be43df9f1c33d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,35 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 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();
|
||||
if(target == null) return;
|
||||
m_Chart = (BarChart)target;
|
||||
}
|
||||
|
||||
protected override void OnEndInspectorGUI()
|
||||
{
|
||||
base.OnEndInspectorGUI();
|
||||
if (m_Chart == null && target == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,335 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System.Text;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI BaseChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(BaseChart), false)]
|
||||
public class BaseChartEditor : Editor
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
private const float k_IconWidth = 14;
|
||||
private const float k_IconGap = 0f;
|
||||
private const float k_IconXOffset = 10f;
|
||||
private const float k_IconYOffset = -1.5f;
|
||||
#else
|
||||
private const float k_IconWidth = 14;
|
||||
private const float k_IconGap = 0f;
|
||||
private const float k_IconXOffset = 4f;
|
||||
private const float k_IconYOffset = -3f;
|
||||
#endif
|
||||
|
||||
protected BaseChart m_Chart;
|
||||
protected SerializedProperty m_Script;
|
||||
protected SerializedProperty m_MultiComponentMode;
|
||||
protected SerializedProperty m_EnableTextMeshPro;
|
||||
protected SerializedProperty m_ChartWidth;
|
||||
protected SerializedProperty m_ChartHeight;
|
||||
protected SerializedProperty m_Settings;
|
||||
protected SerializedProperty m_Theme;
|
||||
protected SerializedProperty m_Background;
|
||||
protected SerializedProperty m_Titles;
|
||||
protected SerializedProperty m_Legends;
|
||||
protected SerializedProperty m_Tooltips;
|
||||
protected SerializedProperty m_Vessels;
|
||||
protected SerializedProperty m_Radars;
|
||||
protected SerializedProperty m_Series;
|
||||
protected SerializedProperty m_Large;
|
||||
protected SerializedProperty m_ChartName;
|
||||
protected SerializedProperty m_DebugMode;
|
||||
|
||||
protected float m_DefaultLabelWidth;
|
||||
protected float m_DefaultFieldWidth;
|
||||
private int m_SeriesSize;
|
||||
private Vector2 scrollPos;
|
||||
private bool m_CheckWarning = false;
|
||||
private StringBuilder sb = new StringBuilder();
|
||||
|
||||
private bool m_BaseFoldout;
|
||||
private bool m_CustomFoldout;
|
||||
protected bool m_ShowAllComponent;
|
||||
protected Dictionary<string, bool> m_Flodouts = new Dictionary<string, bool>();
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
if (target == null) return;
|
||||
m_Chart = (BaseChart)target;
|
||||
m_Script = serializedObject.FindProperty("m_Script");
|
||||
m_MultiComponentMode = serializedObject.FindProperty("m_MultiComponentMode");
|
||||
m_EnableTextMeshPro = serializedObject.FindProperty("m_EnableTextMeshPro");
|
||||
m_ChartName = serializedObject.FindProperty("m_ChartName");
|
||||
m_ChartWidth = serializedObject.FindProperty("m_ChartWidth");
|
||||
m_ChartHeight = serializedObject.FindProperty("m_ChartHeight");
|
||||
m_Theme = serializedObject.FindProperty("m_Theme");
|
||||
m_Settings = serializedObject.FindProperty("m_Settings");
|
||||
m_Background = serializedObject.FindProperty("m_Background");
|
||||
m_Titles = serializedObject.FindProperty("m_Titles");
|
||||
m_Legends = serializedObject.FindProperty("m_Legends");
|
||||
m_Tooltips = serializedObject.FindProperty("m_Tooltips");
|
||||
m_Vessels = serializedObject.FindProperty("m_Vessels");
|
||||
m_Series = serializedObject.FindProperty("m_Series");
|
||||
m_Radars = serializedObject.FindProperty("m_Radars");
|
||||
|
||||
m_Large = serializedObject.FindProperty("m_Large");
|
||||
m_DebugMode = serializedObject.FindProperty("m_DebugMode");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (m_Chart == null && target == null)
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
return;
|
||||
}
|
||||
serializedObject.Update();
|
||||
m_DefaultLabelWidth = EditorGUIUtility.labelWidth;
|
||||
m_DefaultFieldWidth = EditorGUIUtility.fieldWidth;
|
||||
|
||||
OnStartInspectorGUI();
|
||||
OnMiddleInspectorGUI();
|
||||
OnEndInspectorGUI();
|
||||
OnDebugInspectorGUI();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
protected virtual void OnStartInspectorGUI()
|
||||
{
|
||||
BlockStart();
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
var version = string.Format("v{0}_{1}", XChartsMgr.version, XChartsMgr.versionDate);
|
||||
if (m_EnableTextMeshPro.boolValue)
|
||||
{
|
||||
version += " TMP";
|
||||
}
|
||||
EditorGUILayout.LabelField(version);
|
||||
|
||||
if (GUILayout.Button("Github"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
BlockEnd();
|
||||
|
||||
BlockStart();
|
||||
m_BaseFoldout = EditorGUILayout.Foldout(m_BaseFoldout, "Base", true);
|
||||
if (m_BaseFoldout)
|
||||
{
|
||||
EditorGUILayout.PropertyField(m_Script);
|
||||
EditorGUILayout.PropertyField(m_ChartName);
|
||||
var fileds = m_Chart.GetCustomChartInspectorShowFileds();
|
||||
if (fileds != null && fileds.Length > 0)
|
||||
{
|
||||
foreach (var filed in fileds)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty(filed));
|
||||
}
|
||||
}
|
||||
}
|
||||
BlockEnd();
|
||||
|
||||
BlockField(m_Theme);
|
||||
BlockField(m_Settings);
|
||||
BlockField(m_Background);
|
||||
|
||||
m_ShowAllComponent = m_MultiComponentMode.boolValue;
|
||||
BlockListField(m_ShowAllComponent, m_Titles);
|
||||
BlockListField(m_ShowAllComponent, m_Legends);
|
||||
BlockListField(m_ShowAllComponent, m_Tooltips);
|
||||
BlockListField(m_ShowAllComponent, SerieType.Liquid, m_Vessels);
|
||||
BlockListField(m_ShowAllComponent, SerieType.Radar, m_Radars);
|
||||
}
|
||||
|
||||
protected virtual void OnMiddleInspectorGUI()
|
||||
{
|
||||
BlockField(m_Series);
|
||||
}
|
||||
|
||||
protected virtual void OnEndInspectorGUI()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnDebugInspectorGUI()
|
||||
{
|
||||
BlockStart();
|
||||
EditorGUILayout.PropertyField(m_DebugMode);
|
||||
EditorGUILayout.PropertyField(m_MultiComponentMode);
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.Space();
|
||||
MoreDebugInspector();
|
||||
CheckWarning();
|
||||
BlockEnd();
|
||||
}
|
||||
|
||||
protected virtual void MoreDebugInspector()
|
||||
{
|
||||
}
|
||||
|
||||
protected void BlockStart()
|
||||
{
|
||||
if (XChartsSettings.editorBlockEnable) EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
}
|
||||
|
||||
protected void BlockEnd()
|
||||
{
|
||||
if (XChartsSettings.editorBlockEnable) EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
protected void BlockField(params SerializedProperty[] props)
|
||||
{
|
||||
if (props.Length == 0) return;
|
||||
BlockStart();
|
||||
foreach (var prop in props)
|
||||
EditorGUILayout.PropertyField(prop, true);
|
||||
BlockEnd();
|
||||
}
|
||||
|
||||
protected void BlockListField(bool all, params SerializedProperty[] props)
|
||||
{
|
||||
if (props.Length == 0) return;
|
||||
BlockStart();
|
||||
foreach (var prop in props)
|
||||
{
|
||||
if (all)
|
||||
{
|
||||
var flag = m_Flodouts.ContainsKey(prop.displayName) && m_Flodouts[prop.displayName];
|
||||
m_Flodouts[prop.displayName] = EditorGUILayout.Foldout(flag, prop.displayName, true);
|
||||
if (m_Flodouts[prop.displayName])
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
var currRect = EditorGUILayout.GetControlRect(GUILayout.Height(0));
|
||||
currRect.y -= EditorGUIUtility.singleLineHeight;
|
||||
var rect1 = new Rect(currRect.width + k_IconXOffset,
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
if (GUI.Button(rect1, ChartEditorHelper.Styles.iconAdd, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
prop.InsertArrayElementAtIndex(prop.arraySize > 0 ? prop.arraySize - 1 : 0);
|
||||
var chart = prop.GetArrayElementAtIndex(0).serializedObject.targetObject as BaseChart;
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
chart.RemoveChartObject();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
for (int i = 0; i < prop.arraySize; i++)
|
||||
{
|
||||
EditorGUILayout.PropertyField(prop.GetArrayElementAtIndex(i), true);
|
||||
currRect = EditorGUILayout.GetControlRect(GUILayout.Height(0));
|
||||
currRect.y -= EditorGUI.GetPropertyHeight(prop.GetArrayElementAtIndex(i));
|
||||
rect1 = new Rect(currRect.width + k_IconXOffset,
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
var oldColor = GUI.contentColor;
|
||||
GUI.contentColor = Color.black;
|
||||
if (GUI.Button(rect1, ChartEditorHelper.Styles.iconRemove, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
if (prop.arraySize == 1)
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("Delete component", "Confirm to delete last component?", "Sure", "Cancel"))
|
||||
{
|
||||
var chart = prop.GetArrayElementAtIndex(0).serializedObject.targetObject as BaseChart;
|
||||
prop.DeleteArrayElementAtIndex(i);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
chart.RemoveChartObject();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
}
|
||||
else if (i < prop.arraySize && i >= 0)
|
||||
{
|
||||
var chart = prop.GetArrayElementAtIndex(0).serializedObject.targetObject as BaseChart;
|
||||
prop.DeleteArrayElementAtIndex(i);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
chart.RemoveChartObject();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
}
|
||||
var rect2 = new Rect(currRect.width + k_IconXOffset - k_IconWidth - k_IconGap,
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
if (GUI.Button(rect2, ChartEditorHelper.Styles.iconDown, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
if (i < prop.arraySize - 1) prop.MoveArrayElement(i, i + 1);
|
||||
}
|
||||
var rect3 = new Rect(currRect.width + k_IconXOffset - 2 * (k_IconWidth + k_IconGap),
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
if (GUI.Button(rect3, ChartEditorHelper.Styles.iconUp, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
if (i > 0) prop.MoveArrayElement(i, i - 1);
|
||||
}
|
||||
GUI.contentColor = oldColor;
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
else if (prop.arraySize > 0) EditorGUILayout.PropertyField(prop.GetArrayElementAtIndex(0), true);
|
||||
}
|
||||
BlockEnd();
|
||||
}
|
||||
|
||||
protected void BlockListField(bool all, SerieType serieType, params SerializedProperty[] props)
|
||||
{
|
||||
if (!m_Chart.ContainsSerie(serieType)) return;
|
||||
BlockListField(all, props);
|
||||
}
|
||||
|
||||
private void CheckWarning()
|
||||
{
|
||||
if (GUILayout.Button("Remove All Chart Object"))
|
||||
{
|
||||
m_Chart.RemoveChartObject();
|
||||
}
|
||||
// if (GUILayout.Button("Check XCharts Update"))
|
||||
// {
|
||||
// CheckVersionEditor.ShowWindow();
|
||||
// }
|
||||
if (m_CheckWarning)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("Check Warning"))
|
||||
{
|
||||
m_CheckWarning = true;
|
||||
m_Chart.CheckWarning();
|
||||
}
|
||||
if (GUILayout.Button("Hide Warning"))
|
||||
{
|
||||
m_CheckWarning = false;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
sb.Length = 0;
|
||||
sb.AppendFormat("v{0}", XChartsMgr.fullVersion);
|
||||
if (!string.IsNullOrEmpty(m_Chart.warningInfo))
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.Append(m_Chart.warningInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.Append("Perfect! No warning!");
|
||||
}
|
||||
EditorGUILayout.HelpBox(sb.ToString(), MessageType.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GUILayout.Button("Check warning"))
|
||||
{
|
||||
m_CheckWarning = true;
|
||||
m_Chart.CheckWarning();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI CandlestickChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(CandlestickChart), false)]
|
||||
public class CandlestickChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (CandlestickChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI CoordinateChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(CoordinateChart), false)]
|
||||
public class CoordinateChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Grids;
|
||||
protected SerializedProperty m_MultipleXAxis;
|
||||
protected SerializedProperty m_XAxes;
|
||||
protected SerializedProperty m_MultipleYAxis;
|
||||
protected SerializedProperty m_YAxes;
|
||||
protected SerializedProperty m_DataZooms;
|
||||
protected SerializedProperty m_VisualMaps;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (CoordinateChart)target;
|
||||
m_Grids = serializedObject.FindProperty("m_Grids");
|
||||
m_XAxes = serializedObject.FindProperty("m_XAxes");
|
||||
m_YAxes = serializedObject.FindProperty("m_YAxes");
|
||||
m_DataZooms = serializedObject.FindProperty("m_DataZooms");
|
||||
m_VisualMaps = serializedObject.FindProperty("m_VisualMaps");
|
||||
}
|
||||
|
||||
protected override void OnStartInspectorGUI()
|
||||
{
|
||||
base.OnStartInspectorGUI();
|
||||
BlockListField(m_ShowAllComponent, m_DataZooms);
|
||||
BlockListField(m_ShowAllComponent, m_VisualMaps);
|
||||
BlockListField(m_ShowAllComponent, m_Grids);
|
||||
BlockListField(m_ShowAllComponent, m_XAxes);
|
||||
BlockListField(m_ShowAllComponent, m_YAxes);
|
||||
}
|
||||
|
||||
protected override void MoreDebugInspector()
|
||||
{
|
||||
base.MoreDebugInspector();
|
||||
CovertXYAxis();
|
||||
}
|
||||
|
||||
private void CovertXYAxis()
|
||||
{
|
||||
if (GUILayout.Button("Covert XY Axis"))
|
||||
{
|
||||
(m_Chart as CoordinateChart).CovertXYAxis(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 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 override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (GaugeChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 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();
|
||||
if(target == null) return;
|
||||
m_Chart = (HeatmapChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 - 2021 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();
|
||||
if(target == null) return;
|
||||
m_Chart = (LineChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bd1a238bc5b407408b8f902aa3db9fd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,20 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI LiquidChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(LiquidChart), false)]
|
||||
public class LiquidChartEditor : BaseChartEditor
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 307a1578a6be1403c98fdc27d99d1808
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 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 override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (PieChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28de30021bed0f945af09633584fcb44
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,41 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI PolarChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(PolarChart), false)]
|
||||
public class PolarChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Polars;
|
||||
protected SerializedProperty m_RadiusAxes;
|
||||
protected SerializedProperty m_AngleAxes;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (PolarChart)target;
|
||||
m_Polars = serializedObject.FindProperty("m_Polars");
|
||||
m_RadiusAxes = serializedObject.FindProperty("m_RadiusAxes");
|
||||
m_AngleAxes = serializedObject.FindProperty("m_AngleAxes");
|
||||
}
|
||||
|
||||
protected override void OnStartInspectorGUI()
|
||||
{
|
||||
base.OnStartInspectorGUI();
|
||||
var showAll = m_MultiComponentMode.boolValue;
|
||||
BlockListField(showAll, m_Polars);
|
||||
BlockListField(showAll, m_RadiusAxes);
|
||||
BlockListField(showAll, m_AngleAxes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 157ef5f1d75e04aa1814e0b188591912
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,35 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieAnimation), true)]
|
||||
public class AnimationDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Animation"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Enable"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_FadeInDuration");
|
||||
PropertyField(prop, "m_FadeInDelay");
|
||||
PropertyField(prop, "m_FadeOutDuration");
|
||||
PropertyField(prop, "m_FadeOutDelay");
|
||||
PropertyField(prop, "m_DataChangeEnable");
|
||||
PropertyField(prop, "m_DataChangeDuration");
|
||||
PropertyField(prop, "m_ActualDuration");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Axis), true)]
|
||||
public class AxisDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Axis"; } }
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
SerializedProperty m_Type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty m_LogBase = prop.FindPropertyRelative("m_LogBase");
|
||||
SerializedProperty m_MinMaxType = prop.FindPropertyRelative("m_MinMaxType");
|
||||
Axis.AxisType type = (Axis.AxisType)m_Type.enumValueIndex;
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
var isPolar = chart is PolarChart;
|
||||
EditorGUI.indentLevel++;
|
||||
PropertyField(prop, isPolar ? "m_PolarIndex" : "m_GridIndex");
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_Position");
|
||||
PropertyField(prop, "m_Offset");
|
||||
if (type == Axis.AxisType.Log)
|
||||
{
|
||||
PropertyField(prop, "m_LogBaseE");
|
||||
EditorGUI.BeginChangeCheck();
|
||||
PropertyField(prop, "m_LogBase");
|
||||
if (m_LogBase.floatValue <= 0 || m_LogBase.floatValue == 1)
|
||||
{
|
||||
m_LogBase.floatValue = 10;
|
||||
}
|
||||
EditorGUI.EndChangeCheck();
|
||||
}
|
||||
if (type == Axis.AxisType.Value || type == Axis.AxisType.Time)
|
||||
{
|
||||
PropertyField(prop, "m_MinMaxType");
|
||||
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++;
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
EditorGUI.indentLevel--;
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_CeilRate");
|
||||
if (type == Axis.AxisType.Value)
|
||||
{
|
||||
PropertyField(prop, "m_Inverse");
|
||||
}
|
||||
}
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
PropertyField(prop, "m_InsertDataToHead");
|
||||
PropertyField(prop, "m_MaxCache");
|
||||
PropertyField(prop, "m_BoundaryGap");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(prop, "m_Interval");
|
||||
}
|
||||
DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_AxisLine");
|
||||
PropertyField(prop, "m_AxisName");
|
||||
PropertyField(prop, "m_AxisTick");
|
||||
PropertyField(prop, "m_AxisLabel");
|
||||
PropertyField(prop, "m_SplitLine");
|
||||
PropertyField(prop, "m_SplitArea");
|
||||
PropertyField(prop, "m_IconStyle");
|
||||
PropertyListField(prop, "m_Icons", true);
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
PropertyListField(prop, "m_Data", true);
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(XAxis), true)]
|
||||
public class XAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "XAxis"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(YAxis), true)]
|
||||
public class YAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "YAxis"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AngleAxis), true)]
|
||||
public class AngleAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "AngleAxis"; } }
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_StartAngle");
|
||||
PropertyField(prop, "m_Clockwise");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(RadiusAxis), true)]
|
||||
public class RadiusAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "RadiusAxis"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisLabel), true)]
|
||||
public class AxisLabelDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "AxisLabel"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Inside");
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_Margin");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_OnZero");
|
||||
PropertyField(prop, "m_TextLimit");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisName), true)]
|
||||
public class AxisNameDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "AxisName"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Name");
|
||||
PropertyField(prop, "m_Location");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisSplitArea), true)]
|
||||
public class AxisSplitAreaDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "SplitArea"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Color");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0544f1db7f17644bb3cbe7c85da84d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,65 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(DataZoom), true)]
|
||||
public class DataZoomDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "DataZoom"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Enable"))
|
||||
{
|
||||
var m_SupportSlider = prop.FindPropertyRelative("m_SupportSlider");
|
||||
var m_Start = prop.FindPropertyRelative("m_Start");
|
||||
var m_End = prop.FindPropertyRelative("m_End");
|
||||
var m_MinShowNum = prop.FindPropertyRelative("m_MinShowNum");
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_SupportInside");
|
||||
PropertyField(prop, m_SupportSlider);
|
||||
PropertyField(prop, "m_ZoomLock");
|
||||
PropertyField(prop, "m_ScrollSensitivity");
|
||||
PropertyField(prop, "m_RangeMode");
|
||||
PropertyField(prop, m_Start);
|
||||
PropertyField(prop, m_End);
|
||||
PropertyField(prop, m_MinShowNum);
|
||||
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;
|
||||
if (m_SupportSlider.boolValue)
|
||||
{
|
||||
PropertyField(prop, "m_ShowDataShadow");
|
||||
PropertyField(prop, "m_ShowDetail");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_FillerColor");
|
||||
PropertyField(prop, "m_Left");
|
||||
PropertyField(prop, "m_Right");
|
||||
PropertyField(prop, "m_Top");
|
||||
PropertyField(prop, "m_Bottom");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_AreaStyle");
|
||||
PropertyListField(prop, "m_XAxisIndexs", true);
|
||||
PropertyListField(prop, "m_YAxisIndexs", true);
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyListField(prop, "m_XAxisIndexs", true);
|
||||
PropertyListField(prop, "m_YAxisIndexs", true);
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cba26e421f79077499f05aaf10d06b4f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,30 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Emphasis), true)]
|
||||
public class EmphasisDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Emphasis"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Label");
|
||||
PropertyField(prop, "m_ItemStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7de9b5e4c5d474fdd88ebb89f0924305
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,70 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(GaugeAxis), true)]
|
||||
public class GaugeAxisDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Gauge Axis"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_AxisLine");
|
||||
PropertyField(prop, "m_SplitLine");
|
||||
PropertyField(prop, "m_AxisTick");
|
||||
PropertyField(prop, "m_AxisLabel");
|
||||
PropertyField(prop, "m_AxisLabelText");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[CustomPropertyDrawer(typeof(StageColor), true)]
|
||||
public class GaugeAxisLineStageColorDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty m_Percent = prop.FindPropertyRelative("m_Percent");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
|
||||
ChartEditorHelper.MakeTwoField(ref drawRect, drawRect.width, m_Percent, m_Color, "Stage");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(GaugePointer), true)]
|
||||
public class GaugePointerDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Gauge Pointer"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Length");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dec6cfc5ef85147738a81d8de84b079a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,32 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Grid), true)]
|
||||
public class GridDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Grid"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Left");
|
||||
PropertyField(prop, "m_Right");
|
||||
PropertyField(prop, "m_Top");
|
||||
PropertyField(prop, "m_Bottom");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4142159d55a64e1d88d81ac84b714d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,39 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Legend), true)]
|
||||
public class LegendDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Legend"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_IconType");
|
||||
PropertyField(prop, "m_ItemWidth");
|
||||
PropertyField(prop, "m_ItemHeight");
|
||||
PropertyField(prop, "m_ItemGap");
|
||||
PropertyField(prop, "m_ItemAutoColor");
|
||||
PropertyField(prop, "m_SelectedMode");
|
||||
PropertyField(prop, "m_Orient");
|
||||
PropertyField(prop, "m_Location");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
PropertyListField(prop, "m_Icons");
|
||||
PropertyListField(prop, "m_Data");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b96d10541649a23468168ba0bf1c0bc5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,30 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Polar), true)]
|
||||
public class PolarDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Polar"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyField(prop, "m_Radius");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48ff9465776e54e749f9ff8c424bafe2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,58 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Radar), true)]
|
||||
public class RadarDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Radar"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Shape");
|
||||
PropertyField(prop, "m_PositionType");
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyField(prop, "m_Radius");
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
PropertyField(prop, "m_CeilRate");
|
||||
PropertyField(prop, "m_IsAxisTooltip");
|
||||
PropertyField(prop, "m_AxisLine");
|
||||
PropertyField(prop, "m_SplitLine");
|
||||
PropertyField(prop, "m_SplitArea");
|
||||
PropertyField(prop, "m_IndicatorList");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(Radar.Indicator), true)]
|
||||
public class RadarIndicatorDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Indicator"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Name");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09bf71ecf64f321468ac28af28bec878
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,447 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Serie), true)]
|
||||
public class SerieDrawer : BasePropertyDrawer
|
||||
{
|
||||
private bool m_IsPolar = false;
|
||||
private List<bool> m_DataFoldout = new List<bool>();
|
||||
public override string ClassName { get { return "Serie"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
pos.width -= 9;
|
||||
base.OnGUI(pos, prop, label);
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
var type = prop.FindPropertyRelative("m_Type");
|
||||
var serieType = (SerieType)type.enumValueIndex;
|
||||
if (!MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
var orderButton = 48;
|
||||
var gap = 4;
|
||||
var drawRect = pos;
|
||||
drawRect.x += EditorGUIUtility.labelWidth + gap;
|
||||
drawRect.width = pos.width - drawRect.x + ChartEditorHelper.BOOL_WIDTH - orderButton;
|
||||
type.enumValueIndex = EditorGUI.Popup(drawRect, (int)serieType, GetChartSerieTypeNames(chart));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IsPolar = chart is PolarChart;
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
type.enumValueIndex = EditorGUI.Popup(m_DrawRect, "Type", (int)serieType, GetChartSerieTypeNames(chart));
|
||||
var hig = EditorGUI.GetPropertyHeight(prop);
|
||||
m_DrawRect.y += hig;
|
||||
m_Heights[m_KeyName] += hig;
|
||||
|
||||
PropertyField(prop, "m_Name");
|
||||
PropertyField(prop, "m_InsertDataToHead");
|
||||
switch (serieType)
|
||||
{
|
||||
case SerieType.Line:
|
||||
PropertyField(prop, "m_Stack");
|
||||
if (m_IsPolar)
|
||||
{
|
||||
PropertyField(prop, "m_PolarIndex");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(prop, "m_XAxisIndex");
|
||||
PropertyField(prop, "m_YAxisIndex");
|
||||
}
|
||||
PropertyFieldLimitMin(prop, "m_MinShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxCache", 0);
|
||||
PropertyField(prop, "m_LineType");
|
||||
PropertyField(prop, "m_SampleDist");
|
||||
PropertyField(prop, "m_SampleType");
|
||||
PropertyField(prop, "m_SampleAverage");
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_Large");
|
||||
PropertyField(prop, "m_LargeThreshold");
|
||||
PropertyField(prop, "m_Symbol");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_LineArrow");
|
||||
PropertyField(prop, "m_AreaStyle");
|
||||
break;
|
||||
case SerieType.Bar:
|
||||
PropertyField(prop, "m_Stack");
|
||||
if (m_IsPolar)
|
||||
{
|
||||
PropertyField(prop, "m_PolarIndex");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(prop, "m_XAxisIndex");
|
||||
PropertyField(prop, "m_YAxisIndex");
|
||||
}
|
||||
PropertyFieldLimitMin(prop, "m_MinShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxCache", 0);
|
||||
PropertyField(prop, "m_BarType");
|
||||
PropertyField(prop, "m_BarPercentStack");
|
||||
PropertyField(prop, "m_BarWidth");
|
||||
PropertyField(prop, "m_BarGap");
|
||||
PropertyField(prop, "m_BarZebraWidth");
|
||||
PropertyField(prop, "m_BarZebraGap");
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_Large");
|
||||
PropertyField(prop, "m_LargeThreshold");
|
||||
break;
|
||||
case SerieType.Pie:
|
||||
PropertyField(prop, "m_RoseType");
|
||||
PropertyField(prop, "m_Space");
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyTwoFiled(prop, "m_Radius");
|
||||
PropertyField(prop, "m_MinAngle");
|
||||
PropertyField(prop, "m_RoundCap");
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
PropertyField(prop, "m_AvoidLabelOverlap");
|
||||
break;
|
||||
case SerieType.Ring:
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyTwoFiled(prop, "m_Radius");
|
||||
PropertyField(prop, "m_StartAngle");
|
||||
PropertyField(prop, "m_RingGap");
|
||||
PropertyField(prop, "m_RoundCap");
|
||||
PropertyField(prop, "m_Clockwise");
|
||||
PropertyField(prop, "m_TitleStyle");
|
||||
break;
|
||||
case SerieType.Radar:
|
||||
PropertyField(prop, "m_RadarType");
|
||||
PropertyField(prop, "m_RadarIndex");
|
||||
PropertyField(prop, "m_Symbol");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_AreaStyle");
|
||||
break;
|
||||
case SerieType.Scatter:
|
||||
case SerieType.EffectScatter:
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_Symbol");
|
||||
break;
|
||||
case SerieType.Heatmap:
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
break;
|
||||
case SerieType.Gauge:
|
||||
PropertyField(prop, "m_GaugeType");
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyTwoFiled(prop, "m_Radius");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyField(prop, "m_StartAngle");
|
||||
PropertyField(prop, "m_EndAngle");
|
||||
PropertyFieldLimitMax(prop, "m_SplitNumber", 36);
|
||||
PropertyField(prop, "m_RoundCap");
|
||||
PropertyField(prop, "m_TitleStyle");
|
||||
PropertyField(prop, "m_GaugeAxis");
|
||||
PropertyField(prop, "m_GaugePointer");
|
||||
break;
|
||||
case SerieType.Liquid:
|
||||
PropertyField(prop, "m_VesselIndex");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyField(prop, "m_WaveLength");
|
||||
PropertyField(prop, "m_WaveHeight");
|
||||
PropertyField(prop, "m_WaveSpeed");
|
||||
PropertyField(prop, "m_WaveOffset");
|
||||
break;
|
||||
case SerieType.Candlestick:
|
||||
PropertyField(prop, "m_XAxisIndex");
|
||||
PropertyField(prop, "m_YAxisIndex");
|
||||
PropertyFieldLimitMin(prop, "m_MinShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxCache", 0);
|
||||
PropertyField(prop, "m_BarWidth");
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_Large");
|
||||
PropertyField(prop, "m_LargeThreshold");
|
||||
break;
|
||||
case SerieType.Custom:
|
||||
var fileds = chart.GetCustomSerieInspectorShowFileds();
|
||||
if (fileds != null && fileds.Length > 0)
|
||||
{
|
||||
foreach (var filed in fileds)
|
||||
{
|
||||
PropertyField(prop, filed);
|
||||
}
|
||||
}
|
||||
var customs = chart.GetCustomSerieInspectorCustomFileds();
|
||||
if (customs != null && customs.Length > 0)
|
||||
{
|
||||
foreach (var custom in customs)
|
||||
{
|
||||
var customProp = prop.FindPropertyRelative(custom[0]);
|
||||
var anatherName = custom[1] + " (" + customProp.displayName + ")";
|
||||
EditorGUI.PropertyField(m_DrawRect, customProp, new GUIContent(anatherName));
|
||||
m_DrawRect.y += EditorGUI.GetPropertyHeight(prop);
|
||||
m_Heights[m_KeyName] += hig;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_ItemStyle");
|
||||
PropertyField(prop, "m_Label");
|
||||
PropertyField(prop, "m_Emphasis");
|
||||
PropertyField(prop, "m_Animation");
|
||||
DrawData(pos, prop, serieType, ref m_DrawRect);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
private string[] GetChartSerieTypeNames(BaseChart chart)
|
||||
{
|
||||
var list = System.Enum.GetNames(typeof(SerieType));
|
||||
for (int i = 0; i < list.Length; i++)
|
||||
{
|
||||
if (list[i].Equals("Custom"))
|
||||
{
|
||||
var customName = chart.GetCustomSerieTypeName();
|
||||
if (!string.IsNullOrEmpty(customName))
|
||||
{
|
||||
list[i] = customName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void DrawData(Rect pos, SerializedProperty prop, SerieType serieType, ref Rect drawRect)
|
||||
{
|
||||
SerializedProperty m_Datas = prop.FindPropertyRelative("m_Data");
|
||||
SerializedProperty m_DataDimension = prop.FindPropertyRelative("m_ShowDataDimension");
|
||||
SerializedProperty m_ShowDataName = prop.FindPropertyRelative("m_ShowDataName");
|
||||
SerializedProperty m_ShowDataIcon = prop.FindPropertyRelative("m_ShowDataIcon");
|
||||
int index = InitToggle(prop);
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
m_DataFoldout[index] = EditorGUI.Foldout(drawRect, m_DataFoldout[index], "Data", true);
|
||||
drawRect.width = pos.width;
|
||||
|
||||
AddSingleLineHeight();
|
||||
if (m_DataFoldout[index])
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
float nameWid = 45;
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
var gap = 2;
|
||||
var namegap = 3;
|
||||
#else
|
||||
var gap = 0;
|
||||
var namegap = 0;
|
||||
#endif
|
||||
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 + gap, drawRect.y, nameWid - gap, pos.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
nameRect.x += ChartEditorHelper.BLOCK_WIDTH;
|
||||
}
|
||||
if (GUI.Button(nameRect, new GUIContent("name")))
|
||||
{
|
||||
m_ShowDataName.boolValue = !m_ShowDataName.boolValue;
|
||||
}
|
||||
var iconRect = new Rect(pos.width - nameWid + 14, drawRect.y, nameWid + namegap, pos.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
iconRect.x += ChartEditorHelper.BLOCK_WIDTH;
|
||||
}
|
||||
if (GUI.Button(iconRect, new GUIContent("more")))
|
||||
{
|
||||
m_ShowDataIcon.boolValue = !m_ShowDataIcon.boolValue;
|
||||
}
|
||||
var jsonRect = new Rect(pos.width - 70, drawRect.y - pos.height - 2, 90, pos.height);
|
||||
if (GUI.Button(jsonRect, new GUIContent("data from json")))
|
||||
{
|
||||
PraseJsonDataEditor.chart = prop.serializedObject.targetObject as BaseChart;
|
||||
PraseJsonDataEditor.serieIndex = index;
|
||||
PraseJsonDataEditor.ShowWindow();
|
||||
}
|
||||
AddSingleLineHeight();
|
||||
var listSize = m_Datas.arraySize;
|
||||
listSize = EditorGUI.IntField(drawRect, "Size", listSize);
|
||||
AddSingleLineHeight();
|
||||
|
||||
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.arraySize++;
|
||||
while (listSize < m_Datas.arraySize) m_Datas.arraySize--;
|
||||
}
|
||||
if (listSize > 30 && !XChartsSettings.editorShowAllListData)
|
||||
{
|
||||
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, "...");
|
||||
AddSingleLineHeight();
|
||||
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);
|
||||
}
|
||||
}
|
||||
AddHeight(EditorGUIUtility.standardVerticalSpacing);
|
||||
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)
|
||||
{
|
||||
var value = data.arraySize == 0 ? index : 0;
|
||||
data.arraySize++;
|
||||
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = value;
|
||||
}
|
||||
SerializedProperty element = data.GetArrayElementAtIndex(1);
|
||||
if (showSelected)
|
||||
{
|
||||
drawRect.width = drawRect.width - 18;
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + index));
|
||||
drawRect.x = currentWidth - 40;
|
||||
EditorGUI.PropertyField(drawRect, selected, GUIContent.none);
|
||||
drawRect.x = lastX;
|
||||
drawRect.width = lastWid;
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + index));
|
||||
}
|
||||
AddHeight(EditorGUI.GetPropertyHeight(element));
|
||||
}
|
||||
else
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
var gap = 2;
|
||||
var namegap = 3;
|
||||
#else
|
||||
var gap = 0;
|
||||
var namegap = 0;
|
||||
#endif
|
||||
EditorGUI.LabelField(drawRect, "Element " + index);
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15 + gap;
|
||||
var dataWidTotal = (currentWidth - (startX + 20.5f + 1));
|
||||
var dataWid = dataWidTotal / fieldCount;
|
||||
var xWid = dataWid - 2;
|
||||
for (int i = 0; i < dimension; i++)
|
||||
{
|
||||
var dataCount = i < 1 ? 2 : i + 1;
|
||||
while (dataCount > data.arraySize)
|
||||
{
|
||||
var value = data.arraySize == 0 ? index : 0;
|
||||
data.arraySize++;
|
||||
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = value;
|
||||
}
|
||||
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 + dimension * namegap;
|
||||
EditorGUI.PropertyField(drawRect, sereName, GUIContent.none);
|
||||
}
|
||||
AddSingleLineHeight();
|
||||
drawRect.x = lastX;
|
||||
drawRect.width = lastWid;
|
||||
EditorGUIUtility.fieldWidth = lastFieldWid;
|
||||
EditorGUIUtility.labelWidth = lastLabelWid;
|
||||
}
|
||||
if (showDetail)
|
||||
{
|
||||
EditorGUI.indentLevel += 2;
|
||||
var m_Ignore = serieData.FindPropertyRelative("m_Ignore");
|
||||
var m_Icon = serieData.FindPropertyRelative("m_IconStyle");
|
||||
var m_EnableLabel = serieData.FindPropertyRelative("m_EnableLabel");
|
||||
var m_Label = serieData.FindPropertyRelative("m_Label");
|
||||
var m_EnableItemStyle = serieData.FindPropertyRelative("m_EnableItemStyle");
|
||||
var m_ItemStyle = serieData.FindPropertyRelative("m_ItemStyle");
|
||||
var m_EnableEmphasis = serieData.FindPropertyRelative("m_EnableEmphasis");
|
||||
var m_Emphasis = serieData.FindPropertyRelative("m_Emphasis");
|
||||
var m_EnableSymbol = serieData.FindPropertyRelative("m_EnableSymbol");
|
||||
var m_Symbol = serieData.FindPropertyRelative("m_Symbol");
|
||||
EditorGUI.PropertyField(drawRect, m_Ignore);
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Ignore));
|
||||
EditorGUI.PropertyField(drawRect, m_Icon);
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Icon));
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableSymbol, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Symbol));
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableLabel, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Label));
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableItemStyle, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_ItemStyle));
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableEmphasis, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Emphasis));
|
||||
EditorGUI.indentLevel -= 2;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
while (index >= m_DataFoldout.Count)
|
||||
{
|
||||
m_DataFoldout.Add(false);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c30d9496b99e39944a6987e390bed91f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieLabel), true)]
|
||||
public class SerieLabelDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Label"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Position");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_AutoOffset");
|
||||
PropertyField(prop, "m_Margin");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_BackgroundWidth");
|
||||
PropertyField(prop, "m_BackgroundHeight");
|
||||
PropertyField(prop, "m_PaddingLeftRight");
|
||||
PropertyField(prop, "m_PaddingTopBottom");
|
||||
PropertyField(prop, "m_Border");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_Line");
|
||||
PropertyField(prop, "m_LineType");
|
||||
PropertyField(prop, "m_LineColor");
|
||||
PropertyField(prop, "m_LineWidth");
|
||||
PropertyField(prop, "m_LineGap");
|
||||
PropertyField(prop, "m_LineLength1");
|
||||
PropertyField(prop, "m_LineLength2");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d30d82b48b553451fad726478777a02e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieSymbol), true)]
|
||||
public class SerieSymbolDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Symbol"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_Gap");
|
||||
PropertyField(prop, "m_SizeType");
|
||||
switch ((SerieSymbolSizeType)prop.FindPropertyRelative("m_SizeType").enumValueIndex)
|
||||
{
|
||||
case SerieSymbolSizeType.Custom:
|
||||
PropertyField(prop, "m_Size");
|
||||
PropertyField(prop, "m_SelectedSize");
|
||||
break;
|
||||
case SerieSymbolSizeType.FromData:
|
||||
PropertyField(prop, "m_DataIndex");
|
||||
PropertyField(prop, "m_DataScale");
|
||||
PropertyField(prop, "m_SelectedDataScale");
|
||||
break;
|
||||
case SerieSymbolSizeType.Callback:
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_StartIndex");
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_ForceShowLast");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Series), true)]
|
||||
public class SeriesDrawer : PropertyDrawer
|
||||
{
|
||||
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");
|
||||
m_SeriesModuleToggle = ChartEditorHelper.MakeListWithFoldout(ref drawRect,
|
||||
m_Series, m_SeriesModuleToggle, true, true);
|
||||
}
|
||||
|
||||
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)) + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c2458b1901047547b1a59d097786816
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,172 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if dUI_TextMeshPro
|
||||
using TMPro;
|
||||
#endif
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ChartTheme), true)]
|
||||
public class ThemeDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Theme"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
var defaultWidth = pos.width;
|
||||
var defaultX = pos.x;
|
||||
var btnWidth = 50;
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
var btnRect = new Rect(m_DrawRect);
|
||||
btnRect.x = defaultX + defaultWidth - 2 * btnWidth - 2;
|
||||
btnRect.y = m_DrawRect.y - EditorGUIUtility.singleLineHeight - 3;
|
||||
btnRect.width = btnWidth;
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
if (GUI.Button(btnRect, new GUIContent("Reset", "Reset to theme default color")))
|
||||
{
|
||||
chart.theme.ResetTheme();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
btnRect.x = defaultX + defaultWidth - btnWidth;
|
||||
btnRect.width = btnWidth;
|
||||
if (GUI.Button(btnRect, new GUIContent("Export", "Export theme to asset for a new theme")))
|
||||
{
|
||||
ExportThemeWindow.target = chart;
|
||||
EditorWindow.GetWindow(typeof(ExportThemeWindow));
|
||||
}
|
||||
++EditorGUI.indentLevel;
|
||||
var chartNameList = XThemeMgr.GetAllThemeNames();
|
||||
var lastIndex = chartNameList.IndexOf(chart.theme.themeName);
|
||||
var y = pos.y + EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
var selectedIndex = EditorGUI.Popup(new Rect(pos.x, y, pos.width, EditorGUIUtility.singleLineHeight),
|
||||
"Theme", lastIndex, chartNameList.ToArray());
|
||||
AddSingleLineHeight();
|
||||
if (lastIndex != selectedIndex)
|
||||
{
|
||||
XThemeMgr.SwitchTheme(chart, chartNameList[selectedIndex]);
|
||||
}
|
||||
#if dUI_TextMeshPro
|
||||
PropertyField(prop, "m_TMPFont");
|
||||
if(chart.theme.tmpFont == null && !string.IsNullOrEmpty(chart.theme.tmpFontName))
|
||||
{
|
||||
var msg = string.Format("Can't find theme font asset:{0} in project.", chart.theme.tmpFontName);
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Error);
|
||||
}
|
||||
#else
|
||||
PropertyField(prop, "m_Font");
|
||||
if (chart.theme.font == null && !string.IsNullOrEmpty(chart.theme.fontName))
|
||||
{
|
||||
var msg = string.Format("Can't find theme font asset:{0} in project.", chart.theme.fontName);
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Error);
|
||||
}
|
||||
#endif
|
||||
PropertyField(prop, "m_ContrastColor");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_ColorPalette");
|
||||
PropertyField(prop, "m_Common");
|
||||
PropertyField(prop, "m_Title");
|
||||
PropertyField(prop, "m_SubTitle");
|
||||
PropertyField(prop, "m_Legend");
|
||||
PropertyField(prop, "m_Axis");
|
||||
PropertyField(prop, "m_RadiusAxis");
|
||||
PropertyField(prop, "m_AngleAxis");
|
||||
PropertyField(prop, "m_Polar");
|
||||
PropertyField(prop, "m_Gauge");
|
||||
PropertyField(prop, "m_Radar");
|
||||
PropertyField(prop, "m_Tooltip");
|
||||
PropertyField(prop, "m_DataZoom");
|
||||
PropertyField(prop, "m_VisualMap");
|
||||
PropertyField(prop, "m_Serie");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddPropertyField(Rect pos, SerializedProperty prop, ref float y)
|
||||
{
|
||||
float height = EditorGUI.GetPropertyHeight(prop, new GUIContent(prop.displayName), true);
|
||||
EditorGUI.PropertyField(new Rect(pos.x, y, pos.width, height), prop, true);
|
||||
y += height + EditorGUIUtility.standardVerticalSpacing;
|
||||
m_Heights[m_KeyName] += height + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
|
||||
public class ExportThemeWindow : EditorWindow
|
||||
{
|
||||
public static BaseChart target;
|
||||
private static ExportThemeWindow window;
|
||||
private string m_ChartName;
|
||||
static void Init()
|
||||
{
|
||||
window = (ExportThemeWindow)EditorWindow.GetWindow(typeof(ExportThemeWindow), false, "Export Theme", true);
|
||||
window.minSize = new Vector2(600, 50);
|
||||
window.maxSize = new Vector2(600, 50);
|
||||
window.Show();
|
||||
}
|
||||
|
||||
void OnInspectorUpdate()
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
GUILayout.Space(10);
|
||||
GUILayout.Label("Input a new name for theme:");
|
||||
m_ChartName = GUILayout.TextField(m_ChartName);
|
||||
|
||||
GUILayout.Space(10);
|
||||
GUILayout.Label("Export path:");
|
||||
if (string.IsNullOrEmpty(m_ChartName))
|
||||
{
|
||||
GUILayout.Label("Need input a new name.");
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Label(XThemeMgr.GetThemeAssetPath(m_ChartName));
|
||||
}
|
||||
|
||||
GUILayout.Space(20);
|
||||
if (GUILayout.Button("Export"))
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_ChartName))
|
||||
{
|
||||
ShowNotification(new GUIContent("ERROR:Need input a new name!"));
|
||||
}
|
||||
else if (XThemeMgr.ContainsTheme(m_ChartName))
|
||||
{
|
||||
ShowNotification(new GUIContent("ERROR:The name you entered is already in use!"));
|
||||
}
|
||||
else if (IsAssetsExist(XThemeMgr.GetThemeAssetPath(m_ChartName)))
|
||||
{
|
||||
ShowNotification(new GUIContent("ERROR:The asset is exist! \npath="
|
||||
+ XThemeMgr.GetThemeAssetPath(m_ChartName)));
|
||||
}
|
||||
else
|
||||
{
|
||||
XThemeMgr.ExportTheme(target.theme, m_ChartName);
|
||||
ShowNotification(new GUIContent("SUCCESS:The theme is exported. \npath="
|
||||
+ XThemeMgr.GetThemeAssetPath(m_ChartName)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsAssetsExist(string path)
|
||||
{
|
||||
return File.Exists(Application.dataPath + "/../" + path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Title), true)]
|
||||
public class TitleDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Title"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Text");
|
||||
PropertyField(prop, "m_SubText");
|
||||
PropertyField(prop, "m_ItemGap");
|
||||
PropertyField(prop, "m_Location");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
PropertyField(prop, "m_SubTextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22ae7ec778f27c1409cb9151ce7b9aba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,29 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(TitleStyle), true)]
|
||||
public class TitleStyleDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "TitleStyle"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Tooltip), true)]
|
||||
public class TooltipDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Tooltip"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_TitleFormatter");
|
||||
PropertyField(prop, "m_ItemFormatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_FixedWidth");
|
||||
PropertyField(prop, "m_FixedHeight");
|
||||
PropertyField(prop, "m_MinWidth");
|
||||
PropertyField(prop, "m_MinHeight");
|
||||
PropertyField(prop, "m_PaddingLeftRight");
|
||||
PropertyField(prop, "m_PaddingTopBottom");
|
||||
PropertyField(prop, "m_BackgroundImage");
|
||||
PropertyField(prop, "m_IgnoreDataDefaultContent");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5600b7009bc024a49800448cece012e2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,47 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Vessel), true)]
|
||||
public class VesselDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Vessel"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
var shape = (Vessel.Shape)prop.FindPropertyRelative("m_Shape").intValue;
|
||||
PropertyField(prop, "m_Shape");
|
||||
PropertyField(prop, "m_ShapeWidth");
|
||||
PropertyField(prop, "m_Gap");
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
switch (shape)
|
||||
{
|
||||
case Vessel.Shape.Circle:
|
||||
PropertyField(prop, "m_Radius");
|
||||
PropertyField(prop, "m_Smoothness");
|
||||
break;
|
||||
case Vessel.Shape.Rect:
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
PropertyField(prop, "m_CornerRadius");
|
||||
break;
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 744a68155f2f349dc8fe26536ec83f80
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,72 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(VisualMap), true)]
|
||||
public class VisualMapDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "VisualMap"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Enable"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
var type = (VisualMap.Type)prop.FindPropertyRelative("m_Type").enumValueIndex;
|
||||
var isPiece = type == VisualMap.Type.Piecewise;
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_AutoMinMax");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
PropertyField(prop, "m_Dimension");
|
||||
PropertyListField(prop, "m_OutOfRange");
|
||||
PropertyListField(prop, isPiece ? "m_Pieces" : "m_InRange");
|
||||
PropertyField(prop, "m_Show");
|
||||
if (prop.FindPropertyRelative("m_Show").boolValue)
|
||||
{
|
||||
PropertyField(prop, "m_SelectedMode");
|
||||
PropertyTwoFiled(prop, "m_Range");
|
||||
PropertyTwoFiled(prop, "m_Text");
|
||||
PropertyTwoFiled(prop, "m_TextGap");
|
||||
PropertyField(prop, "m_HoverLink");
|
||||
PropertyField(prop, "m_Calculable");
|
||||
PropertyField(prop, "m_ItemWidth");
|
||||
PropertyField(prop, "m_ItemHeight");
|
||||
if (isPiece) PropertyField(prop, "m_ItemGap");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_Orient");
|
||||
PropertyField(prop, "m_Location");
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(VisualMap.Pieces), true)]
|
||||
public class PiecesDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Pieces"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyField(prop, "m_Label");
|
||||
PropertyField(prop, "m_Color");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fe31d791669a4014ac78fd7a2af9a6c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,20 +0,0 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI RadarChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(RadarChart), false)]
|
||||
public class RadarChartEditor : BaseChartEditor
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ea6609b1e1634241947b4ef14c38849
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI RingChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(RingChart), false)]
|
||||
public class RingChartEditor : BaseChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (RingChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f61a72b23edc44f48884d4989b04c509
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI ScatterChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(ScatterChart), false)]
|
||||
public class ScatterChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (ScatterChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3995bd8e5f80b49008624a5746622f68
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,497 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
public class ChartEditorHelper
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
public const float INDENT_WIDTH = 15;
|
||||
public const float BOOL_WIDTH = 15;
|
||||
public const float ARROW_WIDTH = 20;
|
||||
public const float BLOCK_WIDTH = 4;
|
||||
public const float GAP_WIDTH = 2;
|
||||
#else
|
||||
public const float INDENT_WIDTH = 15;
|
||||
public const float BOOL_WIDTH = 15;
|
||||
public const float ARROW_WIDTH = 17.2f;
|
||||
public const float BLOCK_WIDTH = 0;
|
||||
public const float GAP_WIDTH = 0;
|
||||
#endif
|
||||
|
||||
public class Styles
|
||||
{
|
||||
public static readonly GUIStyle headerStyle = EditorStyles.boldLabel;
|
||||
public static readonly GUIStyle foldoutStyle = new GUIStyle(EditorStyles.foldout)
|
||||
{
|
||||
font = headerStyle.font,
|
||||
fontStyle = headerStyle.fontStyle,
|
||||
};
|
||||
public static readonly GUIContent iconAdd = new GUIContent("+", "Add");
|
||||
public static readonly GUIContent iconRemove = new GUIContent("-", "Remove");
|
||||
public static readonly GUIContent iconUp = new GUIContent("↑", "Up");
|
||||
public static readonly GUIContent iconDown = new GUIContent("↓", "Down");
|
||||
public static readonly GUIStyle invisibleButton = "InvisibleButton";
|
||||
}
|
||||
|
||||
public static void SecondField(Rect drawRect, SerializedProperty prop)
|
||||
{
|
||||
RectOffset offset = new RectOffset(-(int)EditorGUIUtility.labelWidth, 0, 0, 0);
|
||||
drawRect = offset.Add(drawRect);
|
||||
EditorGUI.PropertyField(drawRect, prop, GUIContent.none);
|
||||
drawRect = offset.Remove(drawRect);
|
||||
}
|
||||
|
||||
public static void MakeTwoField(ref Rect drawRect, float rectWidth, SerializedProperty arrayProp,
|
||||
string name)
|
||||
{
|
||||
while (arrayProp.arraySize < 2) arrayProp.arraySize++;
|
||||
var prop1 = arrayProp.GetArrayElementAtIndex(0);
|
||||
var prop2 = arrayProp.GetArrayElementAtIndex(1);
|
||||
MakeTwoField(ref drawRect, rectWidth, prop1, prop2, name);
|
||||
}
|
||||
|
||||
public static void MakeDivideList(ref Rect drawRect, float rectWidth, SerializedProperty arrayProp,
|
||||
string name, int showNum)
|
||||
{
|
||||
while (arrayProp.arraySize < showNum) arrayProp.arraySize++;
|
||||
EditorGUI.LabelField(drawRect, name);
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
var gap = 2;
|
||||
#else
|
||||
var gap = 0;
|
||||
#endif
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH + gap;
|
||||
var dataWidTotal = (rectWidth - (startX + INDENT_WIDTH + 1));
|
||||
EditorGUI.DrawRect(new Rect(startX, drawRect.y, dataWidTotal, drawRect.height), Color.grey);
|
||||
var dataWid = dataWidTotal / showNum;
|
||||
var xWid = dataWid - gap;
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
drawRect.x = startX + i * xWid;
|
||||
drawRect.width = dataWid + (EditorGUI.indentLevel - 2) * 40.5f;
|
||||
EditorGUI.PropertyField(drawRect, arrayProp.GetArrayElementAtIndex(i), GUIContent.none);
|
||||
}
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
|
||||
public static void MakeTwoField(ref Rect drawRect, float rectWidth, SerializedProperty prop1,
|
||||
SerializedProperty prop2, string name)
|
||||
{
|
||||
EditorGUI.LabelField(drawRect, name);
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH + GAP_WIDTH;
|
||||
var diff = 14 + EditorGUI.indentLevel * 14;
|
||||
var offset = diff - INDENT_WIDTH;
|
||||
var tempWidth = (rectWidth - startX + diff) / 2;
|
||||
var centerXRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
var centerYRect = new Rect(centerXRect.x + tempWidth - offset, drawRect.y, tempWidth, drawRect.height);
|
||||
EditorGUI.PropertyField(centerXRect, prop1, GUIContent.none);
|
||||
EditorGUI.PropertyField(centerYRect, prop2, GUIContent.none);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
|
||||
public static void MakeVector2(ref Rect drawRect, float rectWidth, SerializedProperty prop, string name)
|
||||
{
|
||||
EditorGUI.LabelField(drawRect, name);
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH + GAP_WIDTH;
|
||||
var diff = 14 + EditorGUI.indentLevel * 14;
|
||||
var offset = diff - INDENT_WIDTH;
|
||||
var tempWidth = (rectWidth - startX + diff) / 2;
|
||||
var centerXRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
var centerYRect = new Rect(centerXRect.x + tempWidth - offset, drawRect.y, tempWidth, drawRect.height);
|
||||
var x = EditorGUI.FloatField(centerXRect, prop.vector3Value.x);
|
||||
var y = EditorGUI.FloatField(centerYRect, prop.vector3Value.y);
|
||||
prop.vector3Value = new Vector3(x, y);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
|
||||
public static void MakeJsonData(ref Rect drawRect, ref bool showTextArea, ref string inputString,
|
||||
SerializedProperty prop, float currentWidth, float diff = 0)
|
||||
{
|
||||
SerializedProperty stringDataProp = prop.FindPropertyRelative("m_JsonData");
|
||||
SerializedProperty needParseProp = prop.FindPropertyRelative("m_DataFromJson");
|
||||
float defalutX = drawRect.x;
|
||||
drawRect.x = EditorGUIUtility.labelWidth + ARROW_WIDTH + diff;
|
||||
drawRect.width = currentWidth - EditorGUIUtility.labelWidth - GAP_WIDTH - diff;
|
||||
if (GUI.Button(drawRect, new GUIContent("Parse JsonData", "Parse data from input json")))
|
||||
{
|
||||
showTextArea = !showTextArea;
|
||||
bool needParse = !showTextArea;
|
||||
if (needParse)
|
||||
{
|
||||
stringDataProp.stringValue = inputString;
|
||||
needParseProp.boolValue = true;
|
||||
}
|
||||
}
|
||||
drawRect.x = defalutX;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (showTextArea)
|
||||
{
|
||||
drawRect.width = currentWidth;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight * 4;
|
||||
inputString = EditorGUI.TextArea(drawRect, inputString);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight * 4 + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool MakeFoldout(ref Rect drawRect, ref bool moduleToggle, string content,
|
||||
SerializedProperty prop = null, bool bold = false)
|
||||
{
|
||||
float defaultWidth = drawRect.width;
|
||||
float defaultX = drawRect.x;
|
||||
var style = bold ? Styles.foldoutStyle : EditorStyles.foldout;
|
||||
drawRect.width = EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH;
|
||||
moduleToggle = EditorGUI.Foldout(drawRect, moduleToggle, content, true, style);
|
||||
MakeBool(drawRect, prop);
|
||||
drawRect.width = defaultWidth;
|
||||
drawRect.x = defaultX;
|
||||
return moduleToggle;
|
||||
}
|
||||
|
||||
public static bool MakeFoldout(ref Rect drawRect, Dictionary<string, float> heights,
|
||||
Dictionary<string, bool> moduleToggle, string key, string content, SerializedProperty prop, bool bold = false)
|
||||
{
|
||||
float defaultWidth = drawRect.width;
|
||||
float defaultX = drawRect.x;
|
||||
var style = bold ? Styles.foldoutStyle : EditorStyles.foldout;
|
||||
drawRect.width = EditorGUIUtility.labelWidth;
|
||||
moduleToggle[key] = EditorGUI.Foldout(drawRect, moduleToggle[key], content, true, style);
|
||||
if (prop != null)
|
||||
{
|
||||
if (prop.propertyType == SerializedPropertyType.Boolean)
|
||||
{
|
||||
MakeBool(drawRect, prop);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawRect.x = EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH + ARROW_WIDTH;
|
||||
drawRect.width = defaultWidth - drawRect.x + ARROW_WIDTH - 2;
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
drawRect.x += BLOCK_WIDTH;
|
||||
}
|
||||
|
||||
EditorGUI.PropertyField(drawRect, prop, GUIContent.none);
|
||||
}
|
||||
}
|
||||
|
||||
drawRect.width = defaultWidth;
|
||||
drawRect.x = defaultX;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
heights[key] += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
return moduleToggle[key];
|
||||
}
|
||||
|
||||
public static void MakeBool(Rect drawRect, SerializedProperty boolProp, int index = 0, string name = null)
|
||||
{
|
||||
float defaultWidth = drawRect.width;
|
||||
float defaultX = drawRect.x;
|
||||
float boolWidth = index * (BOOL_WIDTH + GAP_WIDTH);
|
||||
drawRect.x = EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH + ARROW_WIDTH + boolWidth;
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
drawRect.x += BLOCK_WIDTH;
|
||||
}
|
||||
drawRect.width = (EditorGUI.indentLevel + 1) * BOOL_WIDTH + index * 110;
|
||||
if (boolProp != null)
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, boolProp, GUIContent.none);
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
drawRect.x += BOOL_WIDTH;
|
||||
drawRect.width = 200;
|
||||
EditorGUI.LabelField(drawRect, name);
|
||||
}
|
||||
}
|
||||
drawRect.width = defaultWidth;
|
||||
drawRect.x = defaultX;
|
||||
}
|
||||
|
||||
public static bool MakeFoldout(ref Rect drawRect, ref float height, ref Dictionary<string, bool> moduleToggle,
|
||||
SerializedProperty prop, string moduleName, string showPropName, bool bold = false)
|
||||
{
|
||||
var relativeProp = prop.FindPropertyRelative(showPropName);
|
||||
var flag = MakeFoldout(ref drawRect, ref moduleToggle, prop, moduleName, relativeProp, bold);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
return flag;
|
||||
}
|
||||
|
||||
public static bool MakeFoldout(ref Rect drawRect, ref Dictionary<string, bool> moduleToggle, SerializedProperty prop,
|
||||
string moduleName, SerializedProperty showProp = null, bool bold = false)
|
||||
{
|
||||
var key = prop.propertyPath;
|
||||
if (!moduleToggle.ContainsKey(key))
|
||||
{
|
||||
moduleToggle.Add(key, false);
|
||||
}
|
||||
var toggle = moduleToggle[key];
|
||||
|
||||
float defaultWidth = drawRect.width;
|
||||
float defaultX = drawRect.x;
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
drawRect.width = EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH;
|
||||
#else
|
||||
drawRect.width = EditorGUIUtility.labelWidth;
|
||||
#endif
|
||||
var displayName = string.IsNullOrEmpty(moduleName) ? prop.displayName : moduleName;
|
||||
var foldoutStyle = bold ? Styles.foldoutStyle : EditorStyles.foldout;
|
||||
toggle = EditorGUI.Foldout(drawRect, toggle, displayName, true, foldoutStyle);
|
||||
|
||||
if (moduleToggle[key] != toggle)
|
||||
{
|
||||
moduleToggle[key] = toggle;
|
||||
}
|
||||
if (showProp != null)
|
||||
{
|
||||
drawRect.x = EditorGUIUtility.labelWidth - EditorGUI.indentLevel * INDENT_WIDTH + ARROW_WIDTH;
|
||||
if (showProp.propertyType == SerializedPropertyType.Boolean)
|
||||
{
|
||||
drawRect.width = (EditorGUI.indentLevel + 1) * BOOL_WIDTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
drawRect.width = defaultWidth - drawRect.x + ARROW_WIDTH - GAP_WIDTH;
|
||||
}
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
drawRect.x += BLOCK_WIDTH;
|
||||
}
|
||||
EditorGUI.PropertyField(drawRect, showProp, GUIContent.none);
|
||||
}
|
||||
drawRect.width = defaultWidth;
|
||||
drawRect.x = defaultX;
|
||||
return toggle;
|
||||
}
|
||||
|
||||
public static bool MakeListWithFoldout(ref Rect drawRect, SerializedProperty listProp, bool foldout,
|
||||
bool showOrder = false, bool showSize = true)
|
||||
{
|
||||
var height = 0f;
|
||||
return MakeListWithFoldout(ref drawRect, ref height, listProp, foldout, showOrder, showSize);
|
||||
}
|
||||
|
||||
public static bool MakeListWithFoldout(ref Rect drawRect, ref float height, SerializedProperty listProp,
|
||||
bool foldout, bool showOrder = false, bool showSize = true)
|
||||
{
|
||||
var rawWidth = drawRect.width;
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
bool flag = EditorGUI.Foldout(drawRect, foldout, listProp.displayName, true);
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.width = rawWidth;
|
||||
if (flag)
|
||||
{
|
||||
MakeList(ref drawRect, ref height, listProp, showOrder, showSize);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
public static void MakeList(ref Rect drawRect, SerializedProperty listProp, bool showOrder = false,
|
||||
bool showSize = true)
|
||||
{
|
||||
var height = 0f;
|
||||
MakeList(ref drawRect, ref height, listProp, showOrder, showSize);
|
||||
}
|
||||
|
||||
public static void MakeList(ref Rect drawRect, ref float height, SerializedProperty listProp,
|
||||
bool showOrder = false, bool showSize = true)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
var listSize = listProp.arraySize;
|
||||
var iconWidth = 14;
|
||||
var iconGap = 3f;
|
||||
if (showSize)
|
||||
{
|
||||
if (showOrder)
|
||||
{
|
||||
var temp = INDENT_WIDTH + GAP_WIDTH + iconGap;
|
||||
var elementRect = new Rect(drawRect.x, drawRect.y, drawRect.width - iconWidth + 2, drawRect.height);
|
||||
var iconRect = new Rect(drawRect.width - iconWidth + temp, drawRect.y, iconWidth, drawRect.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
iconRect.x += BLOCK_WIDTH;
|
||||
}
|
||||
var oldColor = GUI.contentColor;
|
||||
GUI.contentColor = Color.black;
|
||||
if (GUI.Button(iconRect, Styles.iconAdd, Styles.invisibleButton))
|
||||
{
|
||||
if (listProp.displayName.Equals("Series"))
|
||||
{
|
||||
AddSerieEditor.chart = listProp.serializedObject.targetObject as BaseChart;
|
||||
AddSerieEditor.ShowWindow();
|
||||
}
|
||||
else
|
||||
{
|
||||
listProp.arraySize++;
|
||||
}
|
||||
}
|
||||
GUI.contentColor = oldColor;
|
||||
listSize = listProp.arraySize;
|
||||
listSize = EditorGUI.IntField(elementRect, "Size", listSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
listSize = EditorGUI.IntField(drawRect, "Size", listSize);
|
||||
}
|
||||
if (listSize < 0) listSize = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
if (listSize != listProp.arraySize)
|
||||
{
|
||||
while (listSize > listProp.arraySize) listProp.arraySize++;
|
||||
while (listSize < listProp.arraySize) listProp.arraySize--;
|
||||
}
|
||||
}
|
||||
if (listSize > 30 && !XChartsSettings.editorShowAllListData)
|
||||
{
|
||||
SerializedProperty element;
|
||||
int num = listSize > 10 ? 10 : listSize;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
element = listProp.GetArrayElementAtIndex(i);
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + i));
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
if (num >= 10)
|
||||
{
|
||||
EditorGUI.LabelField(drawRect, "...");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
element = listProp.GetArrayElementAtIndex(listSize - 1);
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + (listSize - 1)));
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < listProp.arraySize; i++)
|
||||
{
|
||||
SerializedProperty element = listProp.GetArrayElementAtIndex(i);
|
||||
if (showOrder)
|
||||
{
|
||||
var temp = INDENT_WIDTH + GAP_WIDTH + iconGap;
|
||||
var isSerie = "Serie".Equals(element.type);
|
||||
var elementRect = isSerie
|
||||
? new Rect(drawRect.x, drawRect.y, drawRect.width + INDENT_WIDTH - 2 * iconGap, drawRect.height)
|
||||
: new Rect(drawRect.x, drawRect.y, drawRect.width - 3 * iconWidth, drawRect.height);
|
||||
EditorGUI.PropertyField(elementRect, element, new GUIContent("Element " + i));
|
||||
var iconRect = new Rect(drawRect.width - 3 * iconWidth + temp, drawRect.y, iconWidth, drawRect.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
iconRect.x += BLOCK_WIDTH;
|
||||
}
|
||||
var oldColor = GUI.contentColor;
|
||||
GUI.contentColor = Color.black;
|
||||
if (GUI.Button(iconRect, Styles.iconUp, Styles.invisibleButton))
|
||||
{
|
||||
if (i > 0) listProp.MoveArrayElement(i, i - 1);
|
||||
}
|
||||
iconRect = new Rect(drawRect.width - 2 * iconWidth + temp, drawRect.y, iconWidth, drawRect.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
iconRect.x += BLOCK_WIDTH;
|
||||
}
|
||||
if (GUI.Button(iconRect, Styles.iconDown, Styles.invisibleButton))
|
||||
{
|
||||
if (i < listProp.arraySize - 1) listProp.MoveArrayElement(i, i + 1);
|
||||
}
|
||||
iconRect = new Rect(drawRect.width - iconWidth + temp, drawRect.y, iconWidth, drawRect.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
iconRect.x += BLOCK_WIDTH;
|
||||
}
|
||||
if (GUI.Button(iconRect, Styles.iconRemove, Styles.invisibleButton))
|
||||
{
|
||||
if (i < listProp.arraySize && i >= 0) listProp.DeleteArrayElementAtIndex(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
GUI.contentColor = oldColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + i));
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(element) + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
public static bool PropertyField(ref Rect drawRect, Dictionary<string, float> heights, string key,
|
||||
SerializedProperty prop)
|
||||
{
|
||||
if (prop == null) return false;
|
||||
EditorGUI.PropertyField(drawRect, prop, true);
|
||||
var hig = EditorGUI.GetPropertyHeight(prop);
|
||||
drawRect.y += hig;
|
||||
heights[key] += hig;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool PropertyFieldWithMinValue(ref Rect drawRect, Dictionary<string, float> heights, string key,
|
||||
SerializedProperty prop, float minValue)
|
||||
{
|
||||
if (prop == null) return false;
|
||||
EditorGUI.PropertyField(drawRect, prop, true);
|
||||
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue < minValue)
|
||||
prop.floatValue = minValue;
|
||||
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue < minValue)
|
||||
prop.intValue = (int)minValue;
|
||||
var hig = EditorGUI.GetPropertyHeight(prop);
|
||||
drawRect.y += hig;
|
||||
heights[key] += hig;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool PropertyFieldWithMaxValue(ref Rect drawRect, Dictionary<string, float> heights, string key,
|
||||
SerializedProperty prop, float maxValue)
|
||||
{
|
||||
if (prop == null) return false;
|
||||
EditorGUI.PropertyField(drawRect, prop, true);
|
||||
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue > maxValue)
|
||||
prop.floatValue = maxValue;
|
||||
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue > maxValue)
|
||||
prop.intValue = (int)maxValue;
|
||||
var hig = EditorGUI.GetPropertyHeight(prop);
|
||||
drawRect.y += hig;
|
||||
heights[key] += hig;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool PropertyField(ref Rect drawRect, Dictionary<string, float> heights, string key,
|
||||
SerializedProperty parentProp, string relativeName)
|
||||
{
|
||||
return PropertyField(ref drawRect, heights, key, parentProp.FindPropertyRelative(relativeName));
|
||||
}
|
||||
public static bool PropertyFieldWithMinValue(ref Rect drawRect, Dictionary<string, float> heights, string key,
|
||||
SerializedProperty parentProp, string relativeName, float minValue)
|
||||
{
|
||||
var relativeProp = parentProp.FindPropertyRelative(relativeName);
|
||||
return PropertyFieldWithMinValue(ref drawRect, heights, key, relativeProp, minValue);
|
||||
}
|
||||
public static bool PropertyFieldWithMaxValue(ref Rect drawRect, Dictionary<string, float> heights, string key,
|
||||
SerializedProperty parentProp, string relativeName, float maxValue)
|
||||
{
|
||||
var relativeProp = parentProp.FindPropertyRelative(relativeName);
|
||||
return PropertyFieldWithMaxValue(ref drawRect, heights, key, relativeProp, maxValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b4ba2a9503ae46b1b7b1ae94ec59127
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,27 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[System.Obsolete]
|
||||
public class XChartsBuild : IPreprocessBuild, IPostprocessBuild
|
||||
{
|
||||
public int callbackOrder => 1;
|
||||
|
||||
public void OnPostprocessBuild(BuildTarget target, string path)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnPreprocessBuild(BuildTarget target, string path)
|
||||
{
|
||||
XThemeMgr.ExportAllCustomTheme();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df212e63c528e40fa9e8fffcd868ab7d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,57 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
public class AddSerieEditor : EditorWindow
|
||||
{
|
||||
public static BaseChart chart;
|
||||
private static AddSerieEditor window;
|
||||
private static string serieName;
|
||||
|
||||
private SerieType serieType;
|
||||
|
||||
public static void ShowWindow()
|
||||
{
|
||||
serieName = "serie" + (chart.series.Count + 1);
|
||||
window = GetWindow<AddSerieEditor>();
|
||||
window.titleContent = new GUIContent("Add Serie");
|
||||
window.minSize = new Vector2(350, window.minSize.y);
|
||||
window.Focus();
|
||||
window.Show();
|
||||
}
|
||||
|
||||
void OnInspectorUpdate()
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (chart == null)
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
var iconRect = new Rect(5, 10, position.width - 10, EditorGUIUtility.singleLineHeight);
|
||||
serieType = (SerieType)EditorGUI.EnumPopup(iconRect, "Serie Type", serieType);
|
||||
iconRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
serieName = EditorGUI.TextField(iconRect, "Serie Name", serieName);
|
||||
iconRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
GUILayout.Space(iconRect.y + 5);
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
SerieTemplate.AddDefaultSerie(chart, serieType, serieName);
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 450c3b4decd234f1894f1a8fd1161af8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,108 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
public class CheckVersionEditor : EditorWindow
|
||||
{
|
||||
private Vector2 scrollPos;
|
||||
private static CheckVersionEditor window;
|
||||
|
||||
[MenuItem("XCharts/Upgrade Check")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
window = GetWindow<CheckVersionEditor>();
|
||||
window.titleContent = new GUIContent("XCharts Upgrade Check");
|
||||
window.minSize = new Vector2(550, window.minSize.y);
|
||||
window.Show();
|
||||
XChartsMgr.Instance.CheckVersion();
|
||||
}
|
||||
|
||||
void OnInspectorUpdate()
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
var mgr = XChartsMgr.Instance;
|
||||
GUILayout.Label("");
|
||||
GUILayout.Label("The current version: " + mgr.nowVersion);
|
||||
if (mgr.needUpdate && !mgr.isCheck)
|
||||
{
|
||||
GUILayout.Label("The remote version: " + mgr.newVersion);
|
||||
GUILayout.Label("");
|
||||
if (mgr.isCheck) GUILayout.Label("check ...");
|
||||
else if (mgr.isNetworkError) GUILayout.Label("check failed: " + mgr.networkError);
|
||||
else
|
||||
{
|
||||
GUILayout.Label("There is a new version to upgrade!");
|
||||
}
|
||||
|
||||
GUILayout.Label("");
|
||||
if (!string.IsNullOrEmpty(mgr.desc))
|
||||
{
|
||||
GUILayout.Label(mgr.desc);
|
||||
}
|
||||
if (GUILayout.Button("Github Homepage"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
|
||||
}
|
||||
if (GUILayout.Button("Star Support"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/stargazers");
|
||||
}
|
||||
if (GUILayout.Button("Issues"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/issues");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(mgr.changeLog))
|
||||
{
|
||||
scrollPos = GUILayout.BeginScrollView(scrollPos);
|
||||
GUILayout.TextArea(mgr.changeLog);
|
||||
GUILayout.EndScrollView();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mgr.isCheck) GUILayout.Label("The remote version: checking ...");
|
||||
else if (mgr.isNetworkError) GUILayout.Label("check failed: " + mgr.networkError);
|
||||
else GUILayout.Label("The remote version: " + mgr.newVersion);
|
||||
|
||||
GUILayout.Label("");
|
||||
if (!mgr.isNetworkError && !mgr.needUpdate && !mgr.isCheck)
|
||||
{
|
||||
GUILayout.Label("It is the latest version!");
|
||||
}
|
||||
GUILayout.Label("");
|
||||
if (!string.IsNullOrEmpty(mgr.desc))
|
||||
{
|
||||
GUILayout.Label(mgr.desc);
|
||||
}
|
||||
if (GUILayout.Button("Github Homepage"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
|
||||
}
|
||||
if (GUILayout.Button("Star Support"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/stargazers");
|
||||
}
|
||||
if (GUILayout.Button("Issues"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/issues");
|
||||
}
|
||||
if (mgr.isNetworkError && GUILayout.Button("Check Again"))
|
||||
{
|
||||
XChartsMgr.Instance.CheckVersion();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2a04cd68c07645d9bb4234680c5200a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,54 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
public class PraseJsonDataEditor : EditorWindow
|
||||
{
|
||||
public static BaseChart chart;
|
||||
public static int serieIndex;
|
||||
private static PraseJsonDataEditor window;
|
||||
private string inputJsonText = "";
|
||||
|
||||
public static void ShowWindow()
|
||||
{
|
||||
window = GetWindow<PraseJsonDataEditor>();
|
||||
window.titleContent = new GUIContent("PraseJsonData");
|
||||
window.minSize = new Vector2(450, 550);
|
||||
window.Focus();
|
||||
window.Show();
|
||||
}
|
||||
|
||||
void OnInspectorUpdate()
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (chart == null)
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
EditorGUILayout.LabelField("Input json data, or echarts serie data:");
|
||||
inputJsonText = EditorGUILayout.TextArea(inputJsonText, GUILayout.Height(400));
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
var serie = chart.series.GetSerie(serieIndex);
|
||||
if (serie != null)
|
||||
{
|
||||
serie.ParseJsonData(inputJsonText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dca7fd076eaf147c8839394e0652ecd0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,179 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
public class XChartEditor : Editor
|
||||
{
|
||||
private static Transform GetParent()
|
||||
{
|
||||
GameObject selectObj = Selection.activeGameObject;
|
||||
if (selectObj == null)
|
||||
{
|
||||
var canvas = GameObject.FindObjectOfType<Canvas>();
|
||||
if (canvas != null) return canvas.transform;
|
||||
else
|
||||
{
|
||||
var canvasObject = new GameObject();
|
||||
canvasObject.name = "Canvas";
|
||||
canvas = canvasObject.AddComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
canvasObject.AddComponent<CanvasScaler>();
|
||||
canvasObject.AddComponent<GraphicRaycaster>();
|
||||
var eventSystem = new GameObject();
|
||||
eventSystem.name = "EventSystem";
|
||||
eventSystem.AddComponent<EventSystem>();
|
||||
eventSystem.AddComponent<StandaloneInputModule>();
|
||||
return canvas.transform;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return selectObj.transform;
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetName(Transform parent, string name)
|
||||
{
|
||||
if (parent.Find(name) == null) return name;
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
var newName = string.Format("{0} ({1})", name, i);
|
||||
if (parent.Find(newName) == null)
|
||||
{
|
||||
return newName;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public static void AddChart<T>(string chartName) where T : BaseChart
|
||||
{
|
||||
var parent = GetParent();
|
||||
if (parent == null) return;
|
||||
var chart = new GameObject();
|
||||
chart.name = GetName(parent, chartName);
|
||||
chart.AddComponent<T>();
|
||||
chart.transform.SetParent(parent);
|
||||
chart.transform.localScale = Vector3.one;
|
||||
chart.transform.localPosition = Vector3.zero;
|
||||
var rect = chart.GetComponent<RectTransform>();
|
||||
rect.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
rect.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
rect.pivot = new Vector2(0.5f, 0.5f);
|
||||
Selection.activeGameObject = chart;
|
||||
EditorUtility.SetDirty(chart);
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart", priority = 44)]
|
||||
[MenuItem("GameObject/XCharts/LineChart", priority = 44)]
|
||||
public static void AddLineChart()
|
||||
{
|
||||
AddChart<LineChart>("LineChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart", priority = 45)]
|
||||
[MenuItem("GameObject/XCharts/BarChart", priority = 45)]
|
||||
public static void AddBarChart()
|
||||
{
|
||||
AddChart<BarChart>("BarChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PieChart", priority = 46)]
|
||||
[MenuItem("GameObject/XCharts/PieChart", priority = 46)]
|
||||
public static void AddPieChart()
|
||||
{
|
||||
AddChart<PieChart>("PieChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/RadarChart", priority = 47)]
|
||||
[MenuItem("GameObject/XCharts/RadarChart", priority = 47)]
|
||||
public static void AddRadarChart()
|
||||
{
|
||||
AddChart<RadarChart>("RadarChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/ScatterChart", priority = 48)]
|
||||
[MenuItem("GameObject/XCharts/ScatterChart", priority = 48)]
|
||||
public static void AddScatterChart()
|
||||
{
|
||||
AddChart<ScatterChart>("ScatterChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/HeatmapChart", priority = 49)]
|
||||
[MenuItem("GameObject/XCharts/HeatmapChart", priority = 49)]
|
||||
public static void AddHeatmapChart()
|
||||
{
|
||||
AddChart<HeatmapChart>("HeatmapChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/GaugeChart", priority = 50)]
|
||||
[MenuItem("GameObject/XCharts/GaugeChart", priority = 50)]
|
||||
public static void AddGaugeChart()
|
||||
{
|
||||
AddChart<GaugeChart>("GaugeChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/RingChart", priority = 51)]
|
||||
[MenuItem("GameObject/XCharts/RingChart", priority = 51)]
|
||||
public static void AddRingChart()
|
||||
{
|
||||
AddChart<RingChart>("RingChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PolarChart", priority = 52)]
|
||||
[MenuItem("GameObject/XCharts/PolarChart", priority = 52)]
|
||||
public static void AddPolarChart()
|
||||
{
|
||||
AddChart<PolarChart>("PolarChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LiquidChart", priority = 53)]
|
||||
[MenuItem("GameObject/XCharts/LiquidChart", priority = 53)]
|
||||
public static void AddLiquidChart()
|
||||
{
|
||||
AddChart<LiquidChart>("LiquidChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/CandlestickChart", priority = 54)]
|
||||
[MenuItem("GameObject/XCharts/CandlestickChart", priority = 54)]
|
||||
public static void CandlestickChart()
|
||||
{
|
||||
AddChart<CandlestickChart>("CandlestickChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/Themes Reload")]
|
||||
public static void ReloadTheme()
|
||||
{
|
||||
XThemeMgr.ReloadThemeList();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/TextMeshPro Enable")]
|
||||
public static void EnableTextMeshPro()
|
||||
{
|
||||
if (!XChartsMgr.IsExistTMPAssembly())
|
||||
{
|
||||
Debug.LogError("TextMeshPro is not in the project, please import TextMeshPro package first.");
|
||||
return;
|
||||
}
|
||||
XChartsMgr.EnableTextMeshPro();
|
||||
XChartsMgr.ModifyTMPRefence();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/TextMeshPro Disable")]
|
||||
public static void DisableTextMeshPro()
|
||||
{
|
||||
XChartsMgr.ModifyTMPRefence(true);
|
||||
XChartsMgr.DisableTextMeshPro();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI XChartsMgr.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(XChartsMgr), false)]
|
||||
public class XChartsMgrEditor : Editor
|
||||
{
|
||||
protected XChartsMgr m_Target;
|
||||
protected SerializedProperty m_Script;
|
||||
protected SerializedProperty m_NowVersion;
|
||||
protected SerializedProperty m_NewVersion;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
m_Target = (XChartsMgr)target;
|
||||
m_Script = serializedObject.FindProperty("m_Script");
|
||||
m_NowVersion = serializedObject.FindProperty("m_NowVersion");
|
||||
m_NewVersion = serializedObject.FindProperty("m_NewVersion");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (m_Target == null && target == null)
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
return;
|
||||
}
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(m_NowVersion);
|
||||
EditorGUILayout.PropertyField(m_NewVersion);
|
||||
if (GUILayout.Button("Check Update"))
|
||||
{
|
||||
CheckVersionEditor.ShowWindow();
|
||||
}
|
||||
if (GUILayout.Button("Github Homepage"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
|
||||
}
|
||||
if (GUILayout.Button("Star Support"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/stargazers");
|
||||
}
|
||||
if (GUILayout.Button("Issues"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/issues");
|
||||
}
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69cbbe551cf1f45c984e6b4febc9f697
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8353edb72702e4cdda6af0248101d2cd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,309 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
public class Example00_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.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(ChartTheme.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 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Example01_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,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d369a0cba6716422cb15efa26bef0918
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,64 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Example02_ChartEvent : MonoBehaviour
|
||||
{
|
||||
BaseChart chart;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<BaseChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<LineChart>();
|
||||
}
|
||||
chart.onPointerEnter = OnPointerEnter;
|
||||
chart.onPointerExit = OnPointerExit;
|
||||
chart.onPointerDown = OnPointerDown;
|
||||
chart.onPointerUp = OnPointerUp;
|
||||
chart.onPointerClick = OnPointerClick;
|
||||
chart.onScroll = OnScroll;
|
||||
}
|
||||
|
||||
void OnPointerEnter(PointerEventData eventData, BaseGraph chart)
|
||||
{
|
||||
//Debug.LogError("enter:" + chart);
|
||||
}
|
||||
|
||||
void OnPointerExit(PointerEventData eventData, BaseGraph chart)
|
||||
{
|
||||
//Debug.LogError("exit:" + chart);
|
||||
}
|
||||
|
||||
void OnPointerDown(PointerEventData eventData, BaseGraph chart)
|
||||
{
|
||||
//Debug.LogError("down:" + chart);
|
||||
}
|
||||
|
||||
void OnPointerUp(PointerEventData eventData, BaseGraph chart)
|
||||
{
|
||||
//Debug.LogError("up:" + chart);
|
||||
}
|
||||
|
||||
void OnPointerClick(PointerEventData eventData, BaseGraph chart)
|
||||
{
|
||||
//Debug.LogError("click:" + chart);
|
||||
}
|
||||
|
||||
void OnScroll(PointerEventData eventData, BaseGraph chart)
|
||||
{
|
||||
//Debug.LogError("scroll:" + chart);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Example13_LineSimple : MonoBehaviour
|
||||
{
|
||||
void Awake()
|
||||
{
|
||||
var chart = gameObject.GetComponent<LineChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<LineChart>();
|
||||
chart.SetSize(580, 300);//代码动态添加图表需要设置尺寸,或直接操作chart.rectTransform
|
||||
}
|
||||
chart.title.show = true;
|
||||
chart.title.text = "Line Simple";
|
||||
|
||||
chart.tooltip.show = true;
|
||||
chart.legend.show = false;
|
||||
|
||||
chart.xAxes[0].show = true;
|
||||
chart.xAxes[1].show = false;
|
||||
chart.yAxes[0].show = true;
|
||||
chart.yAxes[1].show = false;
|
||||
chart.xAxes[0].type = Axis.AxisType.Category;
|
||||
chart.yAxes[0].type = Axis.AxisType.Value;
|
||||
|
||||
chart.xAxes[0].splitNumber = 10;
|
||||
chart.xAxes[0].boundaryGap = true;
|
||||
|
||||
chart.RemoveData();
|
||||
chart.AddSerie(SerieType.Line);
|
||||
chart.AddSerie(SerieType.Line);
|
||||
for (int i = 0; i < 2000; i++)
|
||||
{
|
||||
chart.AddXAxisData("x" + i);
|
||||
chart.AddData(0, Random.Range(10, 20));
|
||||
chart.AddData(1, Random.Range(10, 20));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
public class Example40_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,38 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Example50_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,104 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Example60_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.xAxes[0].type = Axis.AxisType.Category;
|
||||
chart.yAxes[0].type = Axis.AxisType.Category;
|
||||
|
||||
chart.xAxes[0].boundaryGap = true;
|
||||
chart.xAxes[0].boundaryGap = true;
|
||||
|
||||
chart.xAxes[0].splitNumber = 10;
|
||||
chart.yAxes[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.grid.runtimeWidth / heatmapGridWid);
|
||||
int ySplitNumber = (int)(chart.grid.runtimeHeight / 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(ChartTheme.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,70 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Example70_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.lineStyle.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: a3a7b70d5b66640dca4aaecf13d3769f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,57 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Example80_Polar : MonoBehaviour
|
||||
{
|
||||
private PolarChart chart;
|
||||
private float updateTime;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
chart = gameObject.GetComponent<PolarChart>();
|
||||
if (chart == null)
|
||||
{
|
||||
chart = gameObject.AddComponent<PolarChart>();
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
AddData();
|
||||
}
|
||||
}
|
||||
|
||||
void AddData()
|
||||
{
|
||||
chart.RemoveData();
|
||||
chart.tooltip.type = Tooltip.Type.Corss;
|
||||
chart.angleAxis.type = Axis.AxisType.Value;
|
||||
chart.angleAxis.minMaxType = Axis.AxisMinMaxType.Custom;
|
||||
chart.angleAxis.min = 0;
|
||||
chart.angleAxis.max = 360;
|
||||
chart.angleAxis.startAngle = Random.Range(0, 90);
|
||||
chart.AddSerie(SerieType.Line, "line1");
|
||||
|
||||
var rate = Random.Range(1, 4);
|
||||
for (int i = 0; i <= 360; i++)
|
||||
{
|
||||
var t = i / 180f * Mathf.PI;
|
||||
var r = Mathf.Sin(2 * t) * Mathf.Cos(2 * t) * rate;
|
||||
chart.AddData(0, Mathf.Abs(r), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(CoordinateChart))]
|
||||
public class Example_Dynamic : MonoBehaviour
|
||||
{
|
||||
public int maxCacheDataNumber = 100;
|
||||
public float initDataTime = 2;
|
||||
public bool insertDataToHead = false;
|
||||
|
||||
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.show = false;
|
||||
serie.maxCache = maxCacheDataNumber;
|
||||
chart.xAxes[0].maxCache = maxCacheDataNumber;
|
||||
timeNow = DateTime.Now;
|
||||
timeNow = timeNow.AddSeconds(-maxCacheDataNumber);
|
||||
|
||||
serie.insertDataToHead = insertDataToHead;
|
||||
chart.xAxes[0].insertDataToHead = insertDataToHead;
|
||||
}
|
||||
|
||||
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: 310037ac5daa645058285cf176cc9eab
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,54 +0,0 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Examples
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(CoordinateChart))]
|
||||
public class Example_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.SetMaxCache(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: 188d38c155a804c7d9d31730d3b12885
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user