score:0
Accepted answer
I am thinking you want to change the type of the chart using angular-chart from line to pie etc. The angular-chart provides dynamically changing chart not based on class but on another attribute chart-type
.
Here is a JsFiddle where I am changing the graphtype dynamically using a timeout. Hope it might help
score:0
Your js fiddle says:
var vm = this;
but it should be:
var vm = $scope;
Your jsfiddle works if you change this because putting the below styles in the css shows that the class name has been applied
.chart{
border: 3px solid red;
}
.chart-line{
background-color: purple;
}
Source: stackoverflow.com
Related Query
- Truncating canvas labels in ChartJS while keeping the full label value in the tooltips
- Angular-chartjs expression/value inside canvas class
- Order and hide items of legend by value with Chartjs Angular
- Angular 6 ChartJS create canvas dynamically and create graph on it - an example?
- Angular 6: chartjs value not updating with dynamic value update
- ChartJs does not render chart when binding canvas id in Angular
- Angular how to display data inside every part of doughnut chartjs
- LinearGradient doesnt't work on chartJs canvas for Angular
- Placeholder on canvas of ChartJs and Angular
- Adding Image inside Linechart points in ChartJs
- Canvas static height Chartjs
- ChartJS canvas not displaying rgba colors in IE, Safari and Firefox
- chartjs tooltip is cut off when out of canvas
- Show bar with zero value in ChartJs v2
- chartjs datalabels change font and color of text displaying inside pie chart
- ChartJS Line Graph - Multiple Lines, Show one Value on Tooltip
- Chart.js v2 charts do not display inside angular 2 (but Chart.js v1 works perfectly)
- ChartJS with AngularJS - Canvas won't display anything
- Why isn't my Angular 4 ChartJS component rendering?
- ChartJs canvas showing previous graph when changing Graph types
- ChartJS won't draw graph inside bootstrap tab until window resize
- How do I fix over limit y axis value in ChartJS
- chartjs - Drawing vertical line on integer x axis value
- Create a rounded bar graph with Angular and chartJS
- Map event position to y axis value in chartjs line chart
- Datalabels plugin chartjs showing '[object]' instead of value
- how to change Y axis value dynamically based on user input in Chartjs for Line chart?
- chartjs Line chart: scale respect value on x-axis
- How can I force my ChartJS canvas legend to stay in a single column?
- Update charts in chartjs and angular
More Query from same tag
- how to reset the graph/chart after zoomin, pan using chartjs
- How to pass variable (list) to JavaScript in Django?
- Change value from 0 to something on tooltip only
- Display multiple chart.js charts using for loop in Django template
- Why my ng2-chart data isn't scaled properly?
- chart.js data wont update
- How to chart detected activities on the hour using Chart.js
- How to plot a single value with line in line chart graph using charts.js?
- add editable textbox to specific datapoint in a chart
- How to install Chart.js and angular-chart.js (Error: Chart.js library needs to be included)
- Chartjs not rendering in navigation stack
- Chart.js How to get min-max values of X axis?
- Draw points and lines inside a bar in bar chart
- Chart.js StackedBar doesn't show labels on bar and maximum y-value
- Laravel 5.6 using laracharts. Chart wont render
- ChartJS Bar Chart not respecting disabled legend when using cdn
- Angular-chart.js click on bar and change it's background color
- Chart.js and Angular 8 - Dynamically updating Chart.js labels and data from *ngfor
- Draw y-axis inside the graph area with chart js
- Unable to Draw Chart using ChartJS
- Hide/disable tootlip on specific graph values
- ChartJS with AngularJS
- How to create a chart that uses strings for both the X and Y axes?
- How do I draw horizontal bars with a label using either ChartJS or D3?
- Chart.js display x axis labels ON ticks in bar chart, not between
- PHP render stacked area chart of JSON dataset
- How to use Chart.js in Nodejs?
- chart.js fixed bar width issue
- Failed to create chart
- ChartJS and Flask, how to pass data?