mirror of
https://github.com/Relintai/pandemonium_engine_easy_charts.git
synced 2024-12-23 13:57:01 +01:00
d46e099717
* 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
31 lines
911 B
GDScript
31 lines
911 B
GDScript
tool
|
|
extends ScatterChartBase
|
|
class_name ScatterChart
|
|
|
|
"""
|
|
[ScatterChart] - General purpose node for Scatter Charts
|
|
|
|
A scatter plot (also called a scatterplot, scatter graph, scatter chart, scattergram, or scatter diagram)
|
|
is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables
|
|
for a set of data. If the points are coded (color/shape/size), one additional variable can be displayed.
|
|
The data are displayed as a collection of points, each having the value of one variable determining the position on
|
|
the horizontal axis and the value of the other variable determining the position on the vertical axis.
|
|
|
|
/ source : Wikipedia /
|
|
"""
|
|
|
|
# ---------------------
|
|
|
|
|
|
func _get_property_list():
|
|
property_list[0].name = "ScatterChart"
|
|
return property_list
|
|
|
|
|
|
func _draw():
|
|
clear_points()
|
|
draw_grid()
|
|
draw_chart_outlines()
|
|
draw_points()
|
|
draw_treshold()
|