Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

angular chart js

npm install angular-chart.js --save
Comment

angular-chart.js

<canvas id="myChart" width="400" height="400"></canvas>
<script>
const ctx = document.getElementById('myChart').getContext('2d');
const myChart = new Chart(ctx, {
    type: 'bar',
    data: {
        labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
        datasets: [{
            label: '# of Votes',
            data: [12, 19, 3, 5, 2, 3],
            backgroundColor: [
                'rgba(255, 99, 132, 0.2)',
                'rgba(54, 162, 235, 0.2)',
                'rgba(255, 206, 86, 0.2)',
                'rgba(75, 192, 192, 0.2)',
                'rgba(153, 102, 255, 0.2)',
                'rgba(255, 159, 64, 0.2)'
            ],
            borderColor: [
                'rgba(255, 99, 132, 1)',
                'rgba(54, 162, 235, 1)',
                'rgba(255, 206, 86, 1)',
                'rgba(75, 192, 192, 1)',
                'rgba(153, 102, 255, 1)',
                'rgba(255, 159, 64, 1)'
            ],
            borderWidth: 1
        }]
    },
    options: {
        scales: {
            y: {
                beginAtZero: true
            }
        }
    }
});
</script>
 
        Copied!
Comment

angular chart

<apx-chart [series]="series" [chart]="chart" [title]="title"></apx-chart>
Comment

PREVIOUS NEXT
Code Example
Javascript :: js text match 
Javascript :: how to print hello world in javascript 
Javascript :: sum up all the first and last digit of a number until only two digits are left 
Javascript :: Repeat a String Repeat a String-Javascript 
Javascript :: javascript recursive on object of arrays 
Javascript :: set function to execute at certain time js 
Javascript :: how add class to ckeditor image 
Javascript :: palindrome number 
Javascript :: lazy load npm package 
Javascript :: javascript sort 2d array 
Javascript :: cogo toast 
Javascript :: javascript url 
Javascript :: asking questions javascript in console 
Javascript :: run code in javascript 
Javascript :: vue for start at index 
Javascript :: react native layout animation android 
Javascript :: detect localstorage limit 
Javascript :: to array javascript 
Javascript :: Split string on the first white space occurrence 
Javascript :: back to top scroll animation jquery 
Javascript :: javascript closure interview questions 
Javascript :: multiple ternary operator javascript 
Javascript :: difference node and npm 
Javascript :: send data with emit angular 
Javascript :: spotify uri 
Javascript :: smtp testing server 
Javascript :: regex checker 
Javascript :: access an object js 
Javascript :: postman environment variable 
Javascript :: visual studio node.js mac 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =