Skip to content

Commit f1c8d75

Browse files
committed
feat: Add x and y axis labels to chart example
Add descriptive labels to the chart axes: - X-axis: "Time" (for the time-based candlestick data) - Y-axis: "Price (USD)" (for Bitcoin price values) Updated chart.gx template and regenerated chart_gen.go with the new labels.
1 parent 7c6ac1d commit f1c8d75

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

examples/webgpu-chart/app_gen.go

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/webgpu-chart/chart.gx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package main
22

33
func BitcoinChart(data *ChartData) (Chart) {
44
Chart(ChartBackground(0.08, 0.09, 0.12, 1.0)) {
5-
XAxis(AxisPosition("bottom"), TimeScale(true), GridLines(true))
5+
XAxis(AxisPosition("bottom"), TimeScale(true), GridLines(true), Label("Time"))
66

7-
YAxis(AxisPosition("right"), GridLines(true))
7+
YAxis(AxisPosition("right"), GridLines(true), Label("Price (USD)"))
88

99
CandlestickSeries(
1010
ChartData(data.Bitcoin),

examples/webgpu-chart/chart_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)