Skip to content

Commit 3ff2b4e

Browse files
authored
Merge pull request #152 from moander/feature/md-ctors
Add Material Design Scatter and Line chart types.
2 parents c7e6ac7 + 3250134 commit 3ff2b4e

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

demo/index.html

+24-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,17 @@ <h2>Chart gallery</h2>
324324
cols='[{"label": "Month", "type": "string"},{"label": "Days", "type": "number"}]'
325325
rows='[["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30]]'>
326326
</google-chart>
327-
327+
328+
<p>Here's a material line chart:</p>
329+
330+
<google-chart
331+
id="line-chart-md"
332+
type="md-line"
333+
options='{"title": "Days in a month"}'
334+
cols='[{"label": "Month", "type": "string"},{"label": "Days", "type": "number"}]'
335+
rows='[["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30]]'>
336+
</google-chart>
337+
328338
<p>Here's a organization chart:</p>
329339

330340
<google-chart
@@ -363,6 +373,19 @@ <h2>Chart gallery</h2>
363373
[68, 15]]'>
364374
</google-chart>
365375

376+
<p>Here's a material scatter chart:</p>
377+
378+
<google-chart
379+
type="md-scatter"
380+
options='{"legend": "none"}'
381+
data='[["A", "B"],
382+
[20, 45],
383+
[31, 66],
384+
[50, 80],
385+
[77, 50],
386+
[68, 15]]'>
387+
</google-chart>
388+
366389
<p>Here's a stepped area chart:</p>
367390

368391
<google-chart

google-chart-loader.html

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
'line': {
4747
ctor: 'LineChart',
4848
},
49+
'md-line': {
50+
ctor: 'Line',
51+
pkg: 'line',
52+
},
4953
'org': {
5054
ctor: 'OrgChart',
5155
pkg: 'orgchart',
@@ -56,6 +60,10 @@
5660
'scatter': {
5761
ctor: 'ScatterChart',
5862
},
63+
'md-scatter': {
64+
ctor: 'Scatter',
65+
pkg: 'scatter',
66+
},
5967
'stepped-area': {
6068
ctor: 'SteppedAreaChart',
6169
},

0 commit comments

Comments
 (0)