Skip to content

Commit f5f3f79

Browse files
committed
document chart
1 parent a690b0a commit f5f3f79

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
267267
('ymin', 'The minimal value for the y-axis.', 'NUMBER', TRUE, TRUE),
268268
('ymax', 'The maximum value for the y-axis.', 'NUMBER', TRUE, TRUE),
269269
('labels', 'Whether to show the data labels on the chart or not.', 'BOOLEAN', TRUE, TRUE),
270+
('color', 'The name of a color in which to display the chart. If there are multiple series in the chart, this parameter can be repeated multiple times.', 'TEXT', TRUE, TRUE),
270271
('stacked', 'Whether to cumulate values from different series.', 'BOOLEAN', TRUE, TRUE),
271272
('logarithmic', 'Display the y-axis in logarithmic scale..', 'BOOLEAN', TRUE, TRUE),
272273
-- item level
@@ -277,11 +278,11 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
277278
('series', 'If multiple series are represented and share the same y-axis, this parameter can be used to distinguish between them.', 'TEXT', FALSE, TRUE)
278279
) x;
279280
INSERT INTO example(component, description, properties) VALUES
281+
('chart', 'An area chart', json('[{"component":"chart", "title": "Syracuse", "type": "area", "color": "indigo"}, '||
282+
'{"x":0,"y":15},{"x":1,"y":46},{"x":2,"y":23},{"x":3,"y":70},{"x":4,"y":35},{"x":5,"y":106}]')),
280283
('chart', 'A pie chart.', json('[{"component":"chart", "title": "Answers", "type": "pie", "labels": true}, '||
281284
'{"label": "Yes", "value": 65}, '||
282285
'{"label": "No", "value": 35}]')),
283-
('chart', 'An area chart', json('[{"component":"chart", "title": "Syracuse", "type": "area"}, '||
284-
'{"x":0,"y":15},{"x":1,"y":46},{"x":2,"y":23},{"x":3,"y":70},{"x":4,"y":35},{"x":5,"y":106}]')),
285286
('chart', 'A bar chart with multiple series.', json('[{"component":"chart", "title": "Expenses", "type": "bar", "stacked": true}, '||
286287
'{"series": "Marketing", "x": 2021, "value": 35}, '||
287288
'{"series": "Marketing", "x": 2022, "value": 15}, '||

0 commit comments

Comments
 (0)