Skip to content

Commit 7a44944

Browse files
committed
cosmetic fixes
1 parent eb80fd9 commit 7a44944

File tree

15 files changed

+47
-23
lines changed

15 files changed

+47
-23
lines changed

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.74724e8559d92762bfa7.bundle.js"></script><script type="text/javascript" src="polyfills.adb2df9f86a0c3842e67.bundle.js"></script><script type="text/javascript" src="vendor.4026c91425e286cffeef.bundle.js"></script><script type="text/javascript" src="main.576fb23018ffb4e98ff1.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.acd086f455812bceb18f.bundle.js"></script><script type="text/javascript" src="polyfills.adb2df9f86a0c3842e67.bundle.js"></script><script type="text/javascript" src="vendor.4026c91425e286cffeef.bundle.js"></script><script type="text/javascript" src="main.9710a6089f5c000d2c51.bundle.js"></script></body></html>

docs/inline.74724e8559d92762bfa7.bundle.js renamed to docs/inline.acd086f455812bceb18f.bundle.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.

docs/main.576fb23018ffb4e98ff1.bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/main.9710a6089f5c000d2c51.bundle.js

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

src/app/app.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ import { Ex19 } from "./fusioncharts/ex19/ex19";
3434
import { Ex20 } from "./fusioncharts/ex20/ex20";
3535
import { Ex21 } from "./fusioncharts/ex21/ex21";
3636
import { Ex22 } from "./fusioncharts/ex22/ex22";
37+
38+
import { SafeHtmlPipe } from "./pipes/trustAsHtml";
3739
import { TabbedCode } from "./fusioncharts/tabbedComponent/tabbed.code.component";
3840

3941
import { Navigation, NavService, ObservingComponent, MyAppComponent } from './observable/observable.component';
@@ -115,6 +117,7 @@ FusionChartsModule.fcRoot(
115117
Ex20,
116118
Ex21,
117119
Ex22,
120+
SafeHtmlPipe,
118121
Navigation, ObservingComponent, MyAppComponent,
119122
CodePrev,
120123
AppComponent,

src/app/fusioncharts/ex15/ex15.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[dataSource]="dataSource"
1010
(rendered)="chartRender($event)">
1111
</fusioncharts>
12-
<p style="padding: 10px;background:#f5f2f0">{{message || 'You will see a notification here after chart completes rendering.'}}</p>
12+
<p style="padding: 10px;background:#efefef">{{message || 'You will see a notification here after chart completes rendering.'}}</p>
1313
</div>
1414
</div>
1515
</div>

src/app/fusioncharts/ex16/ex16.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
(dataplotDragStart)="dragStart($event)"
1111
(dataplotDragEnd)="dragEnd($event)">
1212
</fusioncharts>
13-
<p style="padding: 10px;background:#f5f2f0">{{message}}</p>
13+
<p style="padding: 10px;background:#f5f2f0" [innerHTML]="message | trustAsHtml"></p>
1414
</div>
1515
</div>
1616
</div>

src/app/fusioncharts/ex16/ex16.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class Ex16 {
2525

2626
// Format message
2727
getMessage(datasetname, startvalue, finalvalue){
28-
return `You have dragged a plot of ${datasetname} dataset, its previous value was ${startvalue} and its current value is ${finalvalue}`
28+
return `You have dragged a plot of <b style='font-weight:bold;'>${datasetname || '______'}</b> dataset, its previous value was <b style='font-weight:bold'>${startvalue || '________'}</b> and its current value is <b style='font-weight:bold'>${finalvalue || '________'}</b>`
2929
}
3030

3131
constructor(private zone: NgZone) {
@@ -94,7 +94,9 @@ export class Ex16 {
9494
"value": "900000"
9595
}]
9696
}]
97-
}
97+
};
98+
99+
this.message = this.getMessage(null, null, null);
98100
}
99101

100102

src/app/fusioncharts/ex17/ex17.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
(initialized)="initialized($event)">
2222
</fusioncharts>
2323

24-
<p style="padding:10px; background: '#f5f2f0'">{{message}}</p>
24+
<p style="padding:10px; background: #efefef" [innerHTML]="initMessage || message"></p>
2525
<p>
2626
<a class="btn btn-outline-secondary btn-sm" (click)="attachEvent()">Track Data Plot Clicks</a>
2727
<a class="btn btn-outline-secondary btn-sm" (click)="removeEvent()">Reset</a>

src/app/fusioncharts/ex17/ex17.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ export class Ex17 {
2121
message: string;
2222
chartObj: any;
2323
handler:any;
24+
initMessage:any;
25+
iMsg:string;
26+
clickPlotMsg:string;
2427
constructor(private zone: NgZone) {
25-
this.message = 'Click on the plot to see the value along with the label';
28+
this.iMsg = 'Click on <b>Track Data Plot Clicks</b> button to listen to dataplotclick event';
29+
this.initMessage = this.iMsg;
30+
this.clickPlotMsg = 'Click on the plot to see the value along with the label';
31+
this.message = this.clickPlotMsg;
2632
this.dataSource = {
2733
"chart": {
2834
"caption": "Countries With Most Oil Reserves [2017-18]",
@@ -70,7 +76,7 @@ export class Ex17 {
7076
}
7177

7278
getMessage(dataObj){
73-
return `You have clicked on plot ${dataObj.categoryLabel} whose value is ${dataObj.displayValue}`
79+
return `You have clicked on plot <b style='font-weight:bold'>${dataObj.categoryLabel}</b> whose value is <b style='font-weight:bold'>${dataObj.displayValue}</b>`
7480
}
7581

7682
dataplotClickHandler(eventObj, dataObj){
@@ -85,10 +91,14 @@ export class Ex17 {
8591

8692
attachEvent(){
8793
this.handler = this.dataplotClickHandler.bind(this);
94+
this.initMessage = '';
95+
this.message = this.clickPlotMsg;
8896
this.chartObj.addEventListener('dataplotClick',this.handler);
8997
}
9098

9199
removeEvent(){
100+
this.initMessage = this.iMsg;
101+
this.message = this.clickPlotMsg;
92102
this.chartObj.removeEventListener('dataplotClick', this.handler);
93103
}
94104

0 commit comments

Comments
 (0)