Skip to content

Commit dbaac43

Browse files
committed
Add commented out sample, order sub cats alphabetically
1 parent d45d49b commit dbaac43

File tree

2 files changed

+179
-43
lines changed

2 files changed

+179
-43
lines changed

docs/.vuepress/config.js

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -134,40 +134,40 @@ module.exports = {
134134
{
135135
title: 'Bar Charts',
136136
children: [
137-
'bar/vertical',
137+
'bar/border-radius',
138+
'bar/floating',
138139
'bar/horizontal',
139140
'bar/stacked',
140141
'bar/stacked-groups',
141-
'bar/floating',
142-
'bar/border-radius',
142+
'bar/vertical',
143143
]
144144
},
145145
{
146146
title: 'Line Charts',
147147
children: [
148+
'line/interpolation',
148149
'line/line',
149150
'line/multi-axis',
151+
'line/point-styling',
152+
'line/segments',
150153
'line/stepped',
151-
'line/interpolation',
152154
'line/styling',
153-
// 'line/point-styling',
154-
'line/segments',
155155
]
156156
},
157157
{
158158
title: 'Other charts',
159159
children: [
160160
'other-charts/bubble',
161-
'other-charts/scatter',
162-
'other-charts/scatter-multi-axis',
161+
'other-charts/combo-bar-line',
163162
'other-charts/doughnut',
164-
'other-charts/pie',
165163
'other-charts/multi-series-pie',
164+
'other-charts/pie',
166165
'other-charts/polar-area',
167166
'other-charts/polar-area-center-labels',
168167
'other-charts/radar',
169168
'other-charts/radar-skip-points',
170-
'other-charts/combo-bar-line',
169+
'other-charts/scatter',
170+
'other-charts/scatter-multi-axis',
171171
'other-charts/stacked-bar-line',
172172
]
173173
},
@@ -188,29 +188,29 @@ module.exports = {
188188
'scales/linear-min-max-suggested',
189189
'scales/linear-step-size',
190190
'scales/log',
191+
'scales/stacked',
191192
'scales/time-line',
192193
'scales/time-max-span',
193194
'scales/time-combo',
194-
'scales/stacked'
195195
]
196196
},
197197
{
198198
title: 'Scale Options',
199199
children: [
200+
'scale-options/center',
200201
'scale-options/grid',
201202
'scale-options/ticks',
202203
'scale-options/titles',
203-
'scale-options/center'
204204
]
205205
},
206206
{
207207
title: 'Legend',
208208
children: [
209-
'legend/position',
210-
'legend/title',
211-
'legend/point-style',
212209
'legend/events',
213210
'legend/html',
211+
'legend/point-style',
212+
'legend/position',
213+
'legend/title',
214214
]
215215
},
216216
{
@@ -227,20 +227,20 @@ module.exports = {
227227
}, {
228228
title: 'Tooltip',
229229
children: [
230-
'tooltip/position',
231-
'tooltip/interactions',
232-
'tooltip/point-style',
233230
'tooltip/content',
234231
'tooltip/html',
232+
'tooltip/interactions',
233+
'tooltip/point-style',
234+
'tooltip/position',
235235
]
236236
},
237237
{
238238
title: 'Scriptable Options',
239239
children: [
240240
'scriptable/bar',
241241
'scriptable/bubble',
242-
'scriptable/pie',
243242
'scriptable/line',
243+
'scriptable/pie',
244244
'scriptable/polar',
245245
'scriptable/radar',
246246
]
@@ -259,20 +259,20 @@ module.exports = {
259259
title: 'Advanced',
260260
children: [
261261
'advanced/data-decimation',
262-
'advanced/progress-bar',
263-
'advanced/radial-gradient',
264-
'advanced/linear-gradient',
265-
'advanced/programmatic-events',
266262
'advanced/derived-axis-type',
267263
'advanced/derived-chart-type',
264+
'advanced/linear-gradient',
265+
'advanced/programmatic-events',
266+
'advanced/progress-bar',
267+
'advanced/radial-gradient',
268268
]
269269
},
270270
{
271271
title: 'Plugins',
272272
children: [
273273
'plugins/chart-area-border',
274-
'plugins/quadrants',
275274
'plugins/doughnut-empty-state',
275+
'plugins/quadrants',
276276
]
277277
},
278278
'utils'
@@ -292,11 +292,11 @@ module.exports = {
292292
{
293293
title: 'General',
294294
children: [
295-
'general/data-structures',
296295
'general/accessibility',
297-
'general/options',
298296
'general/colors',
297+
'general/data-structures',
299298
'general/fonts',
299+
'general/options',
300300
'general/padding',
301301
'general/performance'
302302
]
@@ -305,33 +305,33 @@ module.exports = {
305305
title: 'Configuration',
306306
children: [
307307
'configuration/',
308-
'configuration/responsive',
308+
'configuration/animations',
309+
'configuration/canvas-background',
310+
'configuration/decimation',
309311
'configuration/device-pixel-ratio',
310-
'configuration/locale',
312+
'configuration/elements',
311313
'configuration/interactions',
312-
'configuration/canvas-background',
313-
'configuration/animations',
314314
'configuration/layout',
315315
'configuration/legend',
316-
'configuration/title',
316+
'configuration/locale',
317+
'configuration/responsive',
317318
'configuration/subtitle',
319+
'configuration/title',
318320
'configuration/tooltip',
319-
'configuration/elements',
320-
'configuration/decimation'
321321
]
322322
},
323323
{
324324
title: 'Chart Types',
325325
children: [
326-
'charts/line',
326+
'charts/area',
327327
'charts/bar',
328-
'charts/radar',
328+
'charts/bubble',
329329
'charts/doughnut',
330+
'charts/line',
331+
'charts/mixed',
330332
'charts/polar',
331-
'charts/bubble',
333+
'charts/radar',
332334
'charts/scatter',
333-
'charts/area',
334-
'charts/mixed'
335335
]
336336
},
337337
{
@@ -365,13 +365,13 @@ module.exports = {
365365
children: [
366366
'developers/',
367367
'developers/api',
368-
['api/', 'TypeDoc'],
369-
'developers/updates',
370-
'developers/plugins',
371-
'developers/charts',
372368
'developers/axes',
369+
'developers/charts',
373370
'developers/contributing',
374-
'developers/publishing'
371+
'developers/plugins',
372+
'developers/publishing',
373+
['api/', 'TypeDoc'],
374+
'developers/updates',
375375
]
376376
},
377377
],

docs/samples/line/point-styling.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Point Styling
2+
3+
```js chart-editor
4+
// <block:actions:2>
5+
const actions = [
6+
{
7+
name: 'pointStyle: circle (default)',
8+
handler: (chart) => {
9+
chart.data.datasets.forEach(dataset => {
10+
dataset.pointStyle = 'cirlce';
11+
});
12+
chart.update();
13+
}
14+
},
15+
{
16+
name: 'pointStyle: cross',
17+
handler: (chart) => {
18+
chart.data.datasets.forEach(dataset => {
19+
dataset.pointStyle = 'cross';
20+
});
21+
chart.update();
22+
}
23+
},
24+
{
25+
name: 'pointStyle: crossRot',
26+
handler: (chart) => {
27+
chart.data.datasets.forEach(dataset => {
28+
dataset.pointStyle = 'crossRot';
29+
});
30+
chart.update();
31+
}
32+
},
33+
{
34+
name: 'pointStyle: dash',
35+
handler: (chart) => {
36+
chart.data.datasets.forEach(dataset => {
37+
dataset.pointStyle = 'dash';
38+
});
39+
chart.update();
40+
}
41+
},
42+
{
43+
name: 'pointStyle: line',
44+
handler: (chart) => {
45+
chart.data.datasets.forEach(dataset => {
46+
dataset.pointStyle = 'line';
47+
});
48+
chart.update();
49+
}
50+
},
51+
{
52+
name: 'pointStyle: rect',
53+
handler: (chart) => {
54+
chart.data.datasets.forEach(dataset => {
55+
dataset.pointStyle = 'rect';
56+
});
57+
chart.update();
58+
}
59+
},
60+
{
61+
name: 'pointStyle: rectRounded',
62+
handler: (chart) => {
63+
chart.data.datasets.forEach(dataset => {
64+
dataset.pointStyle = 'rectRounded';
65+
});
66+
chart.update();
67+
}
68+
},
69+
{
70+
name: 'pointStyle: rectRot',
71+
handler: (chart) => {
72+
chart.data.datasets.forEach(dataset => {
73+
dataset.pointStyle = 'rectRot';
74+
});
75+
chart.update();
76+
}
77+
},
78+
{
79+
name: 'pointStyle: star',
80+
handler: (chart) => {
81+
chart.data.datasets.forEach(dataset => {
82+
dataset.pointStyle = 'star';
83+
});
84+
chart.update();
85+
}
86+
},
87+
{
88+
name: 'pointStyle: triangle',
89+
handler: (chart) => {
90+
chart.data.datasets.forEach(dataset => {
91+
dataset.pointStyle = 'triangle';
92+
});
93+
chart.update();
94+
}
95+
}
96+
];
97+
// </block:actions>
98+
99+
// <block:setup:1>
100+
const data = {
101+
labels: ['Day 1', 'Day 2', 'Day 3', 'Day 4', 'Day 5', 'Day 6'],
102+
datasets: [
103+
{
104+
label: 'Dataset',
105+
data: Utils.numbers({count: 6, min: -100, max: 100}),
106+
borderColor: Utils.CHART_COLORS.red,
107+
backgroundColor: Utils.transparentize(Utils.CHART_COLORS.red, 0.5),
108+
pointStyle: 'circle',
109+
pointRadius: 10,
110+
pointHoverRadius: 15
111+
}
112+
]
113+
};
114+
// </block:setup>
115+
116+
// <block:config:0>
117+
const config = {
118+
type: 'line',
119+
data: data,
120+
options: {
121+
responsive: true,
122+
plugins: {
123+
title: {
124+
display: true,
125+
text: (ctx) => 'Point Style: ' + ctx.chart.data.datasets[0].pointStyle,
126+
}
127+
}
128+
}
129+
};
130+
// </block:config>
131+
132+
module.exports = {
133+
actions: actions,
134+
config: config,
135+
};
136+
```

0 commit comments

Comments
 (0)