Skip to content

Commit 8e5aebb

Browse files
committed
Merge branch 'release/2.0.2'
2 parents e580c17 + 0a62fed commit 8e5aebb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2603
-665
lines changed

README.md

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@ import { AppComponent } from './app.component';
2424
import { FusionChartsModule } from 'angular-fusioncharts';
2525

2626
// Import FusionCharts library and chart modules
27-
import FusionCharts from 'fusioncharts/core';
28-
import Column2d from 'fusioncharts/viz/column2d';
29-
import FusionTheme from 'fusioncharts/themes/es/fusioncharts.theme.fusion';
27+
import * as FusionCharts from 'fusioncharts';
28+
import * as Charts from 'fusioncharts/fusioncharts.charts';
29+
30+
// For Powercharts , Widgets, and Maps
31+
// import * as PowerCharts from 'fusioncharts/fusioncharts.powercharts';
32+
// import * as Widgets from 'fusioncharts/fusioncharts.widgets';
33+
// import * as Maps from 'fusioncharts/fusioncharts.maps';
34+
// To know more about suites,
35+
// read this https://www.fusioncharts.com/dev/getting-started/plain-javascript/install-using-plain-javascript
36+
37+
38+
// For Map definition files
39+
// import * as World from 'fusioncharts/maps/fusioncharts.world';
40+
41+
import * as FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion';
3042

3143
// Pass the fusioncharts library and chart modules
32-
FusionChartsModule.fcRoot(FusionCharts, Column2d, FusionTheme);
44+
FusionChartsModule.fcRoot(FusionCharts, Charts, FusionTheme);
3345

3446
@NgModule({
3547
declarations: [
@@ -45,9 +57,6 @@ FusionChartsModule.fcRoot(FusionCharts, Column2d, FusionTheme);
4557
})
4658
export class AppModule { }
4759
```
48-
NOTE : If you are using angular 2, please refer [Rendering chart in Angular 2](#Rendering-chart-in-Angular-2)
49-
50-
5160
Once the library is imported, you can use its components, directives in your Angular application:
5261

5362
In your Angular AppComponent:
@@ -113,7 +122,7 @@ Usage in template :
113122
width="600"
114123
height="350"
115124
type="Column2D"
116-
dataFormat="JSON"
125+
dataFormat="json"
117126
[dataSource]="dataSource"
118127
(dataplotRollOver)="plotRollOver($event)">
119128
</fusioncharts>
@@ -192,43 +201,15 @@ export class AppComponent {
192201
}
193202

194203
initialized($event){
195-
this.chart = $event.chart;
204+
this.chart = $event.chart; // Storing the chart instance
196205
}
197206

198207
changeLabel(){
199208
this.chart.setChartAttribute('caption', 'Changed caption');
200209
}
201210

202211
}
203-
```
204-
205-
## Rendering chart in Angular 2
206-
For angular version 2.x.x , we cannot use `'fusioncharts/core'` as it uses dynamic imports , which is not compatible with older version typescripts used by Angular 2.
207-
To render a chart, we need to use the older way,
208-
209-
```ts
210-
import { BrowserModule } from '@angular/platform-browser';
211-
import { NgModule } from '@angular/core';
212-
213-
import { AppComponent } from './app.component';
214-
215-
// Import angular-fusioncharts
216-
import { FusionChartsModule } from 'angular-fusioncharts';
217-
218-
// Import FusionCharts library and chart modules
219-
import * as FusionCharts from 'fusioncharts'; // Change fusioncharts/core to fusioncharts and use `* as` syntax
220-
import * as Charts from 'fusioncharts/fusioncharts.charts'; // Contains all the charts under FusionCharts XT , Read below for details
221-
222-
import * as FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion';
223-
224-
// Pass the fusioncharts library and chart modules
225-
FusionChartsModule.fcRoot(FusionCharts, Charts, FusionTheme);
226-
227-
```
228-
Note: All other code for the component and template remain same as above.
229212

230-
We have used `fusioncharts/fusioncharts.charts` file to use all the charts which come under FusionCharts XT.
231-
To know more about other charts and widgets, read this [link](https://www.fusioncharts.com/dev/getting-started/plain-javascript/install-using-plain-javascript)
232213

233214
## Development
234215

dist/README.md

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@ import { AppComponent } from './app.component';
2424
import { FusionChartsModule } from 'angular-fusioncharts';
2525

2626
// Import FusionCharts library and chart modules
27-
import FusionCharts from 'fusioncharts/core';
28-
import Column2d from 'fusioncharts/viz/column2d';
29-
import FusionTheme from 'fusioncharts/themes/es/fusioncharts.theme.fusion';
27+
import * as FusionCharts from 'fusioncharts';
28+
import * as Charts from 'fusioncharts/fusioncharts.charts';
29+
30+
// For Powercharts , Widgets, and Maps
31+
// import * as PowerCharts from 'fusioncharts/fusioncharts.powercharts';
32+
// import * as Widgets from 'fusioncharts/fusioncharts.widgets';
33+
// import * as Maps from 'fusioncharts/fusioncharts.maps';
34+
// To know more about suites,
35+
// read this https://www.fusioncharts.com/dev/getting-started/plain-javascript/install-using-plain-javascript
36+
37+
38+
// For Map definition files
39+
// import * as World from 'fusioncharts/maps/fusioncharts.world';
40+
41+
import * as FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion';
3042

3143
// Pass the fusioncharts library and chart modules
32-
FusionChartsModule.fcRoot(FusionCharts, Column2d, FusionTheme);
44+
FusionChartsModule.fcRoot(FusionCharts, Charts, FusionTheme);
3345

3446
@NgModule({
3547
declarations: [
@@ -45,9 +57,6 @@ FusionChartsModule.fcRoot(FusionCharts, Column2d, FusionTheme);
4557
})
4658
export class AppModule { }
4759
```
48-
NOTE : If you are using angular 2, please refer [Rendering chart in Angular 2](#Rendering-chart-in-Angular-2)
49-
50-
5160
Once the library is imported, you can use its components, directives in your Angular application:
5261

5362
In your Angular AppComponent:
@@ -113,7 +122,7 @@ Usage in template :
113122
width="600"
114123
height="350"
115124
type="Column2D"
116-
dataFormat="JSON"
125+
dataFormat="json"
117126
[dataSource]="dataSource"
118127
(dataplotRollOver)="plotRollOver($event)">
119128
</fusioncharts>
@@ -192,43 +201,15 @@ export class AppComponent {
192201
}
193202

194203
initialized($event){
195-
this.chart = $event.chart;
204+
this.chart = $event.chart; // Storing the chart instance
196205
}
197206

198207
changeLabel(){
199208
this.chart.setChartAttribute('caption', 'Changed caption');
200209
}
201210

202211
}
203-
```
204-
205-
## Rendering chart in Angular 2
206-
For angular version 2.x.x , we cannot use `'fusioncharts/core'` as it uses dynamic imports , which is not compatible with older version typescripts used by Angular 2.
207-
To render a chart, we need to use the older way,
208-
209-
```ts
210-
import { BrowserModule } from '@angular/platform-browser';
211-
import { NgModule } from '@angular/core';
212-
213-
import { AppComponent } from './app.component';
214-
215-
// Import angular-fusioncharts
216-
import { FusionChartsModule } from 'angular-fusioncharts';
217-
218-
// Import FusionCharts library and chart modules
219-
import * as FusionCharts from 'fusioncharts'; // Change fusioncharts/core to fusioncharts and use `* as` syntax
220-
import * as Charts from 'fusioncharts/fusioncharts.charts'; // Contains all the charts under FusionCharts XT , Read below for details
221-
222-
import * as FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion';
223-
224-
// Pass the fusioncharts library and chart modules
225-
FusionChartsModule.fcRoot(FusionCharts, Charts, FusionTheme);
226-
227-
```
228-
Note: All other code for the component and template remain same as above.
229212

230-
We have used `fusioncharts/fusioncharts.charts` file to use all the charts which come under FusionCharts XT.
231-
To know more about other charts and widgets, read this [link](https://www.fusioncharts.com/dev/getting-started/plain-javascript/install-using-plain-javascript)
232213

233214
## Development
234215

dist/dist/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ var FusionChartsComponent = /** @class */ (function () {
504504
return events;
505505
};
506506
FusionChartsComponent.prototype.ngAfterViewInit = function () {
507+
var _this_1 = this;
507508
var _this = this, params = _this.constructerParams, configObj = _this.configObj || (_this.configObj = {});
508509
var _chartConfig = _this.chartConfig || {};
509510
if (typeof _chartConfig === 'string') {
@@ -524,12 +525,12 @@ var FusionChartsComponent = /** @class */ (function () {
524525
else {
525526
configObj['events'] = Object.assign(events, configObj['events']);
526527
}
527-
_this.chartObj = FusionChartsConstructor(_this.fusionchartsService, configObj);
528-
this.initialized.emit({ chart: _this.chartObj });
529528
// configObj['renderAt'] = 'container-' + _this.chartObj.id;
530529
// _this.containerId = _this.chartObj.id;
531530
this.zone.runOutsideAngular(function () {
532531
setTimeout(function () {
532+
_this.chartObj = FusionChartsConstructor(_this.fusionchartsService, configObj);
533+
_this_1.initialized.emit({ chart: _this.chartObj });
533534
_this.chartObj.render(_this.element.nativeElement.querySelector('div'));
534535
}, 1);
535536
});
@@ -541,7 +542,7 @@ var FusionChartsComponent = /** @class */ (function () {
541542
FusionChartsComponent.decorators = [
542543
{ type: _angular_core.Component, args: [{
543544
selector: 'fusioncharts',
544-
template: "<div attr.id=\"container-{{containerId}}\" >{{placeholder}}</div>\n ",
545+
template: "<div attr.id=\"container-{{containerId}}\" style='width:100%;height:100%'>{{placeholder}}</div>\n ",
545546
providers: [FusionChartsService],
546547
},] },
547548
];

dist/dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-fusioncharts",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/fusioncharts/angular-fusioncharts"

dist/src/fusioncharts.component.js

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/fusioncharts.component.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/fusioncharts.component.metadata.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/assets/github-theme/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
}
100100

101101
.side-nav .nav-list {
102-
height: 800px;
102+
height: 550px;
103103
overflow-y: scroll;
104104
}
105105

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html><head><meta charset="utf-8"><title>Angular FusionCharts</title><base href=""><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.1f9a0e540f566da2a999.bundle.css" rel="stylesheet"/></head><body><app>Loading...</app><script type="text/javascript" src="inline.dc826832abca8165cd8d.bundle.js"></script><script type="text/javascript" src="polyfills.adb2df9f86a0c3842e67.bundle.js"></script><script type="text/javascript" src="vendor.cb107f6b1d0fa1a26933.bundle.js"></script><script type="text/javascript" src="main.f7fbff3ff8e6d736a37e.bundle.js"></script></body></html>
1+
<!doctype html><html><head><meta charset="utf-8"><title>Angular FusionCharts</title><base href=""><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.1f9a0e540f566da2a999.bundle.css" rel="stylesheet"/></head><body><app>Loading...</app><script type="text/javascript" src="inline.9c59f73743bce2eefee9.bundle.js"></script><script type="text/javascript" src="polyfills.adb2df9f86a0c3842e67.bundle.js"></script><script type="text/javascript" src="vendor.247a8cd81aa846018146.bundle.js"></script><script type="text/javascript" src="main.be63b77c4f21c1dd8f3a.bundle.js"></script></body></html>

0 commit comments

Comments
 (0)