finish 1st refactoring

This commit is contained in:
fenix-hub 2022-01-08 18:55:22 +01:00
parent 9d4d31fd2c
commit e2651f2fce
16 changed files with 14 additions and 201 deletions

View File

@ -1,3 +1,9 @@
<p align="right">
<a href="https://discord.gg/KnJGY9S">
<img src="https://github.com/fenix-hub/ColoredBadges/blob/master/svg/social/discord.svg" alt="react" style="vertical-align:top; margin:6px 4px">
</a>
</p>
# Notice, plugin under refactoring # Notice, plugin under refactoring
**This plugin is under refactoring an maintenance. The next official release will contain multiple updates and upgrades.**\ **This plugin is under refactoring an maintenance. The next official release will contain multiple updates and upgrades.**\
**If you encounter any bug, please contact me on Discord.** **If you encounter any bug, please contact me on Discord.**

View File

@ -72,7 +72,7 @@ var legend : Array setget set_legend,get_legend
# ................... Export Shared Variables .................. # ................... Export Shared Variables ..................
export (String) var chart_name : String = "" setget set_chart_name export (String) var chart_name : String = "" setget set_chart_name
export (String, FILE, "*.txt, *.csv") var source : String = "" setget set_source export (String, FILE, "*.txt, *.csv, *.res") var source : String = "" setget set_source
export (String) var delimiter : String = ";" setget set_delimiter export (String) var delimiter : String = ";" setget set_delimiter
var origin_at_zero : bool = false setget set_origin_at_zero#, get_origin_at_zero var origin_at_zero : bool = false setget set_origin_at_zero#, get_origin_at_zero
@ -322,7 +322,7 @@ func plot(_dataset: Array = read_data(source, delimiter)) -> void:
compute_display() compute_display()
display_plot() display_plot()
emit_signal("chart_plotted",self) emit_signal("chart_plotted",self)
if not is_connected("item_rect_changed",self, "redraw"): connect("item_rect_changed", self, "redraw") if not is_connected("item_rect_changed", self, "redraw_plot"): connect("item_rect_changed", self, "redraw_plot")
func plot_from_source(file : String, _delimiter : String = delimiter) -> void: func plot_from_source(file : String, _delimiter : String = delimiter) -> void:
plot(read_data(file, _delimiter)) plot(read_data(file, _delimiter))
@ -385,7 +385,7 @@ func slice_data(data: Array) -> Array:
data_to_display = data.duplicate(true) data_to_display = data.duplicate(true)
return data_to_display return data_to_display
# .................. Display and Draw functions ....................... # ................................. Display and Draw functions .......................
func compute_display(): func compute_display():
count_functions() count_functions()
calculate_colors() calculate_colors()
@ -397,6 +397,10 @@ func display_plot():
calculate_pass() calculate_pass()
calculate_coordinates() calculate_coordinates()
func redraw_plot():
clean_points()
display_plot()
# ................................. Helper Functions ................................. # ................................. Helper Functions .................................
func load_font(): func load_font():

View File

@ -1,10 +0,0 @@
Year;Column 1;Column 2;Column 3;Column 4
2009;36200;27200;26200;17200
2010;36600;27800;26600;17800
2011;37500;28500;27500;18500
2012;38700;29400;28700;19400
2013;39600;30200;29600;10200
2014;40500;30900;20500;10900
2015;41200;31500;21200;11500
2016;41803;31931;21803;11931
2017;42600;32600;22600;12600
1 Year Column 1 Column 2 Column 3 Column 4
2 2009 36200 27200 26200 17200
3 2010 36600 27800 26600 17800
4 2011 37500 28500 27500 18500
5 2012 38700 29400 28700 19400
6 2013 39600 30200 29600 10200
7 2014 40500 30900 20500 10900
8 2015 41200 31500 21200 11500
9 2016 41803 31931 21803 11931
10 2017 42600 32600 22600 12600

View File

@ -1,3 +0,0 @@
[remap]
importer="keep"

View File

@ -1,10 +0,0 @@
Year;Column 1;Column 2;Column 3;Column 4
2009;36200;27200;26200;17200
2010;36600;27800;26600;17800
2011;37500;28500;27500;18500
2012;38700;29400;28700;19400
2013;39600;30200;29600;10200
2014;40500;30900;20500;10900
2015;41200;31500;21200;11500
2016;41803;31931;21803;11931
2017;42600;32600;22600;12600
1 Year Column 1 Column 2 Column 3 Column 4
2 2009 36200 27200 26200 17200
3 2010 36600 27800 26600 17800
4 2011 37500 28500 27500 18500
5 2012 38700 29400 28700 19400
6 2013 39600 30200 29600 10200
7 2014 40500 30900 20500 10900
8 2015 41200 31500 21200 11500
9 2016 41803 31931 21803 11931
10 2017 42600 32600 22600 12600

View File

@ -1,10 +0,0 @@
[remap]
importer="csv"
type="TextFile"
[deps]
source_file="res://addons/easy_charts/file.samples/linechart (rows).csv"
[params]

View File

@ -1,2 +0,0 @@
Date; 21/03/03;21/03/2008;21/03/2010;21/03/2011;21/03/2012;21/03/2013;21/03/2014;21/03/2015;21/03/2016;21/03/2018
Score;3;8;20;18;28;31;27;38;36;46
1 Date 21/03/03 21/03/2008 21/03/2010 21/03/2011 21/03/2012 21/03/2013 21/03/2014 21/03/2015 21/03/2016 21/03/2018
2 Score 3 8 20 18 28 31 27 38 36 46

View File

@ -1,10 +0,0 @@
[remap]
importer="csv"
type="TextFile"
[deps]
source_file="res://addons/easy_charts/file.samples/linechart.csv"
[params]

View File

@ -1,8 +0,0 @@
Country,Votes
United States,46
Great Britain,27
China,26
Russia,19
Germany,17
Italy,34
Sweden,83
1 Country Votes
2 United States 46
3 Great Britain 27
4 China 26
5 Russia 19
6 Germany 17
7 Italy 34
8 Sweden 83

View File

@ -1,10 +0,0 @@
[remap]
importer="csv"
type="TextFile"
[deps]
source_file="res://addons/easy_charts/file.samples/pie.csv"
[params]

View File

@ -1,4 +0,0 @@
Eating;Drinking;Running;Sleeping;Coding
30;50;40;100;95
90;34;100;50;23
1 Eating Drinking Running Sleeping Coding
2 30 50 40 100 95
3 90 34 100 50 23

View File

@ -1,10 +0,0 @@
[remap]
importer="csv"
type="TextFile"
[deps]
source_file="res://addons/easy_charts/file.samples/radar.csv"
[params]

View File

@ -1,101 +0,0 @@
x;y1;y2
50,05732879;116,61234;90,55501121
53,23295081;105,6457011;47,41275029
47,28686102;95,61795061;36,33108959
53,0250493;106,4552515;85,4302022
57,10271278;111,9088163;39,80610352
40,71992494;78,27201391;79,55208897
55,62752569;122,7859036;94,15837791
54,17819455;107,9817124;39,80351785
40,8610371;107,92736;61,0663229
54,06159551;110,0647495;93,00315399
64,35130431;134,5556319;114,2043276
49,29181834;88,18806126;64,89624292
44,63823505;102,8364528;108,1982178
58,62487836;126,0319541;78,40707574
55,78566879;95,81224088;75,02657209
50,76570445;94,73143882;39,96573437
48,45339259;92,86957776;88,41618517
49,40446173;70,21723661;9,81277488
48,34604978;97,87616091;40,53011113
43,62470151;103,7308337;97,10613219
50,8877046;117,1558657;62,2681611
52,25082012;103,3922334;79,14141328
50,35929987;87,68936817;19,3300683
46,42761861;90,1655428;67,73792419
55,67926036;93,17073084;69,49147048
61,72779383;142,8458546;106,1180608
58,99808851;102,3529041;27,35481559
43,6620999;77,36405233;17,70195243
55,42639088;121,0878726;78,66148172
58,79311097;111,8698686;49,07675763
50,71073988;106,5406487;97,82990882
45,57346035;104,7456111;56,17215075
45,7981314;83,9963622;75,1982308
46,46484131;82,94617575;77,48133444
57,9492853;144,9994608;129,0501755
48,3999722;72,83510082;30,43512862
54,2097076;114,7785416;82,568834
46,67548966;95,25014621;37,57465655
38,21698894;88,21423442;64,99724548
51,95614673;90,93548401;66,97933728
51,22522594;105,1106925;101,8854666
52,84741658;105,0503069;75,20289032
54,78984594;109,9873973;87,19755136
52,00296104;101,442706;89,43974496
51,43150193;88,40178257;36,97028064
47,40407943;89,44141735;55,03733792
51,6749185;96,54147702;31,86655852
40,74049925;83,85842913;79,11792988
49,82155418;112,9093356;96,08778142
57,57763531;115,7709369;72,19330159
51,49652924;127,9054098;118,4088806
53,10710725;112,6337002;90,52659295
42,93645994;102,8111834;102,8747235
44,14066275;78,88897631;41,74831356
46,60936983;98,64046333;54,0310935
47,41415307;95,89594769;58,48179462
47,99032677;106,3655192;102,3751924
50,68360992;106,9507457;44,26713578
50,57070899;83,19613908;61,62543009
57,14992785;115,5596634;40,40973555
50,45105658;97,6950217;64,24396512
46,76779029;99,20006513;60,43227484
50,49802495;99,43092076;87,93289581
51,52523583;84,24653091;17,72129508
40,72692657;102,1715902;67,44466363
54,96034411;111,5346596;82,57431549
48,86213774;101,4305303;58,56839256
52,76166432;108,021472;60,25980768
55,46249302;83,51709356;51,05460054
51,78186354;79,45870906;11,67684552
54,7256505;108,6386184;58,9129679
55,03288163;112,1224042;72,08952257
52,83806054;104,53718;101,6991195
45,86692682;91,39643691;29,52951009
49,67284006;110,1908352;88,51799514
53,18552185;119,0135337;113,8280119
41,69070011;62,78988486;53,09918475
53,36320564;118,5841731;108,2209675
44,27369117;74,58882658;69,31513541
49,92198979;76,93363417;52,01164438
44,91221355;82,33766098;44,42544743
37,92316535;68,0076039;17,08443855
50,10889447;103,6209931;49,51209863
44,20348231;84,19989748;57,99641517
57,11433271;102,0528226;84,93848989
41,90764861;109,1360517;50,22840309
51,88278094;89,01870776;69,13592682
44,31355843;81,19982464;76,88626621
44,25547817;72,64564157;53,3901634
48,93179315;107,7773458;40,84555265
39,36849865;59,39799005;68,0294914
53,33338181;99,04871654;92,71533473
61,63696872;129,3884947;76,75152598
46,40148646;102,9511032;92,54961674
43,81949012;75,15673812;44,337248
53,78046359;85,87008695;50,08962336
41,27977392;60,49700348;50,21722956
52,32206122;106,8462547;57,52419348
41,36660384;105,0465099;78,67990606
47,62423286;96,62455823;84,00032537
1 x y1 y2
2 50,05732879 116,61234 90,55501121
3 53,23295081 105,6457011 47,41275029
4 47,28686102 95,61795061 36,33108959
5 53,0250493 106,4552515 85,4302022
6 57,10271278 111,9088163 39,80610352
7 40,71992494 78,27201391 79,55208897
8 55,62752569 122,7859036 94,15837791
9 54,17819455 107,9817124 39,80351785
10 40,8610371 107,92736 61,0663229
11 54,06159551 110,0647495 93,00315399
12 64,35130431 134,5556319 114,2043276
13 49,29181834 88,18806126 64,89624292
14 44,63823505 102,8364528 108,1982178
15 58,62487836 126,0319541 78,40707574
16 55,78566879 95,81224088 75,02657209
17 50,76570445 94,73143882 39,96573437
18 48,45339259 92,86957776 88,41618517
19 49,40446173 70,21723661 9,81277488
20 48,34604978 97,87616091 40,53011113
21 43,62470151 103,7308337 97,10613219
22 50,8877046 117,1558657 62,2681611
23 52,25082012 103,3922334 79,14141328
24 50,35929987 87,68936817 19,3300683
25 46,42761861 90,1655428 67,73792419
26 55,67926036 93,17073084 69,49147048
27 61,72779383 142,8458546 106,1180608
28 58,99808851 102,3529041 27,35481559
29 43,6620999 77,36405233 17,70195243
30 55,42639088 121,0878726 78,66148172
31 58,79311097 111,8698686 49,07675763
32 50,71073988 106,5406487 97,82990882
33 45,57346035 104,7456111 56,17215075
34 45,7981314 83,9963622 75,1982308
35 46,46484131 82,94617575 77,48133444
36 57,9492853 144,9994608 129,0501755
37 48,3999722 72,83510082 30,43512862
38 54,2097076 114,7785416 82,568834
39 46,67548966 95,25014621 37,57465655
40 38,21698894 88,21423442 64,99724548
41 51,95614673 90,93548401 66,97933728
42 51,22522594 105,1106925 101,8854666
43 52,84741658 105,0503069 75,20289032
44 54,78984594 109,9873973 87,19755136
45 52,00296104 101,442706 89,43974496
46 51,43150193 88,40178257 36,97028064
47 47,40407943 89,44141735 55,03733792
48 51,6749185 96,54147702 31,86655852
49 40,74049925 83,85842913 79,11792988
50 49,82155418 112,9093356 96,08778142
51 57,57763531 115,7709369 72,19330159
52 51,49652924 127,9054098 118,4088806
53 53,10710725 112,6337002 90,52659295
54 42,93645994 102,8111834 102,8747235
55 44,14066275 78,88897631 41,74831356
56 46,60936983 98,64046333 54,0310935
57 47,41415307 95,89594769 58,48179462
58 47,99032677 106,3655192 102,3751924
59 50,68360992 106,9507457 44,26713578
60 50,57070899 83,19613908 61,62543009
61 57,14992785 115,5596634 40,40973555
62 50,45105658 97,6950217 64,24396512
63 46,76779029 99,20006513 60,43227484
64 50,49802495 99,43092076 87,93289581
65 51,52523583 84,24653091 17,72129508
66 40,72692657 102,1715902 67,44466363
67 54,96034411 111,5346596 82,57431549
68 48,86213774 101,4305303 58,56839256
69 52,76166432 108,021472 60,25980768
70 55,46249302 83,51709356 51,05460054
71 51,78186354 79,45870906 11,67684552
72 54,7256505 108,6386184 58,9129679
73 55,03288163 112,1224042 72,08952257
74 52,83806054 104,53718 101,6991195
75 45,86692682 91,39643691 29,52951009
76 49,67284006 110,1908352 88,51799514
77 53,18552185 119,0135337 113,8280119
78 41,69070011 62,78988486 53,09918475
79 53,36320564 118,5841731 108,2209675
80 44,27369117 74,58882658 69,31513541
81 49,92198979 76,93363417 52,01164438
82 44,91221355 82,33766098 44,42544743
83 37,92316535 68,0076039 17,08443855
84 50,10889447 103,6209931 49,51209863
85 44,20348231 84,19989748 57,99641517
86 57,11433271 102,0528226 84,93848989
87 41,90764861 109,1360517 50,22840309
88 51,88278094 89,01870776 69,13592682
89 44,31355843 81,19982464 76,88626621
90 44,25547817 72,64564157 53,3901634
91 48,93179315 107,7773458 40,84555265
92 39,36849865 59,39799005 68,0294914
93 53,33338181 99,04871654 92,71533473
94 61,63696872 129,3884947 76,75152598
95 46,40148646 102,9511032 92,54961674
96 43,81949012 75,15673812 44,337248
97 53,78046359 85,87008695 50,08962336
98 41,27977392 60,49700348 50,21722956
99 52,32206122 106,8462547 57,52419348
100 41,36660384 105,0465099 78,67990606
101 47,62423286 96,62455823 84,00032537

View File

@ -1,10 +0,0 @@
[remap]
importer="csv"
type="TextFile"
[deps]
source_file="res://addons/easy_charts/file.samples/scatter (columns).csv"
[params]

View File

@ -1,10 +0,0 @@
[remap]
importer="csv"
type="TextFile"
[deps]
source_file="res://addons/easy_charts/file.samples/scatter.csv"
[params]

View File

@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false process/premult_alpha=false
process/HDR_as_SRGB=false process/HDR_as_SRGB=false
process/invert_color=false process/invert_color=false
process/normal_map_invert_y=false
stream=false stream=false
size_limit=0 size_limit=0
detect_3d=true detect_3d=true