Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:graphs_or_charts [2018/12/31 04:55] – [Simple XY Line Chart] ttzhou | wiki:graphs_or_charts [2019/03/31 00:37] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| This plugin accepts the same JavaScript object that C3 takes to generate a chart. Any chart describable by a static JavaScript object is supported. All types of charts natively supported by C3 can be rendered, such as line/ | This plugin accepts the same JavaScript object that C3 takes to generate a chart. Any chart describable by a static JavaScript object is supported. All types of charts natively supported by C3 can be rendered, such as line/ | ||
| + | <alert info>To add captions to figures or tables, please see [[: | ||
| ===== Usages ===== | ===== Usages ===== | ||
| Example graphs could be found at [[https:// | Example graphs could be found at [[https:// | ||
| Line 44: | Line 45: | ||
| < | < | ||
| <c3> | <c3> | ||
| - | // some comment | + | |
| - | | + | columns: [ |
| - | columns: [ | + | [' |
| - | [' | + | ], |
| - | [' | + | type : 'bar', |
| - | ], | + | }, |
| - | type : 'line', | + | axis: { |
| - | }, | + | |
| - | axis: { | + | |
| x: { | x: { | ||
| - | type: 'indexed', | + | type: 'category', |
| - | categories: [' | + | categories: [' |
| } | } | ||
| - | } | + | }/c3> |
| - | </c3> | + | |
| </ | </ | ||
| Line 64: | Line 62: | ||
| <c3> | <c3> | ||
| - | // some comment | + | |
| - | | + | columns: [ |
| - | columns: [ | + | [' |
| - | [' | + | ], |
| - | [' | + | type : 'bar', |
| - | ], | + | }, |
| - | type : 'line', | + | axis: { |
| - | }, | + | |
| - | axis: { | + | |
| x: { | x: { | ||
| - | type: 'indexed', | + | type: 'category', |
| - | categories: [' | + | categories: [' |
| } | } | ||
| } | } | ||
| Line 183: | Line 179: | ||
| columns: [ | columns: [ | ||
| [' | [' | ||
| - | [' | + | [' |
| ], | ], | ||
| axes: { | axes: { | ||
| data1: ' | data1: ' | ||
| - | data2: ' | + | data2: ' |
| - | } | + | }, |
| }, | }, | ||
| axis: { | axis: { | ||
| + | y: { | ||
| + | show: true, | ||
| + | label: 'Axis Y', | ||
| + | }, | ||
| y2: { | y2: { | ||
| - | show: true | + | show: true, |
| - | } | + | label: 'Axis Y2', |
| + | }, | ||
| } | } | ||
| </c3> | </c3> | ||
| Line 204: | Line 205: | ||
| columns: [ | columns: [ | ||
| [' | [' | ||
| - | [' | + | [' |
| ], | ], | ||
| axes: { | axes: { | ||
| data1: ' | data1: ' | ||
| - | data2: ' | + | data2: ' |
| - | } | + | }, |
| }, | }, | ||
| axis: { | axis: { | ||
| + | y: { | ||
| + | show: true, | ||
| + | label: 'Axis Y', | ||
| + | }, | ||
| y2: { | y2: { | ||
| - | show: true | + | show: true, |
| - | } | + | label: 'Axis Y2', |
| + | }, | ||
| } | } | ||
| </c3> | </c3> | ||