score:3
Accepted answer
you can include it as bower
dependency with bower install
command.
after including it to the project,in ember-cli-build.js
file, use app.import
to add it to build as following (please check the path):
app.import('bower_components\chartjs-plugin-annotation\chartjs-plugin-annotation.min.js');
if you don't want to use bower
and if you prefer npm
, then have a look at broccoli family. it is a bit long way.
score:0
add npm package
ember install ember-auto-import
ember-cli-build.js
/* eslint-env node */
'use strict';
const emberapp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new emberapp(defaults, {
autoimport: {
alias: {
'chartjs-plugin-datalabels': 'chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.js',
},
}
});
return app.totree();
};
import in component-name.js
import 'chartjs-plugin-datalabels'
Source: stackoverflow.com
Related Query
- How to include chart js annotations in ember?
- How to print a chart rendered by code
- How do I destroy/update Chart Data in this chart.js code example?
- How to run Chart.js samples using source code
- how to not repeat code while creating multiple charts in chart js
- How to add text inside the doughnut chart using Chart.js?
- How to clear a chart from a canvas so that hover events cannot be triggered?
- Chart.js - How to set a line chart dataset as disabled on load
- chart js 2 how to set bar width
- How can labels/legends be added for all chart types in chart.js (chartjs.org)?
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- How can I make two of my lines in Chart JS thicker
- How to prevent first/last bars from being cut off in a chart with time scale
- How set color family to pie chart in chart.js
- Chart.js Bar Chart - how to chart bars from 0
- How to add an on click event to my Line chart using Chart.js
- Chart.js how to show cursor pointer for labels & legends in line chart
- How do you hide the title of a chart tooltip?
- How to put rounded corners on a Chart.js Bar chart
- chartjs : how to set custom scale in bar chart
- How can I make a stepline or stepped chart in chart.js or D3?
- How to save Chart JS charts as image without black background using blobs and filesaver?
- How to Draw Gantt chart using chart js or other libraries
- How to fix chart Legends width-height with overflow scroll in ChartJS
- How to display Line Chart dataset point labels with Chart.js?
- chart js how to fill legend box with colour
- How to add an offset to a dataset in Chart js
- How to add second Y-axis for Bar and Line chart in Chart.js?
- How to add text in centre of the doughnut chart using Chart.js?
- How to create stacked bar chart using react-chartjs-2?
More Query from same tag
- Chartjs 3 ToolTip styling is not being picked up
- ReactJS Components Not loading unless you reload the site for the 2nd time
- ChartJS 3+ x-axis only showing full moment object instead of just month
- Chartjs v2.7 - combo chart with time-series (financial) data; bar width's are irregular
- Chart.js not working - Uncaught RefernceError:
- Multipe doughnut charts on one page with text in center using Chart.js
- Create chart using one of the given javascript libraries
- How can I make my charts dynamic every time I choose an item from my dropdown?
- how to change default font family in react-chartjs-2
- ChartJS - Size of the point doesn't change
- Chartjs unexpected resize and crop after updating data. Using laravel blade view and Livewire
- Chart is not defined Node.js Chart.js
- Ng2-Charts in Angular: Is 'Auto' supported for display property of Axes
- Passing data from Python to JavaScript to plot Chart.js
- Chart.js v2 charts do not display inside angular 2 (but Chart.js v1 works perfectly)
- Chart.js remove label from legend for if dataset values
- How to make the x-axis start from zero in chartjs-plugin-streaming?
- ChartJS keeps resizing canvas to the default size
- How to resize chart.js graph dynamically for responsive sites?
- "<%=value%>" in javascript not ASP.net
- Bar chart legend adjustments - Chart JS
- Javascript and chart.js, how to add euro currency to y label
- How do I loop under Chart js in JavaScript for multiple axis?
- Multiple stacked bar chart using ChartJs
- How to have custom colors in ng2-charts and chart.js according to data?
- Chart.js canvas keeps shifting upwards if I add things below it? (Angular - Chart.JS - NG2Charts)
- Chart.js not showing data when pass dynamic labels
- ChartJS / MomentJS - Unable to remove deprecation warning. Graph not showing in firefox/opera
- Maximum call stack error when attempting to update Chart in Vue js
- Change <p> and <h> element when selecting something from dropdown