-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] (Documentation) Having Real Difficulty Getting Started #99
Comments
In the meantime, I figured out a simple setup by utilizing examples, though as examples uses a "control" scene (aka.
extends Control
@onready var chart: Chart = $VBoxContainer/Chart
func _ready():
# Y values can be n-size array of arrays.
# x.size() == y.size() or`x.size() == y[n].size()
var x: PackedFloat32Array = ArrayOperations.multiply_float(range(-10, 11, 1), 0.5)
var y: Array = ArrayOperations.multiply_int(ArrayOperations.cos(x), 20)
# More like chart properties, which can be distinct from trace properties
var properties: ChartProperties = ChartProperties.new()
properties.colors.frame = Color("#161a1d")
properties.colors.background = Color.TRANSPARENT
properties.colors.grid = Color("#283442")
properties.colors.ticks = Color("#283442")
properties.colors.text = Color.WHITE_SMOKE
properties.draw_bounding_box = false
properties.title = "Air Quality Monitoring"
properties.x_label = "Time"
properties.y_label = "Sensor values"
properties.x_scale = 5
properties.y_scale = 10
properties.interactive = true # false by default, it allows the chart to create a tooltip to show point values and interecept clicks on the plot
var options = Function.new( # Function is a weird name for trace options
x, y, "Pressure",
{
color = Color("#36a2eb"),
marker = Function.Marker.CIRCLE,
type = Function.Type.LINE,
interpolation = Function.Interpolation.STAIR
}
)
chart.plot([options], properties)
The scene looks like this: The setup is available here: https://github.com/Charles-Zhang-Godot/Sample_Plotting_with_EasyChart/tree/main/templates/line_chart_template |
Hi, and welcome. |
Videos would be helpful! |
you are welcome! |
Describe the solution you'd like
Thanks for the library! The functionalities seems promising and the examples are cool but I have difficulty setting things up from scratch.
In below I am referring to Godot 4.2
Describe an implementation suggestion
From the Wiki page https://github.com/fenix-hub/godot-engine.easy-charts/wiki/Static-and-Dynamic-data-plotting-with-PieChart it mentioned two functions
plot_from_csv()
andplot_from_array()
- but none of those exist in the current code base at all.Can you please update the wiki with a very basic Getting Started - in an empty Godot project, how does one add and make use of your library, e.g. to draw a simple line chart?
Thanks!
Additional context
The text was updated successfully, but these errors were encountered: