* fixed fill for area chart stacked and title for charts where it wasn't in plugins yet
* Chart defined in utils
* added radar skip points example in the overview to go to
function updateConfigAsNewObject(chart) {
chart.options = {
responsive: true,
- title: {
- display: true,
- text: 'Chart.js'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js'
+ }
},
scales: {
x: {
type: 'line',
// data: ...
options: {
- title: {
- display: true,
- text: 'Chart Title'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart Title'
+ }
},
scales: {
x: {
}]
},
options: {
- title: {
- display: true,
- text: 'Chart.js Line Chart - Animation Progress Bar'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Line Chart - Animation Progress Bar'
+ }
},
animation: {
duration: 2000,
}]
},
options: Chart.helpers.merge(options, {
- title: {
- text: 'fill: ' + boundary,
- display: true
- }
+ plugins: {
+ title: {
+ text: 'fill: ' + boundary,
+ display: true
+ }
+ },
})
});
});
randomScalingFactor(),
randomScalingFactor()
],
+ fill: true
}, {
label: 'My Second dataset',
borderColor: window.chartColors.blue,
randomScalingFactor(),
randomScalingFactor()
],
+ fill: true
}, {
label: 'My Third dataset',
borderColor: window.chartColors.green,
randomScalingFactor(),
randomScalingFactor()
],
+ fill: true
}, {
label: 'My Fourth dataset',
borderColor: window.chartColors.yellow,
randomScalingFactor(),
randomScalingFactor()
],
+ fill: true
}]
},
options: {
type: 'bar',
data: barChartData,
options: {
- plugin: {
+ plugins: {
title: {
display: true,
text: 'Chart.js Bar Chart - Stacked'
mode: 'index'
},
stacked: false,
- title: {
- display: true,
- text: 'Chart.js Line Chart - Multi Axis'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Line Chart - Multi Axis'
+ }
},
scales: {
y: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: details.label,
+ plugins: {
+ title: {
+ display: true,
+ text: details.label,
+ }
}
}
};
labels: {
generateLabels: function(chart) {
// Get the default label list
- var original = Chart.defaults.controllers.pie.legend.labels.generateLabels;
+ var original = Chart.defaults.controllers.pie.plugins.legend.labels.generateLabels;
var labels = original.call(this, chart);
// Build an array of colors used in the datasets of the chart
}]
},
options: {
- title: {
- display: true,
- text: 'Chart.js Radar Chart - Skip Points'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Radar Chart - Skip Points'
+ }
},
elements: {
line: {
type: 'scatter',
data: scatterChartData,
options: {
- title: {
- display: true,
- text: 'Chart.js Scatter Chart'
- },
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Scatter Chart'
+ }
+ }
}
});
};
intersect: true,
mode: 'nearest'
},
- title: {
- display: true,
- text: 'Chart.js Scatter Chart - Multi Axis'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Scatter Chart - Multi Axis'
+ }
},
scales: {
x: {
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="icon" href="favicon.ico">
<script src="samples.js"></script>
+ <script src="../dist/chart.min.js"></script>
<script src="utils.js"></script>
<title>Chart.js samples</title>
</head>
}, {
title: 'Radar',
path: 'charts/radar.html'
+ }, {
+ title: 'Radar skip points',
+ path: 'charts/radar-skip-points.html'
}, {
title: 'Combo bar/line',
path: 'charts/combo-bar-line.html'
data: scatterChartData,
options: {
responsive: true,
- title: {
- display: true,
- text: title
+ plugins: {
+ title: {
+ display: true,
+ text: title
+ }
},
+
scales: {
x: {
position: xPosition,
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Chart.js Line Chart - X-Axis Filter'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Line Chart - X-Axis Filter'
+ }
},
scales: {
x: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: title
+ plugins: {
+ title: {
+ display: true,
+ text: title
+ }
},
scales: {
x: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Grid Line Settings'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Grid Line Settings'
+ }
},
scales: {
y: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Grid Line Settings'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Grid Line Settings'
+ }
},
scales: {
y: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Min and Max Settings'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Min and Max Settings'
+ }
},
scales: {
y: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Chart.js Line Chart - Logarithmic'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Line Chart - Logarithmic'
+ }
},
scales: {
x: {
type: 'scatter',
data: scatterChartData,
options: {
- title: {
- display: true,
- text: 'Chart.js Scatter Chart - Logarithmic X-Axis'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Scatter Chart - Logarithmic X-Axis'
+ }
},
scales: {
x: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Chart with Multiline Labels'
- },
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart with Multiline Labels'
+ }
+ }
}
};
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Chart with Non Numeric Y Axis'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart with Non Numeric Y Axis'
+ }
},
scales: {
x: {
}]
},
options: {
- title: {
- text: 'Chart.js Combo Time Scale'
+ plugins: {
+ title: {
+ text: 'Chart.js Combo Time Scale',
+ display: true
+ }
},
scales: {
x: {
options: {
spanGaps: 1000 * 60 * 60 * 24 * 2, // 2 days
responsive: true,
- title: {
- display: true,
- text: 'Chart.js Time - spanGaps: 172800000 (2 days in ms)'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Time - spanGaps: 172800000 (2 days in ms)'
+ }
},
scales: {
x: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Chart.js Time Point Data'
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Time Point Data'
+ }
},
scales: {
x: {
}]
},
options: {
- title: {
- text: 'Chart.js Time Scale'
+ plugins: {
+ title: {
+ text: 'Chart.js Time Scale',
+ display: true
+ }
},
scales: {
x: {
},
options: {
responsive: true,
- title: {
- display: true,
- text: 'Chart.js Line Chart - ' + type
+ plugins: {
+ title: {
+ display: true,
+ text: 'Chart.js Line Chart - ' + type
+ }
},
scales: {
x: {