mirror of
https://github.com/Relintai/pandemonium_engine_easy_charts.git
synced 2024-12-21 13:47:18 +01:00
commit
0d702835f7
17
README.md
17
README.md
@ -9,7 +9,7 @@
|
|||||||
A library of Charts plotted in Control, 2D and 3D nodes to visualize general purpose datasets.
|
A library of Charts plotted in Control, 2D and 3D nodes to visualize general purpose datasets.
|
||||||
|
|
||||||
Author: *"Nicolo (fenix) Santilio"*
|
Author: *"Nicolo (fenix) Santilio"*
|
||||||
Version: *0.4.1*
|
Version: *0.4.2*
|
||||||
Wiki: *[wip]*
|
Wiki: *[wip]*
|
||||||
Godot Version: *3.2stable*
|
Godot Version: *3.2stable*
|
||||||
|
|
||||||
@ -72,8 +72,19 @@ You can get this result:
|
|||||||
| Function | Description |
|
| Function | Description |
|
||||||
| ------------- | ------------- |
|
| ------------- | ------------- |
|
||||||
|`plot()`|Plot the selected chart with in editor properties|
|
|`plot()`|Plot the selected chart with in editor properties|
|
||||||
|`_plot(source : String, delimiter : String, are_values_columns : bool, x_values : int, invert_xy : bool = false)`|Plot the selected chart with hard coded properties|
|
|`plot_from_csv(csv_file : String, _delimiter : String = delimiter)`|Plot the selected chart defining the source and delimiter from code|
|
||||||
|
|`plot_from_array(array : Array)`|Plot the selected chart giving an Array of values as a source|
|
||||||
|
|`update_plot_data(array : Array)`|Update plot data giving an additional entry to the source|
|
||||||
|`get_legend()`|Get the legend of the current chart. Returns an **Array** containing control nodes, which can be added as children |
|
|`get_legend()`|Get the legend of the current chart. Returns an **Array** containing control nodes, which can be added as children |
|
||||||
|
|*API v2*|*additional functions to define chart's properties from code. Hardcoded properties will overwrite the ones given from editor*|
|
||||||
|
|`set_chart_name(ch_name : String)`|Set the displayed name of the chart|
|
||||||
|
|`set_source(source_file : String)`|Set the source of the chart to plot|
|
||||||
|
|`set_delimiter(delimiter : String)`|Set the delimiter to read data from a CSV file|
|
||||||
|
|`set_indexes(lb : int = 0, function_names : int = 0)`|Set the optional indexes of chart's data|
|
||||||
|
|`set_radius(use_height : bool = false, f : float = 0)`|Set the radius of the chart, if it is required. If `use_height` is true, the height of the chart will be used.|
|
||||||
|
|`set_chart_colors(f_colors : PoolColorArray, o_color : Color, b_color : Color, g_color : Color, h_lines : Color, v_lines : Color)`|Set the colors of the chart|
|
||||||
|
|`set_chart_fonts(normal_font : Font, bold_font : Font, f_color : Color = Color.white)`|Set fonts and font's color for the chart|
|
||||||
|
|`set_source(source_file : String)`|Set the source of the chart to plot|
|
||||||
|
|
||||||
| Signals | Description |
|
| Signals | Description |
|
||||||
| ------------- | ------------- |
|
| ------------- | ------------- |
|
||||||
@ -122,11 +133,11 @@ This library offers a set of charts for each main Godot Node:
|
|||||||
- LineChart [Control, 2D, wip 3D]
|
- LineChart [Control, 2D, wip 3D]
|
||||||
- BarChart [Control, 2D, wipr 3D]
|
- BarChart [Control, 2D, wipr 3D]
|
||||||
- ScatterChart [wip Control, wip 2D, 3D]
|
- ScatterChart [wip Control, wip 2D, 3D]
|
||||||
|
- Piechart [Control]
|
||||||
- RadarChart [Control]
|
- RadarChart [Control]
|
||||||
|
|
||||||
*Work in progress*:
|
*Work in progress*:
|
||||||
- Area Chart
|
- Area Chart
|
||||||
- Pie Chart
|
|
||||||
- Donut Chart
|
- Donut Chart
|
||||||
- Radar Chart
|
- Radar Chart
|
||||||
- Bubble Chart
|
- Bubble Chart
|
||||||
|
@ -86,7 +86,7 @@ var function_names_index : int = 0 setget set_function_names_index#, get_funct
|
|||||||
|
|
||||||
# for radar
|
# for radar
|
||||||
var use_height_as_radius : bool = false setget set_use_height_as_radius
|
var use_height_as_radius : bool = false setget set_use_height_as_radius
|
||||||
var radius : float = 150.0 setget _set_radius
|
var radius : float = 150.0 setget _set_radius,get_radius
|
||||||
|
|
||||||
# for columns
|
# for columns
|
||||||
var column_width : float = 10 setget set_column_width
|
var column_width : float = 10 setget set_column_width
|
||||||
@ -457,7 +457,7 @@ func set_radius(use_height : bool = false, f : float = 0):
|
|||||||
radius = f
|
radius = f
|
||||||
|
|
||||||
# !!! API v2
|
# !!! API v2
|
||||||
func set_chart_colors(f_colors : Array, o_color : Color, b_color : Color, g_color : Color, h_lines : Color, v_lines : Color):
|
func set_chart_colors(f_colors : PoolColorArray, o_color : Color, b_color : Color, g_color : Color, h_lines : Color, v_lines : Color):
|
||||||
function_colors = f_colors
|
function_colors = f_colors
|
||||||
outline_color = o_color
|
outline_color = o_color
|
||||||
box_color = b_color
|
box_color = b_color
|
||||||
@ -499,6 +499,10 @@ func set_use_height_as_radius(b : bool):
|
|||||||
func _set_radius(r : float):
|
func _set_radius(r : float):
|
||||||
radius = r
|
radius = r
|
||||||
|
|
||||||
|
func get_radius() -> float:
|
||||||
|
if use_height_as_radius: return get_size().y/2
|
||||||
|
else: return radius
|
||||||
|
|
||||||
# ! API
|
# ! API
|
||||||
func set_column_width(f : float):
|
func set_column_width(f : float):
|
||||||
column_width = f
|
column_width = f
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
name="EasyCharts"
|
name="EasyCharts"
|
||||||
description=""
|
description=""
|
||||||
author="Nicolò \"fenix\" Santilio"
|
author="Nicolò \"fenix\" Santilio"
|
||||||
version="0.4.1"
|
version="0.4.2"
|
||||||
script="plugin.gd"
|
script="plugin.gd"
|
||||||
|
Loading…
Reference in New Issue
Block a user