Skip to content

Commit 15f0832

Browse files
committed
text changes
1 parent 0183845 commit 15f0832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/fusioncharts/samplecode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fcDemos['ex7'] = {
5050

5151
fcDemos['ex8'] = {
5252
module:`// Setup needed in app.module.ts\n\nimport { NgModule, enableProdMode } from '@angular/core'\nimport { AppComponent } from './app.component';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { FusionChartsModule } from '../angular2-fusioncharts';\n\n// Load FusionCharts\nimport * as FusionCharts from 'fusioncharts';\n// Load Charts module\nimport * as Charts from 'fusioncharts/fusioncharts.charts';\n// Load fusion theme\nimport * as Fusion from 'fusioncharts/themes/fusioncharts.theme.fusion'\n\n// Add dependencies to FusionChartsModule\nFusionChartsModule.fcRoot(FusionCharts, Charts, Fusion)\n\n@NgModule({\n declarations: [\n AppComponent,\n ],\n imports: [\n BrowserModule,\n FusionChartsModule,\n ],\n providers: [\n ],\n bootstrap: [ AppComponent ]\n})\nexport class AppModule {\n}\n`,
53-
component: `// in app.component.ts\nimport {Component} from '@angular/core';\n\n@Component({\n selector: 'app',\n templateUrl: 'app.component.html'\n})\nexport class AppComponent {\n dataSource = {\n chart: {\n caption: "Harry's SuperMart",\n subCaption: "Top 5 stores in last month by revenue",\n numberPrefix: "$",\n theme: "ocean"\n },\n data:[{\n label: "Bakersfield Central",\n value: "880000"\n },\n {\n label: "Garden Groove harbour",\n value: "730000"\n },\n {\n label: "Los Angeles Topanga",\n value: "590000"\n },\n {\n label: "Compton-Rancho Dom",\n value: "520000"\n },\n {\n label: "Daly City Serramonte",\n value: "330000"\n }]\n };\n changeBackgroundColor = function () {\n this.dataSource.chart.bgColor = "#efefef";\n };\n changeCaptionTextAlignment = function () {\n this.dataSource.chart.captionAlignment = "left";\n };\n}\n`,
53+
component: `// in app.component.ts\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'app',\n templateUrl: 'app.component.html',\n\n})\n\nexport class AppComponent {\n\n dataSource = {\n "chart": {\n "caption": "Countries With Most Oil Reserves [2017-18]",\n "subCaption": "In MMbbl = One Million barrels",\n "xAxisName": "Country",\n "yAxisName": "Reserves (MMbbl)",\n "numberSuffix": "K",\n "theme": "fusion",\n },\n "data": [{\n "label": "Venezuela",\n "value": "290"\n }, {\n "label": "Saudi",\n "value": "260"\n }, {\n "label": "Canada",\n "value": "180"\n }, {\n "label": "Iran",\n "value": "140"\n }, {\n "label": "Russia",\n "value": "115"\n }, {\n "label": "UAE",\n "value": "100"\n }, {\n "label": "US",\n "value": "30"\n }, {\n "label": "China",\n "value": "30"\n }]\n };\n\n changeBackgroundColor = function () {\n this.dataSource.chart.bgColor = "#efefef";\n };\n\n changeCaptionTextAlignment = function () {\n this.dataSource.chart.captionAlignment = "left";\n };\n\n constructor () {\n\n }\n\n}\n`,
5454
template: `<!-- in app.component.html -->\n<fusioncharts\n width="600" \n height="400"\n type="column2d"\n [dataSource]="dataSource" >\n</fusioncharts>\n\n<p><a class="btn btn-default" (click)="changeBackgroundColor()">Change chart background color</a>\n <a class="btn btn-default" (click)="changeCaptionTextAlignment()">Make Caption text left-aligned</a>\n</p>\n`
5555
};
5656

0 commit comments

Comments
 (0)