Commit Graph

375 Commits

Author SHA1 Message Date
fenix-hub
5621f59e30 remove line 2022-01-09 16:35:12 +01:00
fenix-hub
20dc80b4b6 fix .instance() and RadarChart scene 2022-01-09 16:32:44 +01:00
fenix-hub
c7ab170ceb rename back 2022-01-09 16:02:36 +01:00
fenix-hub
cd31d7d0aa rename 2022-01-09 16:02:18 +01:00
fenix-hub
fe8b19d7b6 Merge branch 'main' of https://github.com/fenix-hub/godot-engine.easy-charts 2022-01-09 16:01:36 +01:00
Nicolò Santilio
462bb4f901
Refactor (#54)
fix #48  fix #52 

* Refactor so it works with the new data format.

Restructured some functions in smaller pieces and changed it so they can work with data in the new format.

Main way to use it will be with the new plot_function but old functions support is requiered through structure_datas (WIP)

* structure_datas rework

structure_datas structure the data to match the new format.

* Add new plotting methods

Also renamed identifiers array to the already existing y_labels and a fix to correctly calculate tics.

* Add autoscale or user-defined range

* Add color definition from plot_function call

Introduction of a param_dic parameter on plot_function that allows for specific parameters definitions for that curve only without changing the full Chart.

Also moved the label identier string to a parameter on this dicionary so it can be called without specifying a label name.

* Fix representation of negative values

Using negative numbers should now work on both axis. For this I created two new methods calcualte_interval_tics and calculate_number_integer_digits to avoid code repetition.

I'd like to work more on this, since now the representation is correct but can look very weird for some values with a lot of empty space on the chart.

* Correctly calculates tics for numbers between 0 and 1

Also some small fixes to update_function and delete_function. Changed the tic little line to point outside the chart instead of inside so it doesn't overlap with the grid line.

* Correctly (almost) center axis labels

Needs a little of research for the vertical centering since get_string_size doesn't behave as expected.

* Add some style representation customization

Width of the grid and function lines.

Made drawing points for LineChart optional (especially useful when using a huge number of points to avoid overclustering). For this I had to rewrite the draw_lines function to work similar to draw_points using point_positions instead of information of the point nodes.

The string position of the labels is correctly calculated now. It uses a new variable: label_displacement so it don't look too close to the axis and the border.

Set some default values  that make more sense to the instanciable scenes.

* Fix clearing of data structures with multiple calls to plot_from_x

* Fix show_x_values_as_labels

Correctly sets the x position when show_x_values_as_labels is active.

* Fix show_x_values_as_labels when the label is a String

* restructure folder

* refactor scatter_chart and line_chart

* finish 1st refactoring

* finish 1st refactoring

* finish 1st refactoring

* remove .tmp

* fix min errors

* refactor column chart

* fix are_values_columns

Co-authored-by: Jorge <63685920+JFerrerBeired@users.noreply.github.com>
2022-01-08 21:15:05 +01:00
Nicolò Santilio
7c73e92f8f
1st Refactor (#53)
fix #48 #52 #46 

* Refactor so it works with the new data format.

Restructured some functions in smaller pieces and changed it so they can work with data in the new format.

Main way to use it will be with the new plot_function but old functions support is requiered through structure_datas (WIP)

* structure_datas rework

structure_datas structure the data to match the new format.

* Add new plotting methods

Also renamed identifiers array to the already existing y_labels and a fix to correctly calculate tics.

* Add autoscale or user-defined range

* Add color definition from plot_function call

Introduction of a param_dic parameter on plot_function that allows for specific parameters definitions for that curve only without changing the full Chart.

Also moved the label identier string to a parameter on this dicionary so it can be called without specifying a label name.

* Fix representation of negative values

Using negative numbers should now work on both axis. For this I created two new methods calcualte_interval_tics and calculate_number_integer_digits to avoid code repetition.

I'd like to work more on this, since now the representation is correct but can look very weird for some values with a lot of empty space on the chart.

* Correctly calculates tics for numbers between 0 and 1

Also some small fixes to update_function and delete_function. Changed the tic little line to point outside the chart instead of inside so it doesn't overlap with the grid line.

* Correctly (almost) center axis labels

Needs a little of research for the vertical centering since get_string_size doesn't behave as expected.

* Add some style representation customization

Width of the grid and function lines.

Made drawing points for LineChart optional (especially useful when using a huge number of points to avoid overclustering). For this I had to rewrite the draw_lines function to work similar to draw_points using point_positions instead of information of the point nodes.

The string position of the labels is correctly calculated now. It uses a new variable: label_displacement so it don't look too close to the axis and the border.

Set some default values  that make more sense to the instanciable scenes.

* Fix clearing of data structures with multiple calls to plot_from_x

* Fix show_x_values_as_labels

Correctly sets the x position when show_x_values_as_labels is active.

* Fix show_x_values_as_labels when the label is a String

* restructure folder

* refactor scatter_chart and line_chart

* finish 1st refactoring

* finish 1st refactoring

* finish 1st refactoring

* remove .tmp

* fix min errors

Co-authored-by: Jorge <63685920+JFerrerBeired@users.noreply.github.com>
2022-01-08 19:10:31 +01:00
fenix-hub
108b42b737 resolve conflicts 2022-01-08 19:03:05 +01:00
fenix-hub
70a36d2156 remove .tmp 2022-01-08 18:56:19 +01:00
fenix-hub
edf0d14614 finish 1st refactoring 2022-01-08 18:55:53 +01:00
fenix-hub
d590262dbc finish 1st refactoring 2022-01-08 18:55:27 +01:00
fenix-hub
e2651f2fce finish 1st refactoring 2022-01-08 18:55:22 +01:00
fenix-hub
9d4d31fd2c refactor scatter_chart and line_chart 2022-01-08 18:46:03 +01:00
fenix-hub
e3a78ed60a restructure folder 2022-01-08 16:34:36 +01:00
Nicolò Santilio
1e388f49a0
Scatter (#51)
* Refactor so it works with the new data format.

Restructured some functions in smaller pieces and changed it so they can work with data in the new format.

Main way to use it will be with the new plot_function but old functions support is requiered through structure_datas (WIP)

* structure_datas rework

structure_datas structure the data to match the new format.

* Add new plotting methods

Also renamed identifiers array to the already existing y_labels and a fix to correctly calculate tics.

* Add autoscale or user-defined range

* Add color definition from plot_function call

Introduction of a param_dic parameter on plot_function that allows for specific parameters definitions for that curve only without changing the full Chart.

Also moved the label identier string to a parameter on this dicionary so it can be called without specifying a label name.

* Fix representation of negative values

Using negative numbers should now work on both axis. For this I created two new methods calcualte_interval_tics and calculate_number_integer_digits to avoid code repetition.

I'd like to work more on this, since now the representation is correct but can look very weird for some values with a lot of empty space on the chart.

* Correctly calculates tics for numbers between 0 and 1

Also some small fixes to update_function and delete_function. Changed the tic little line to point outside the chart instead of inside so it doesn't overlap with the grid line.

* Correctly (almost) center axis labels

Needs a little of research for the vertical centering since get_string_size doesn't behave as expected.

* Add some style representation customization

Width of the grid and function lines.

Made drawing points for LineChart optional (especially useful when using a huge number of points to avoid overclustering). For this I had to rewrite the draw_lines function to work similar to draw_points using point_positions instead of information of the point nodes.

The string position of the labels is correctly calculated now. It uses a new variable: label_displacement so it don't look too close to the axis and the border.

Set some default values  that make more sense to the instanciable scenes.

* Fix clearing of data structures with multiple calls to plot_from_x

* Fix show_x_values_as_labels

Correctly sets the x position when show_x_values_as_labels is active.

* Fix show_x_values_as_labels when the label is a String

Co-authored-by: Jorge <63685920+JFerrerBeired@users.noreply.github.com>
2021-08-09 20:09:49 +02:00
Jorge
bbfe1c4783 Fix show_x_values_as_labels when the label is a String 2021-05-04 03:28:19 +02:00
Jorge
eb0006c17a Fix show_x_values_as_labels
Correctly sets the x position when show_x_values_as_labels is active.
2021-05-04 02:08:29 +02:00
Jorge
e6914a82a4 Fix clearing of data structures with multiple calls to plot_from_x 2021-05-03 18:15:19 +02:00
Jorge
cd5b296eda
Merge pull request #50 from fenix-hub/main
Merge updates of the main branch
2021-05-03 17:19:36 +02:00
Nicolò Santilio
02621e8437
Update README.md 2021-03-26 16:55:24 +01:00
Nicolò Santilio
4621e83c24
Update README.md 2021-03-26 16:55:12 +01:00
Nicolò Santilio
6aa821af34
Update README.md 2021-03-26 16:54:53 +01:00
Jorge
1d31b3a7dc Add some style representation customization
Width of the grid and function lines.

Made drawing points for LineChart optional (especially useful when using a huge number of points to avoid overclustering). For this I had to rewrite the draw_lines function to work similar to draw_points using point_positions instead of information of the point nodes.

The string position of the labels is correctly calculated now. It uses a new variable: label_displacement so it don't look too close to the axis and the border.

Set some default values  that make more sense to the instanciable scenes.
2021-03-25 03:06:55 +01:00
Jorge
25e97a683e Correctly (almost) center axis labels
Needs a little of research for the vertical centering since get_string_size doesn't behave as expected.
2021-03-18 03:19:34 +01:00
Jorge
2f1bf52e1d Correctly calculates tics for numbers between 0 and 1
Also some small fixes to update_function and delete_function. Changed the tic little line to point outside the chart instead of inside so it doesn't overlap with the grid line.
2021-03-17 16:20:31 +01:00
Jorge
e298e88231 Fix representation of negative values
Using negative numbers should now work on both axis. For this I created two new methods calcualte_interval_tics and calculate_number_integer_digits to avoid code repetition.

I'd like to work more on this, since now the representation is correct but can look very weird for some values with a lot of empty space on the chart.
2021-03-17 00:05:36 +01:00
chrisskeddy
535edd5da9
changed to free since queue_free is not fast enough. Godot Doc: "Queues a node for deletion at the end of the current frame." (#43) 2021-03-13 11:05:46 +01:00
Nicolò Santilio
964ddacc1f
Rename Point.tscn to point.tscn 2021-03-12 22:46:15 +01:00
Nicolò Santilio
bb4f8a3c8b
Update scatter_chart3D.gd 2021-03-12 20:36:59 +01:00
Nicolò Santilio
2d671536d1
Update README.md 2021-03-12 20:00:38 +01:00
Nicolò Santilio
1a370d608b
Rename Point.gd to point.gd 2021-03-12 20:00:06 +01:00
Nicolò Santilio
ab01011cfb
Rename point.tscn to Point.tscn 2021-03-12 19:37:10 +01:00
Nicolò Santilio
a15e0b850d
Rename Point.tscn to point.tscn 2021-03-12 19:37:00 +01:00
Jorge
dde7c16989 Add color definition from plot_function call
Introduction of a param_dic parameter on plot_function that allows for specific parameters definitions for that curve only without changing the full Chart.

Also moved the label identier string to a parameter on this dicionary so it can be called without specifying a label name.
2021-03-05 03:29:03 +01:00
Jorge
16d144f418 Add autoscale or user-defined range 2021-03-02 20:18:31 +01:00
Jorge
1252fe7a59 Add new plotting methods
Also renamed identifiers array to the already existing y_labels and a fix to correctly calculate tics.
2021-03-01 23:00:27 +01:00
Jorge
d4dd6367fb structure_datas rework
structure_datas structure the data to match the new format.
2021-02-26 00:26:34 +01:00
Jorge
5b97c528fe Refactor so it works with the new data format.
Restructured some functions in smaller pieces and changed it so they can work with data in the new format.

Main way to use it will be with the new plot_function but old functions support is requiered through structure_datas (WIP)
2021-02-25 21:57:05 +01:00
Nicolò Santilio
1c732ab840
Update README.md 2021-02-21 19:03:23 +01:00
Nicolò Santilio
dc8915a762
Update README.md 2021-02-21 19:02:47 +01:00
Nicolò Santilio
524efcda1f
Update README.md 2021-02-21 19:02:29 +01:00
Jorge
d46e099717
Rework of ScatterChart and LineChart (#40)
* Fixed ScatterChart to work like LineChart when are_values_columns is true

* Fixed labeling spaguetti and added offset.

* Fixed indentation to match GDScript style guide

* Fix distances calculations

Note that I removed the origin_at_zero conditional at calculate_coordinates because I already fix y_margin_min to 0 at structure_datas.

* Add missing features to ScatterChart

I added the missing features from LineChart to ScatterChart (like treshold and some properties) in preparation to creation of a Parent Class common to both. This way the changes can be traced easily.

* Add BaseClass for Scatter and Line Charts

* Changes to property_list getter

* Rename ScatterChartBase.gd to scatter_chart_base.gd

* Filenames changed to match GDscript Style Guide

From Godot so it doesn't break  the links.

* Fixed some dependencies on chart and chart2D
2021-02-21 11:29:29 +01:00
Nicolò Santilio
29e0010b20
Merge pull request #39 from fenix-hub/dev
Dev
2021-01-17 00:49:20 +01:00
Nicolò Santilio
bc0e47c14c fix linechart borders and x_values 2021-01-17 00:48:38 +01:00
Nicolò Santilio
7309517076 fix linechart borders and x_values 2021-01-17 00:48:15 +01:00
Nicolò Santilio
6e278ac427
Merge pull request #38 from fenix-hub/dev
fix linechart datatype bug
2021-01-12 15:03:27 +01:00
Nicolò Santilio
d934b5ed6b fix linechart datatype bug 2021-01-12 15:02:55 +01:00
Nicolò Santilio
bbc4756327
Merge pull request #37 from fenix-hub/dev
Dev
2021-01-08 21:04:59 +01:00
Nicolò Santilio
a1bea161fa fix #36 - PieChart always getting input 2021-01-08 21:03:39 +01:00
Nicolò Santilio
ed90863a1d fix #36 - PieChart always getting input 2021-01-08 21:01:33 +01:00