
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
ember-highcharts
Advanced tools
A Highcharts component for Ember CLI.
Install the addon:
ember install:addon ember-highcharts
Depending on whether you want to use Highcharts, Highstock or Highmaps, install corresponding Bower package.
Do one of the following commands:
bower install --save highcharts-release
bower install --save highstock-release
bower install --save highmaps-release
3. In your Brocfile.js
, tell Broccoli to import the package you have just installed.
Add one of the following lines:
app.import('bower_components/highcharts-release/highcharts.src.js');
app.import('bower_components/highstock-release/highstock.src.js');
app.import('bower_components/highmaps-release/highmaps.src.js');
Depending on what Highcharts features you're gonna use, you might need to import additional files. Refer to Highcharts documentation.
In your template:
{{high-charts mode=chartMode content=chartData chartOptions=chartOptions}}
Then in a controller you can set the chartMode
, chartData
and chartOptions
values:
import Ember from 'ember';
export default Ember.Controller.extend({
chartMode: 'StockChart', // Available options: a falsy value, 'StockChart', 'Map'.
// If `mode` is not provided or is a falsy value, the chart is initialized in Charts mode.
// If `mode` is a string, it is passed to Highcharts as the first argument.
// When Highcharts introduces a new mode, you will be able to use it here right away.
chartOptions: {
chart: {
type: 'bar'
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['Apples', 'Bananas', 'Oranges']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
}
},
chartData: [
{
name: 'Jane',
data: [1, 0, 4]
}, {
name: 'John',
data: [5, 7, 3]
}
]
});
Ember-highcharts provides its own set of default configurations in
addon/utils/option-loader.js
. At runtime you can optionally configure custom
styles by providing a app/highcharts-configs/application.js
file. This
file should provide a hook that returns the final configuration.
// app/highcharts-configs/application.js
export default function(defaultOptions) {
defaultOptions.credits.href = 'http://www.my-great-chart.com';
defaultOptions.credits.text = 'great charts made cheap';
defaultOptions.credits.enabled = true;
return defaultOptions;
}
This add-on is built based on the gist and medium by @poteto
FAQs
A Highcharts, HighStock and HighMaps component for ember cli
The npm package ember-highcharts receives a total of 2,413 weekly downloads. As such, ember-highcharts popularity was classified as popular.
We found that ember-highcharts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.