Closed bdbais closed 7 years ago
Result on page is:
<canvas id="type" ng-class="class_type" class="chart chart-xs ng-isolate-scope chart-pie" chart-data="data" chart-labels="labels" chart-options="options" chart-colors="colors" width="523" height="261" style="display: block; width: 523px; height: 261px;"></canvas>
and chart is empty/white.
ng-class
does not work to change directives on the fly, you need to use chart-base
class and change the chart-type
attribute. See "Dynamic chart" example at the bottom of http://jtblin.github.io/angular-chart.js/ for full example.
Hi I'm receiving graph from rest-api and I want to draw it depends of data:
on controller:
is it possible to refresh with new type of graph dynamicaly ?