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 :: async await map 
Javascript :: set timer 
Javascript :: react hook from 
Javascript :: round off value in javascript 
Javascript :: how to set array in javascript 
Javascript :: Force users to update your application in React Native 
Javascript :: what is observable in angular 
Javascript :: axios async await 
Javascript :: sweetalret 
Javascript :: materialze 
Javascript :: decode jwt token 
Javascript :: open source code 
Javascript :: string en javascript 
Javascript :: replace all swear words using bookmarklet 
Javascript :: formatt json to create node and child node react 
Javascript :: signup Using codegniter in ajax 
Javascript :: javascript firestore autoID 
Javascript :: recoilOutside npm 
Javascript :: working with binary and base64 data 
Javascript :: where to import guards in angular 
Javascript :: how to acces db knex 
Javascript :: Quentin Michael Allums age 
Javascript :: onclick confirm jquery anchor tag 
Javascript :: How to use browser-sync to serve files easily 
Javascript :: CFBundleShortVersionString in app.json 
Javascript :: mongodb install err npm 
Javascript :: android studio react native plugins 
Javascript :: js stringConstructor type 
Javascript :: open image in browser fit to screen with window.open 
Javascript :: route to change a part of component 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =