I have 2 types of charts bar and line. This is my view (in slim):
canvas#line.chart.chart-line(
ng-if="stateStats == 'global'"
chart-data="data"
chart-labels="labels"
chart-colours="colours"
)
canvas#bar.chart.chart-bar(
ng-if="stateStats != 'global' && data.length != 0"
chart-data="data"
chart-labels="labels"
chart-options="optionsBarChart"
)
My colours option:
$scope.colours = [{
fillColor: "rgba(151,187,205,0.2)",
strokeColor: "rgba(151,187,205,1)",
pointColor: "rgba(151,187,205,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(151,187,205,0.8)"
}];
My problem is that I can't change a color of displaying data on line-chart. And when I want to move cursor on the point - I have error:
Uncaught Error: Unable to parse color from object ["rgba(151,187,205,1)","rgba(220,220,220,1)"...] What I did wrong?
Please make sure that your data is on double array.
Ex:
data = [
[10, 20, 30, 20, 10]
];