godot-engine.easy-charts
godot-engine.easy-charts copied to clipboard
Refactor plugin naming and structure (also according to gdscript style guide)
Some work has already been done and initiated by latest @JFerrerBeired PR, but further refactory is required. The main refactoring reasons are:
- adapt naming to gdscript style guide
- reorganize folder structure for better organization and approach
The final result of the folder structure should look like this:
⌞addons/easy_charts/
⌞control_charts/ (1)
⌞LineChart/ (2)
⌞line_chart.tscn
⌞line_chart.gd
⌞2d_charts/
⌞ 3d_charts/
⌞ utilities/
⌞classes/ (3)
⌞structures/
⌞data_frame/
⌞matrix/
⌞components/
⌞slice/
⌞point/
⌞rect/
⌞containers/ (4)
⌞legend/
⌞point_data/ --[rename]--> data_tooltip/
*notes
(1) all charts will be grouped based on their Node base class (Control
, Node2D
, Node3D
)
(2) while all files should follow the snake_case
convention for naming, it is easier to instance from editor charts if the folder has a PascalName
convention. This is due to the limit Godot has on instancing nodes (a class
can be added to the scene as a child Node, but a scene
needs to be instanced, and Charts are complex Scenes)
(3) the classes
folder will contain all custom classed used by the plugin. Classes are differentiated in structures
classes which only purpose is to hold data and enable operations, and components
classes which are the specific visual representations for data used in charts (PieChart
uses Slice
, ScatterChart
and LineChart
use Point
, etc).
(4) containers
are general purpose ui components shared among most of the charts and that accomplish specific functions