Skip to content

Commit 083918a

Browse files
committed
Samples updated with new data, using gammel theme for theme example, removed inconsistencies
1 parent 74e6c87 commit 083918a

File tree

15 files changed

+303
-220
lines changed

15 files changed

+303
-220
lines changed

src/app/app.component.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,27 @@ <h4>Percentage Calculation</h4>
104104
</a>
105105

106106
<a [routerLinkActive]="['active']" [routerLink]="['/ex10']" href="#/demos/ex10" class="list-group-item" (click)="updateId('ex10')">
107-
<h4>Export Chart</h4>
108-
<p>Click on the button to export the chart in pdf</p>
107+
<h4>Export multiple charts</h4>
108+
<p>Use Batch Export to export multiple charts as a single image/PDF</p>
109109
</a>
110110

111111

112112
<a [routerLinkActive]="['active']" [routerLink]="['/ex11']" href="#/demos/ex11" class="list-group-item" (click)="updateId('ex11')">
113-
<h4>Drill Down Chart</h4>
114-
<p>Click on the plot to drill down chart</p>
113+
<h4>Add drill-down to chart</h4>
114+
<p>Use LinkedCharts to quickly add drill-down to charts</p>
115115
</a>
116116

117117
<a [routerLinkActive]="['active']" [routerLink]="['/ex12']" href="#/demos/ex12" class="list-group-item" (click)="updateId('ex12')">
118-
<h4>Render a widget</h4>
119-
<p>A simple widget with data embedded in the component</p>
118+
<h4>A simple gauge</h4>
119+
<p>A simple gauge to show customer satisfaction score</p>
120120
</a>
121121
<a [routerLinkActive]="['active']" [routerLink]="['/ex13']" href="#/demos/ex13" class="list-group-item" (click)="updateId('ex13')">
122-
<h4>Render a map</h4>
123-
<p>A simple map with embedded data </p>
122+
<h4>World Map</h4>
123+
<p>World map showing data for different continents</p>
124124
</a>
125125
<a [routerLinkActive]="['active']" [routerLink]="['/ex14']" href="#/demos/ex14" class="list-group-item" (click)="updateId('ex14')">
126-
<h4>Using a theme</h4>
127-
<p>Simple example of applying a theme</p>
126+
<h4>Applying a different theme</h4>
127+
<p>Choosing from different themes available in FusionCharts Suite</p>
128128
</a>
129129
</nav>
130130
</div>

src/app/app.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import * as Fint from 'fusioncharts/themes/fusioncharts.theme.fint';
5656

5757

5858
require('./themes/fusioncharts.theme.fusion.js');
59+
require('./themes/fusioncharts.theme.gammel.js');
5960

6061
FusionChartsModule.fcRoot(FusionCharts, Charts, Ocean, PowerCharts, Widgets, Maps, WorldMap, Fint)
6162

src/app/fusioncharts/ex1/ex1.ts

Lines changed: 58 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,73 @@
1-
import { Component, AfterViewInit} from '@angular/core';
1+
import {
2+
Component,
3+
AfterViewInit
4+
} from '@angular/core';
25

36
import fcDemos from '../samplecode';
47

58
declare var Prism;
69

710
@Component({
8-
selector: 'chart',
9-
templateUrl: 'ex1.html'
11+
selector: 'chart',
12+
templateUrl: 'ex1.html'
1013
})
1114

1215
export class Ex1 implements AfterViewInit {
13-
demoId = 'ex1';
14-
sampleCode = fcDemos;
15-
dataSource: Object;
16-
chartConfig: Object;
16+
demoId = 'ex1';
17+
sampleCode = fcDemos;
18+
dataSource: Object;
19+
chartConfig: Object;
1720

18-
constructor() {
19-
this.sampleCode = fcDemos;
21+
constructor() {
22+
this.sampleCode = fcDemos;
2023

21-
this.chartConfig = {
22-
width: '700',
23-
height: '400',
24-
type: "column2d",
25-
dataFormat: "json",
26-
creditLabel: 'false'
27-
};
24+
this.chartConfig = {
25+
width: '700',
26+
height: '400',
27+
type: "column2d",
28+
dataFormat: "json",
29+
creditLabel: 'false'
30+
};
2831

29-
this.dataSource = {
30-
"chart": {
31-
"caption": "Countries With Most Oil Reserves [2017-18]",
32-
"subCaption": "In MMbbl = One Million barrels",
33-
"xAxisName": "Country",
34-
"yAxisName": "Reserves (MMbbl)",
35-
"numberSuffix": "K",
36-
"theme": "fusion",
37-
},
38-
"data": [{
39-
"label": "Venezuela",
40-
"value": "290"
41-
}, {
42-
"label": "Saudi",
43-
"value": "260"
44-
}, {
45-
"label": "Canada",
46-
"value": "180"
47-
}, {
48-
"label": "Iran",
49-
"value": "140"
50-
}, {
51-
"label": "Russia",
52-
"value": "115"
53-
}, {
54-
"label": "UAE",
55-
"value": "100"
56-
}, {
57-
"label": "US",
58-
"value": "30"
59-
}, {
60-
"label": "China",
61-
"value": "30"
62-
}]
63-
};
32+
this.dataSource = {
33+
"chart": {
34+
"caption": "Countries With Most Oil Reserves [2017-18]",
35+
"subCaption": "In MMbbl = One Million barrels",
36+
"xAxisName": "Country",
37+
"yAxisName": "Reserves (MMbbl)",
38+
"numberSuffix": "K",
39+
"theme": "fusion",
40+
},
41+
"data": [{
42+
"label": "Venezuela",
43+
"value": "290"
44+
}, {
45+
"label": "Saudi",
46+
"value": "260"
47+
}, {
48+
"label": "Canada",
49+
"value": "180"
50+
}, {
51+
"label": "Iran",
52+
"value": "140"
53+
}, {
54+
"label": "Russia",
55+
"value": "115"
56+
}, {
57+
"label": "UAE",
58+
"value": "100"
59+
}, {
60+
"label": "US",
61+
"value": "30"
62+
}, {
63+
"label": "China",
64+
"value": "30"
65+
}]
66+
};
6467

65-
}
66-
ngAfterViewInit() {
67-
Prism && Prism.highlightAll();
68-
}
68+
}
69+
ngAfterViewInit() {
70+
Prism && Prism.highlightAll();
71+
}
6972

7073
}

src/app/fusioncharts/ex10/ex10.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<style >
2+
.btn { font-family: 'Source Sans Pro'; }
3+
.btn.btn-primary { background: #4a4d8c; transition: all 300ms;}
4+
.btn.btn-primary:hover{ background: #5c62b5; }
5+
.btn.btn-primary:active{ background:#4a4d8c }
6+
div>a{
7+
margin: 0px 10px;
8+
}
9+
</style>
110

211
<fusioncharts
312
width="700"
@@ -10,12 +19,14 @@
1019
<fusioncharts
1120
width="600"
1221
height="600"
13-
type="bar2d"
22+
type="stackedcolumn2d"
1423
dataFormat="json"
15-
[dataSource]="barDataSource">
24+
[dataSource]="stackedColumnData">
1625
</fusioncharts>
1726

18-
<button (click)="exportChart($event)">Export chart in pdf</button>
27+
<div style="display: flex;justify-content: center">
28+
<button (click)="exportChart($event)" class="btn btn-primary">Export both charts as a single PDF</button>
29+
</div>
1930

2031
<tabs>
2132
<tab tabTitle="Module"><ng-prism class="codepreview language-javascript" >{{ sampleCode[demoId].module }}</ng-prism></tab>

0 commit comments

Comments
 (0)