Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove config and use dynamic imports for modules #460

Merged
merged 4 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = {
root: true,
parser: '@babel/eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
Expand All @@ -22,9 +22,6 @@ module.exports = {
env: {
browser: true,
},
globals: {
Highcharts: false,
},
rules: {},
overrides: [
// node files
Expand Down
45 changes: 2 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,57 +132,16 @@ You can add the `emberHighCharts` option to your `ember-cli-build.js` file to lo
var app = new EmberApp({
emberHighCharts: {
includeHighCharts: false,
includeHighStock: true,
includeHighMaps: false,
includeHighChartsMore: true,
includeHighCharts3D: true,
includeModules: ['map', 'broken-axis', 'heatmap', ... ]
/* Some available modules include:
boost, broken-axis, canvas-tools, data, drilldown, exporting, funnel,
heatmap, map, no-data-to-display, offline-exporting, solid-gauge, treemap.
*/
}
});
```
All modules can be found [here](https://github.com/highcharts/highcharts/tree/master/ts/masters/modules).

### Highstock
### Highstock, Highmaps, etc

Highcharts is already included in Highstock, so it is not necessary to load both.
Using the following configuration to load Highstock:

```js
var app = new EmberApp({
emberHighCharts: {
includeHighCharts: false,
includeHighStock: true
}
});
```

### Highmaps

Highcharts is not included in Highmaps. If you only need to use Highmaps use the following configuration:

```js
var app = new EmberApp({
emberHighCharts: {
includeHighCharts: false,
includeHighMaps: true
}
});
```

If you need to use Highmaps and Highcharts then use the following configuration:

```js
var app = new EmberApp({
emberHighCharts: {
includeHighCharts: true,
includeModules: ['map']
}
});
```
We now use dynamic imports to import the Highcharts packages you need based on the `mode` argument passed.


### Global Highcharts Config Options
Expand Down
10 changes: 3 additions & 7 deletions addon/components/high-charts.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<div class="highcharts-wrapper"
<div
class="highcharts-wrapper"
{{did-insert this.onDidInsert}}
{{did-update
this.onDidUpdate
content=this.content
chartOptions=this.chartOptions
mode=this.mode
}}
{{did-update this.onDidUpdate this.content this.chartOptions this.mode}}
...attributes
>
<div class="chart-container"></div>
Expand Down
141 changes: 0 additions & 141 deletions addon/components/high-charts.js

This file was deleted.

Loading
Loading