TableToChartJS

Редактировал(а) Админ 2024/06/24 16:28

Description

Draws charts using Chart.js and the data from a table.

Usage

(% id="myTable" %)
|=Header1|=Header2
|label|numeric value
...

{{tableToChartJS type="..." table="myTable" /}}

Parameters

          

NameDescriptionMandatoryDefault
type

The type of chart. Choose from: line, bar, radar, pie, doughnut, polarArea, bubble, scatter.

Yes
multipleDataSets

Whether the specified table includes multiple data sets.

Nofalse
table

Identifies the source table.

Yes
dataSetLabel

The index of the table column that represents the data set label.

No
options

Advanced chart options specified as JSON. Please refer to the documentation of the same 'option' parameter of the ChartJS macro.

No
width

Width of the generated chart.

No
height

Height of the generated chart.

No
cssClass

Additional CSS class to be added to the chart container.

No
title

Chart title, added as aria-label to the generated canvas

No
id

Chart identifier

No

Examples

Single Data Set

Issue TypeCount
Bug23
Improvement17
New Feature9
Ideas0

Multiple Data Sets

Issue TypeCKEditorDiagram
Bug2534
Improvement1711
New Feature56
Ideas00
Month20162017
January6561
February5973
March8082
April8169
May5670
June5558
July4047
Month20162017
Eating6528
Running40100
Cycling5527
Coding5696
Designing8119
Sleeping9040
Drinking5948

Merged Data Sets

Issue TypeProjectCount
BugCKEditor23
BugDiagram34
ImprovementCKEditor17
ImprovementDiagram11
New FeatureCKEditor5
New FeatureDiagram6