I'm currently incorporating chart.js into my AngularJS project. I am attempting to define the borderWidth
as 1px
.
I have experimented with the following code:
this.chart = {
title: 'Threat Trends',
labels: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
series: ['Malware', 'Phishing'],
data: [this.app.malwareSiteCountWeekly, this.app.phishingSiteCountWeekly],
options: {
legend: {
display: true,
position: 'bottom'
}
},
borderWidth: 1,
colors : [this.app.theme.primary, this.app.theme.secondary],
type: 'bar'
};
Additionally, I implemented the following HTML snippet:
<canvas
id="bar"
class="chart chart-bar"
chart-data="$ctrl.chart.data"
chart-type="bar"
chart-colors="$ctrl.chart.colors"
chart-labels="$ctrl.chart.labels"
chart-series="$ctrl.chart.series"
chart-options="$ctrl.chart.options"
chart-dataset-override="preOverride">
</canvas>
Unfortunately, I continuously encounter issues like those shown in this https://i.sstatic.net/QpzFx.png. Can anyone provide me with some guidance on how to resolve this?