-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
288 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
extends ScatterChart | ||
class_name LineChart | ||
|
||
func _draw_line(from: Point, to: Point, function_index: int) -> void: | ||
draw_line( | ||
from.position, | ||
to.position, | ||
chart_properties.get_function_color(function_index), | ||
chart_properties.line_width, | ||
true | ||
) | ||
|
||
func _draw_lines() -> void: | ||
for function in function_points.size(): | ||
for i in range(1, function_points[function].size()): | ||
_draw_line(function_points[function][i], function_points[function][i - 1], function) | ||
|
||
func _draw() -> void: | ||
if chart_properties.lines: | ||
_draw_lines() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://addons/easy_charts/control_charts/LineChart/line_chart.gd" type="Script" id=1] | ||
[ext_resource path="res://addons/easy_charts/control_charts/chart.tscn" type="PackedScene" id=2] | ||
|
||
[node name="LineChart" instance=ExtResource( 2 )] | ||
script = ExtResource( 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 2 additions & 20 deletions
22
addons/easy_charts/control_charts/ScatterChart/scatter_chart.tscn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://addons/easy_charts/control_charts/ScatterChart/scatter_chart.gd" type="Script" id=1] | ||
[ext_resource path="res://addons/easy_charts/control_charts/chart.tscn" type="PackedScene" id=2] | ||
|
||
[sub_resource type="StyleBoxFlat" id=1] | ||
bg_color = Color( 1, 1, 1, 1 ) | ||
|
||
[node name="ScatterChart" type="Control"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
[node name="ScatterChart" instance=ExtResource( 2 )] | ||
script = ExtResource( 1 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": true | ||
} | ||
|
||
[node name="Canvas" type="Control" parent="."] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
|
||
[node name="Label" type="Label" parent="."] | ||
visible = false | ||
margin_right = 40.0 | ||
margin_bottom = 14.0 | ||
custom_colors/font_color = Color( 0, 0, 0, 1 ) | ||
custom_styles/normal = SubResource( 1 ) |
Oops, something went wrong.