Available Chart ViewHelpers
The following ViewHelpers may be used to build charts:
- <c:barChart>
- <c:bubbleChart>
- <c:doughnutChart>
- <c:horizontalBarChart>
- <c:horizontalStackedBarChart>
- <c:lineChart>
- <c:pieChart>
- <c:polarAreaChart>
- <c:radarChart>
- <c:scatterBarChart>
- <c:stackedBarChart>
All of them have the same arguments.
Note
The types available in Charts.js are only bar, bubble, doughnut, line, pie, polarArea, radar, and scatter.
Therefore, the horizontalBarChart, horizontalStackedBarChart and stackedBarChart facilities were introduced to avoid the need to configure the bar type.
Example
<c:barChart id="1" data="data__barChartData" options="data__barChartOptions" width="600" height="400">
...
</c:barChart>
Copied!
Arguments
id
-
- Required
true
- Type
- string
Chart ID
data
-
- Required
true
- Type
- mixed
Data, or a reference to data
options
-
- Required
true
- Type
- mixed
Options, or a reference to options
width
-
- Type
- string
- Default
- 600
Width value, or a reference to the width value
height
-
- Type
- string
- Default
- 400
Height value, or a reference to the height value