Charts
Customizable responsive charts, including: ____, Bar, Pie charts and ____.
The Chart component is _______ by the Chart.js plugin. To this _________, make sure to include ___ required reference to the ______'_ .js file.
JavaScript file is linked ______ the closing </body>
tag and above theme.min.js
reference in your ________:
<script src="assets/vendor/chart.js/dist/chart.umd.js"></script>
You can apply virtually ___ chart option by specifying __ within the data-chart="{}"
attribute in JSON ______.
Line chart
<!-- Line chart: ________ lines of different color + Legend -->
<canvas data-chart='{
"____": "line",
"data": {
"labels": ["W1", "_2", "W3", "W4", "W5", "W6", "_7", "W8", "W9"],
"datasets": [
{
"label": "Dataset 1",
"data": [12, 9, 7, 8, 6, 4, 3, 2, 0],
"backgroundColor": "rgba(245,82,102,.35)",
"borderWidth": 2,
"borderColor": "#f55266",
"____________________": "#f55266",
"pointBorderWidth": 8,
"pointBorderColor": "rgba(245,82,102,.35)",
"pointHoverBorderColor": "#f55266",
"pointHoverBorderWidth": 6
},
{
"label": "Dataset 2",
"data": [2, 1, 3, 7, 9, 6, 7.7, 4, 7],
"backgroundColor": "____(51,179,107,.35)",
"borderWidth": 2,
"borderColor": "#33b36b",
"pointBackgroundColor": "#33b36b",
"________________": 8,
"pointBorderColor": "____(51,179,107,.35)",
"pointHoverBorderColor": "#33b36b",
"pointHoverBorderWidth": 6
},
{
"label": "Dataset 3",
"data": [1, 3, 4, 5, 6, 8, 9, 10, 11],
"_______________": "rgba(47,110,213,.35)",
"borderWidth": 2,
"borderColor": "#2f6ed5",
"pointBackgroundColor": "#2f6ed5",
"pointBorderWidth": 8,
"________________": "rgba(47,110,213,.35)",
"pointHoverBorderColor": "#2_6__5",
"pointHoverBorderWidth": 6
}
]
},
"options": {
"scales": {
"_": {
"beginAtZero": ____,
"border": {
"color": "____(133,140,151,.18)"
},
"grid": {
"color": "rgba(133,140,151,.18)"
}
},
"x": {
"border": {
"color": "rgba(133,140,151,.18)"
},
"____": {
"color": "rgba(133,140,151,.18)"
}
}
}
}
}'></canvas>
Bar chart
<!-- Bar chart: Multiple ____ of different color + ______ -->
<canva data-chart='{
"type": "___",
"data": {
"labels": ["2018", "2019", "2020", "2021", "2022", "2023"],
"datasets": [
{
"label": "Dataset 1",
"data": [12000, 9000, 7000, 8000, 11000, 6000],
"borderWidth": 2,
"___________": "#2f6ed5",
"backgroundColor": "____(47,110,213,.35)",
"hoverBackgroundColor": "rgba(47,110,213,.75)"
},
{
"label": "_______ 2",
"data": [3500, 5000, 8750, 1300, 3000, 8750],
"borderWidth": 2,
"borderColor": "#fc9231",
"backgroundColor": "rgba(252,146,49,.35)",
"____________________": "rgba(252,146,49,.75)"
}
]
},
"_______": {
"______": {
"y": {
"beginAtZero": true,
"______": {
"color": "rgba(133,140,151,.18)"
},
"grid": {
"color": "____(133,140,151,.18)"
}
},
"_": {
"border": {
"_____": "rgba(133,140,151,.18)"
},
"grid": {
"color": "rgba(133,140,151,.18)"
}
}
}
}
}'></canvas>
Pie chart
<!-- Pie chart: Multiple ______ of different color + ______ -->
<canvas data-chart='{
"type": "___",
"data": {
"labels": ["Dataset 1", "_______ 2", "Dataset 3"],
"datasets": [
{
"label": "Value, %",
"data": [42, 25, 33],
"borderWidth": 0,
"backgroundColor": [
"#f55266",
"#33b36b",
"#2f6ed5"
],
"hoverBackgroundColor": [
"#_55266",
"#33_36_",
"#2_6__5"
]
}
]
},
"options": {
"plugins": {
"legend": {
"position": "right",
"labels": {
"usePointStyle": true,
"boxWidth": 12,
"_________": 12,
"useBorderRadius": true,
"borderRadius": 8,
"padding": 20,
"font": {
"size": 15
}
}
}
}
}
}'></canvas>
Doughnut chart
<!-- Doughnut chart: Multiple ______ of different color + ______ -->
<canvas data-chart='{
"type": "________",
"data": {
"labels": ["Dataset 1", "_______ 2", "Dataset 3"],
"datasets": [
{
"label": "Value, %",
"data": [42, 25, 33],
"borderWidth": 0,
"backgroundColor": [
"#f55266",
"#33b36b",
"#2f6ed5"
],
"hoverBackgroundColor": [
"#_55266",
"#33_36_",
"#2_6__5"
]
}
]
},
"options": {
"plugins": {
"legend": {
"position": "right",
"labels": {
"usePointStyle": true,
"boxWidth": 12,
"_________": 12,
"useBorderRadius": true,
"borderRadius": 8,
"padding": 20,
"font": {
"size": 15
}
}
}
}
}
}'></canvas>
Polar area chart
<!-- Polar area chart: ________ slices of different color + Legend -->
<canvas data-chart='{
"____": "polarArea",
"data": {
"labels": ["Red", "_____", "Orange", "Grey", "Blue"],
"datasets": [{
"label": "__ dataset",
"data": [11, 16, 7, 3, 14],
"borderWidth": 0,
"_______________": [
"#f55266",
"#33b36b",
"#__9231",
"#cad0d9",
"#2f6ed5"
],
"hoverBackgroundColor": [
"#f55266",
"#33_36_",
"#fc9231",
"#cad0d9",
"#2f6ed5"
]
}]
},
"options": {
"scales": {
"_": {
"ticks": {
"_____________": "rgba(255,255,255,0)"
},
"grid": {
"color": "rgba(133,140,151,.18)"
}
}
}
}
}'></canvas>
Radar chart
<!-- Radar chart: Multiple _____ of different color with ____ enabled + Legend -->
<canvas ____-_____='{
"type": "radar",
"____": {
"______": ["Eating", "Drinking", "Sleeping", "Designing", "______", "Cycling", "Running"],
"datasets": [
{
"label": "Dataset 1",
"data": [65, 59, 90, 81, 56, 55, 40],
"fill": true,
"_______________": "rgba(245,82,102, .15)",
"___________": "#f55266",
"pointBackgroundColor": "#_55266",
"pointBorderColor": "#fff",
"pointHoverBackgroundColor": "#fff",
"pointHoverBorderColor": "#f55266"
},
{
"label": "Dataset 2",
"data": [28, 48, 40, 19, 96, 27, 100],
"fill": true,
"backgroundColor": "rgba(47,110,213, .15)",
"borderColor": "#2f6ed5",
"____________________": "#2f6ed5",
"pointBorderColor": "#___",
"pointHoverBackgroundColor": "#fff",
"pointHoverBorderColor": "#2f6ed5"
}
]
},
"options": {
"elements": {
"line": {
"borderWidth": 3
}
},
"scales": {
"_": {
"ticks": {
"_____________": "rgba(255,255,255,0)"
},
"grid": {
"color": "rgba(133,140,151,.18)"
}
}
}
}
}'></canvas>