fix#48fix#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>
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>
* 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>
* 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