\n
\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex9'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n // the chart object in datasource\n $scope.attrs = {\n \"caption\": \"Twitter Mentions\",\n \"yAxisName\": \"Number of mentions\",\n \"subCaption\": \"(iPhone Vs Samsung)\",\n \"numbersuffix\": \"M\",\n \"yAxisMaxValue\": \"2\",\n \"plottooltext\": \"$seriesName was mentioned
$dataValue times on Twitter in $label\",\n \"theme\": \"fusion\"\n };\n // the categories object in datasource\n $scope.categories = [\n { \n \"category\": \n [\n { \"label\": \"2007\" },\n { \"label\": \"2008\" },\n { \"label\": \"2009\" },\n { \"label\": \"2010\" },\n { \"label\": \"2011\" },\n { \"label\": \"2012\" },\n { \"label\": \"2013\" },\n { \"label\": \"2014\" },\n { \"label\": \"2015\" }\n ]\n }\n ];\n // the dataset object in datasource\n $scope.dataset = [\n {\n \"seriesname\": \"iPhone\",\n \"data\": [\n { \"value\": \"1.90\" },\n { \"value\": \"1.94\" },\n { \"value\": \"1.69\" },\n { \"value\": \"1.66\" },\n { \"value\": \"1.43\" },\n { \"value\": \"1.97\" },\n { \"value\": \"1.78\" },\n { \"value\": \"1.58\" },\n { \"value\": \"1.55\" }\n ]\n },\n {\n \"seriesname\": \"Samsung\",\n \"data\": [\n { \"value\": \"0.68\" },\n { \"value\": \"0.74\" },\n { \"value\": \"0.25\" },\n { \"value\": \"0.64\" },\n { \"value\": \"0.22\" },\n { \"value\": \"0.74\" },\n { \"value\": \"0.58\" },\n { \"value\": \"0.15\" },\n { \"value\": \"0.26\" }\n ]\n }\n ];\n}]);\n",
html: "\n\n
\n\n\n",
schema: "",
data: ""
};
window.fcDemos['ex15'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n // datasource for first chart\n $scope.firstDataSource = {\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 //datasource for second chart \n $scope.secondDataSource = {\n chart: {\n caption: \"Yearly Energy Production Rate\",\n subCaption: \" Top 5 Developed Countries\",\n numbersuffix: \" TWh\",\n showSum: \"1\",\n plotToolText: \"$label produces
$dataValue of energy from $seriesName\",\n theme: \"fusion\"\n },\n categories: [\n {\n category: [\n {\n label: \"Canada\"\n },\n {\n label: \"China\"\n },\n {\n label: \"Russia\"\n },\n {\n label: \"Australia\"\n },\n {\n label: \"United States\"\n },\n {\n label: \"France\"\n }\n ]\n }\n ],\n dataSet: [\n {\n seriesName: \"Coal\",\n data: [\n {\n value: \"400\"\n },\n {\n value: \"830\"\n },\n {\n value: \"500\"\n },\n {\n value: \"420\"\n },\n {\n value: \"790\"\n },\n {\n value: \"380\"\n }\n ]\n },\n {\n seriesName: \"Hydro\",\n data: [\n {\n value: \"350\"\n },\n {\n value: \"620\"\n },\n {\n value: \"410\"\n },\n {\n value: \"370\"\n },\n {\n value: \"720\"\n },\n {\n value: \"310\"\n }\n ]\n },\n {\n seriesName: \"Nuclear\",\n data: [\n {\n value: \"210\"\n },\n {\n value: \"400\"\n },\n {\n value: \"450\"\n },\n {\n value: \"180\"\n },\n {\n value: \"570\"\n },\n {\n value: \"270\"\n }\n ]\n },\n {\n seriesName: \"Gas\",\n data: [\n {\n value: \"180\"\n },\n {\n value: \"330\"\n },\n {\n value: \"230\"\n },\n {\n value: \"160\"\n },\n {\n value: \"440\"\n },\n {\n value: \"350\"\n }\n ]\n },\n {\n seriesName: \"Oil\",\n data: [\n {\n value: \"60\"\n },\n {\n value: \"200\"\n },\n {\n value: \"200\"\n },\n {\n value: \"50\"\n },\n {\n value: \"230\"\n },\n {\n value: \"150\"\n }\n ]\n }\n ]\n };\n\n $scope.exportChart = function(){\n // export charts\n FusionCharts.batchExport({\n exportFormat:\"pdf\"\n })\n }\n}]);\n\n",
html: "\n\n
\n
\n
\n \n\n
\n \n\n
\n \n Export both charts as a single PDF\n \n
\n
\n
\n\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex12'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var chart,\n DataSource = {\n \"chart\": {\n \"caption\": \"Sales of top 3 juice flavors last year\",\n \"subcaption\": \"Click on a column to see details\",\n \"xaxisname\": \"Flavor\",\n \"yaxisname\": \"Amount (In USD)\",\n \"numberprefix\": \"$\",\n \"theme\": \"fusion\",\n \"rotateValues\": \"0\",\n \"id\": \"myChart\"\n },\n \"data\": [\n { \n \"label\": \"Apple\", \n \"value\": \"810000\", \n \"link\": \"newchart-xml-apple\"\n },\n {\n \"label\": \"Cranberry\",\n \"value\": \"620000\",\n \"link\": \"newchart-xml-cranberry\"\n },\n {\n \"label\": \"Grape\",\n \"value\": \"350000\",\n \"link\": \"newchart-xml-grapes\"\n }\n ],\n \"linkeddata\": [\n {\n \"id\": \"apple\",\n \"linkedchart\": {\n \"chart\": {\n \"caption\": \"Apple Juice - Quarterly Sales\",\n \"subcaption\": \"Last year\",\n \"numberprefix\": \"$\",\n \"theme\": \"fusion\",\n \"rotateValues\": \"0\",\n \"plottooltext\": \"$label, $dataValue, $percentValue\"\n },\n \"data\": [\n { \n \"label\": \"Q1\",\n \"value\": \"157000\"\n },\n {\n \"label\": \"Q2\",\n \"value\": \"172000\"\n },\n {\n \"label\": \"Q3\",\n \"value\": \"206000\"\n },\n {\n \"label\": \"Q4\",\n \"value\": \"275000\"\n }\n ]\n }\n },\n {\n \"id\": \"cranberry\",\n \"linkedchart\": {\n \"chart\": {\n \"caption\": \"Cranberry Juice - Quarterly Sales\",\n \"subcaption\": \"Last year\",\n \"numberprefix\": \"$\",\n \"theme\": \"fusion\",\n \"plottooltext\": \"$label, $dataValue, $percentValue\"\n },\n \"data\": [\n { \"label\": \"Q1\", \"value\": \"102000\" },\n { \"label\": \"Q2\", \"value\": \"142000\" },\n { \"label\": \"Q3\", \"value\": \"187000\" },\n { \"label\": \"Q4\", \"value\": \"189000\" }\n ]\n }\n },\n {\n \"id\": \"grapes\",\n \"linkedchart\": {\n \"chart\": {\n \"caption\": \"Grape Juice - Quarterly Sales\",\n \"subcaption\": \"Last year\",\n \"numberprefix\": \"$\",\n \"theme\": \"fusion\",\n \"rotateValues\": \"0\",\n \"plottooltext\": \"$label, $dataValue, $percentValue\"\n },\n \"data\": [\n { \"label\": \"Q1\", \"value\": \"45000\" },\n { \"label\": \"Q2\", \"value\": \"72000\" },\n { \"label\": \"Q3\", \"value\": \"95000\" },\n { \"label\": \"Q4\", \"value\": \"108000\" }\n ]\n }\n }\n ]\n };\n // datasource\n $scope.myDataSource = DataSource;\n // handler for initialized event\n $scope.initialized = function(chartObj){\n chart = chartObj;\n chart.configureLink({\n type: \"pie2d\",\n renderAt: \"myChart\",\n overlayButton: {\n message: \"Back\",\n fontColor: \"880000\",\n bgColor: \"FFEEEE\",\n borderColor: \"660000\"\n }\n }, 0);\n };\n}]);\n\n\n",
html: "\n\n
\n\n\n",
schema: "\n\n",
data: "\n\n"
};
window.fcDemos['ex35'] = {
js: "\n var jsonify = res => res.json();\n var dataFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/adding-a-reference-line-data.json'\n ).then(jsonify);\n var schemaFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/adding-a-reference-line-schema.json'\n ).then(jsonify);\n\n var myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\n myApp.controller(\"MyController\", [\"$scope\", function($scope){\n $scope.myDataSource = {\n data: null,\n caption: {\n text: 'Temperature readings in Italy'\n },\n yAxis: [\n {\n plot: 'Temperature',\n title: 'Temperature',\n format: {\n suffix: '°C'\n },\n style: {\n title: {\n 'font-size': '14px'\n }\n },\n referenceLine: [\n {\n label: 'Controlled Temperature',\n value: '10'\n }\n ]\n }\n ]\n };\n\n Promise.all([dataFetch, schemaFetch]).then(res => {\n const data = res[0];\n const schema = res[1];\n const fusionTable = new FusionCharts.DataStore().createDataTable(\n data,\n schema\n );\n $scope.$apply(function() {\n $scope.myDataSource.data = fusionTable;\n });\n });\n }]);\n ",
html: "\n \n
\n ",
schema: "\n [\n {\n \"name\": \"Time\",\n \"type\": \"date\",\n \"format\": \"%-m/%-d/%Y %H:%M:%S\"\n },\n {\n \"name\": \"Carbon mono-oxide (mg/m^3)\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Non methane hydrocarbons (microg/m^3)\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Benzene\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Nitrogen dioxide\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Temperature\",\n \"type\": \"number\"\n }\n ]\n ",
data: "\n // A shortened version of the data is given here.\n // Please check the link below to see the complete data:\n // https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/adding-a-reference-line-data.json\n [\n [\n \"3/10/2004 18:00:00\",\n 2.6,\n 150,\n 11.9,\n 113,\n 13.6\n ],\n [\n \"3/10/2004 19:00:00\",\n 2,\n 112,\n 9.4,\n 92,\n 13.3\n ],\n [\n \"3/10/2004 20:00:00\",\n 2.2,\n 88,\n 9,\n 114,\n 11.9\n ],\n [\n \"3/10/2004 21:00:00\",\n 2.2,\n 80,\n 9.2,\n 122,\n 11\n ],\n [\n \"3/10/2004 22:00:00\",\n 1.6,\n 51,\n 6.5,\n 116,\n 11.2\n ],\n [\n \"3/10/2004 23:00:00\",\n 1.2,\n 38,\n 4.7,\n 96,\n 11.2\n ],\n [\n \"3/11/2004 0:00:00\",\n 1.2,\n 31,\n 3.6,\n 77,\n 11.3\n ],\n [\n \"3/11/2004 1:00:00\",\n 1,\n 31,\n 3.3,\n 76,\n 10.7\n ],\n [\n \"3/11/2004 2:00:00\",\n 0.9,\n 24,\n 2.3,\n 60,\n 10.7\n ],\n [\n \"3/11/2004 3:00:00\",\n 0.6,\n 19,\n 1.7,\n 45,\n 10.3\n ],\n [\n \"3/11/2004 4:00:00\",\n 2,\n 14,\n 1.3,\n 34,\n 10.1\n ],\n [\n \"3/11/2004 5:00:00\",\n 0.7,\n 8,\n 1.1,\n 28,\n 11\n ],\n [\n \"3/11/2004 6:00:00\",\n 0.7,\n 16,\n 1.6,\n 48,\n 10.5\n ],\n [\n \"3/11/2004 7:00:00\",\n 1.1,\n 29,\n 3.2,\n 82,\n 10.2\n ],\n [\n \"3/11/2004 8:00:00\",\n 2,\n 64,\n 8,\n 112,\n 10.8\n ],\n [\n \"3/11/2004 9:00:00\",\n 2.2,\n 87,\n 9.5,\n 101,\n 10.5\n ],\n [\n \"3/11/2004 10:00:00\",\n 1.7,\n 77,\n 6.3,\n 98,\n 10.8\n ],\n [\n \"3/11/2004 11:00:00\",\n 1.5,\n 43,\n 5,\n 92,\n 10.5\n ],\n [\n \"3/11/2004 12:00:00\",\n 1.6,\n 61,\n 5.2,\n 95,\n 9.5\n ],\n [\n \"3/11/2004 13:00:00\",\n 1.9,\n 63,\n 7.3,\n 112,\n 8.3\n ],\n [\n \"3/11/2004 14:00:00\",\n 2.9,\n 164,\n 11.5,\n 128,\n 8\n ],\n [\n \"3/11/2004 15:00:00\",\n 2.2,\n 79,\n 8.8,\n 126,\n 8.3\n ],\n [\n \"3/11/2004 16:00:00\",\n 2.2,\n 95,\n 8.3,\n 131,\n 9.7\n ],\n [\n \"3/11/2004 17:00:00\",\n 2.9,\n 150,\n 11.2,\n 135,\n 9.8\n ],\n [\n \"3/11/2004 18:00:00\",\n 4.8,\n 307,\n 20.8,\n 151,\n 10.3\n ],\n [\n \"3/11/2004 19:00:00\",\n 6.9,\n 461,\n 27.4,\n 172,\n 9.7\n ],\n [\n \"3/11/2004 20:00:00\",\n 6.1,\n 401,\n 24,\n 165,\n 9.6\n ],\n [\n \"3/11/2004 21:00:00\",\n 3.9,\n 197,\n 12.8,\n 136,\n 9.1\n ],\n [\n \"3/11/2004 22:00:00\",\n 1.5,\n 61,\n 4.7,\n 85,\n 8.2\n ],\n [\n \"3/11/2004 23:00:00\",\n 1,\n 26,\n 2.6,\n 53,\n 8.2\n ],\n [\n \"3/12/2004 0:00:00\",\n 1.7,\n 55,\n 5.9,\n 97,\n 8.3\n ],\n [\n \"3/12/2004 1:00:00\",\n 1.9,\n 53,\n 6.4,\n 110,\n 7.7\n ],\n [\n \"3/12/2004 2:00:00\",\n 1.4,\n 40,\n 4.1,\n 91,\n 7.1\n ],\n [\n \"3/12/2004 3:00:00\",\n 0.8,\n 21,\n 1.9,\n 70,\n 7\n ],\n [\n \"3/12/2004 4:00:00\",\n 5,\n 10,\n 1.1,\n 32,\n 6.1\n ],\n [\n \"3/12/2004 5:00:00\",\n 0.6,\n 7,\n 1,\n 44,\n 6.3\n ],\n [\n \"3/12/2004 6:00:00\",\n 0.8,\n 17,\n 1.8,\n 71,\n 6.8\n ],\n [\n \"3/12/2004 7:00:00\",\n 1.4,\n 33,\n 4.4,\n 104,\n 6.4\n ],\n [\n \"3/14/2004 1:00:00\",\n 2.8,\n 131,\n 11.9,\n 119,\n 14.6\n ],\n [\n \"3/14/2004 2:00:00\",\n 2.5,\n 92,\n 8.6,\n 104,\n 12.5\n ],\n [\n \"3/14/2004 3:00:00\",\n 2.4,\n 132,\n 9.7,\n 97,\n 11.6\n ],\n [\n \"3/14/2004 4:00:00\",\n 3,\n 56,\n 5.2,\n 82,\n 12.1\n ],\n [\n \"3/14/2004 5:00:00\",\n 1.2,\n 32,\n 3.7,\n 70,\n 11.5\n ],\n [\n \"3/14/2004 6:00:00\",\n 1,\n 29,\n 2.5,\n 63,\n 11.6\n ],\n [\n \"3/14/2004 7:00:00\",\n 0.9,\n 27,\n 2.4,\n 67,\n 10.4\n ],\n [\n \"3/14/2004 8:00:00\",\n 1.4,\n 36,\n 4.2,\n 84,\n 11.6\n ],\n [\n \"3/14/2004 9:00:00\",\n 1.6,\n 57,\n 6.4,\n 83,\n 12.4\n ],\n [\n \"3/14/2004 10:00:00\",\n 2.2,\n 129,\n 8.6,\n 98,\n 14.5\n ],\n [\n \"3/14/2004 11:00:00\",\n 2.8,\n 148,\n 10.9,\n 114,\n 16.9\n ],\n [\n \"3/14/2004 12:00:00\",\n 2.8,\n 145,\n 10.7,\n 119,\n 19.3\n ],\n [\n \"3/14/2004 13:00:00\",\n 2,\n 93,\n 7.5,\n 104,\n 21.2\n ],\n [\n \"3/14/2004 14:00:00\",\n 1.8,\n 84,\n 7.5,\n 102,\n 21.4\n ],\n [\n \"3/14/2004 15:00:00\",\n 1.9,\n 99,\n 8.2,\n 107,\n 21.9\n ],\n [\n \"3/14/2004 16:00:00\",\n 3,\n 150,\n 11.9,\n 129,\n 22.2\n ],\n [\n \"3/14/2004 17:00:00\",\n 2.9,\n 156,\n 12,\n 128,\n 21.3\n ],\n [\n \"3/14/2004 18:00:00\",\n 2.5,\n 122,\n 12.2,\n 121,\n 19.7\n ],\n [\n \"3/14/2004 19:00:00\",\n 4.6,\n 262,\n 20.6,\n 157,\n 18.4\n ],\n [\n \"3/14/2004 20:00:00\",\n 5.9,\n 341,\n 23.1,\n 173,\n 17.6\n ],\n [\n \"3/14/2004 21:00:00\",\n 3.4,\n 214,\n 14.7,\n 146,\n 16.7\n ],\n [\n \"3/14/2004 22:00:00\",\n 2.1,\n 100,\n 9,\n 121,\n 16.3\n ],\n [\n \"3/14/2004 23:00:00\",\n 2.2,\n 79,\n 8.8,\n 119,\n 14.7\n ],\n [\n \"3/15/2004 0:00:00\",\n 1.8,\n 66,\n 7.4,\n 99,\n 14.8\n ],\n [\n \"3/15/2004 1:00:00\",\n 1.8,\n 73,\n 6.9,\n 93,\n 14\n ],\n [\n \"3/15/2004 2:00:00\",\n 1.8,\n 66,\n 7,\n 88,\n 13.4\n ],\n [\n \"3/15/2004 3:00:00\",\n 1.1,\n 44,\n 4.4,\n 80,\n 12.6\n ],\n [\n \"3/15/2004 4:00:00\",\n 9,\n 44,\n 4,\n 71,\n 12.3\n ],\n [\n \"3/15/2004 5:00:00\",\n 1,\n 39,\n 3.9,\n 74,\n 11.9\n ],\n [\n \"3/15/2004 6:00:00\",\n 1.4,\n 51,\n 6.4,\n 80,\n 11.4\n ],\n [\n \"3/15/2004 7:00:00\",\n 2.2,\n 107,\n 9.7,\n 89,\n 11.3\n ],\n [\n \"3/15/2004 8:00:00\",\n 5.5,\n 336,\n 25.9,\n 114,\n 12.4\n ],\n [\n \"3/15/2004 9:00:00\",\n 8.1,\n 618,\n 36.7,\n 149,\n 14.8\n ],\n [\n \"3/15/2004 11:00:00\",\n 4.2,\n 334,\n 20.1,\n 155,\n 19.8\n ],\n [\n \"3/15/2004 12:00:00\",\n 3.1,\n 221,\n 14.1,\n 134,\n 22\n ],\n [\n \"3/15/2004 13:00:00\",\n 2.9,\n 207,\n 14.9,\n 119,\n 23.3\n ],\n [\n \"3/15/2004 14:00:00\",\n 2.9,\n 191,\n 15.4,\n 111,\n 23.9\n ],\n [\n \"3/15/2004 15:00:00\",\n 2.5,\n 185,\n 12.1,\n 104,\n 24.4\n ],\n [\n \"3/15/2004 16:00:00\",\n 2.3,\n 141,\n 11.5,\n 99,\n 24.4\n ],\n [\n \"3/15/2004 17:00:00\",\n 2.8,\n 214,\n 14.8,\n 110,\n 23.8\n ],\n [\n \"3/15/2004 18:00:00\",\n 6.1,\n 471,\n 32.1,\n 162,\n 22.5\n ],\n [\n \"3/15/2004 19:00:00\",\n 8,\n 685,\n 39.2,\n 187,\n 20.4\n ],\n [\n \"3/15/2004 20:00:00\",\n 6.5,\n 538,\n 31,\n 165,\n 18.3\n ],\n [\n \"3/15/2004 21:00:00\",\n 4.2,\n 319,\n 19.9,\n 145,\n 16.7\n ],\n [\n \"3/15/2004 22:00:00\",\n 3.2,\n 224,\n 15.3,\n 125,\n 15.7\n ],\n [\n \"3/15/2004 23:00:00\",\n 1.4,\n 67,\n 6.9,\n 101,\n 15.3\n ],\n [\n \"3/16/2004 0:00:00\",\n 2.1,\n 155,\n 11.1,\n 103,\n 14.1\n ],\n [\n \"3/16/2004 1:00:00\",\n 1.2,\n 49,\n 5.4,\n 88,\n 14.8\n ],\n [\n \"3/16/2004 2:00:00\",\n 0.8,\n 29,\n 2.8,\n 61,\n 14.8\n ],\n [\n \"3/16/2004 3:00:00\",\n 0.7,\n 25,\n 2.3,\n 60,\n 13.6\n ],\n [\n \"3/16/2004 4:00:00\",\n 10,\n 25,\n 2.6,\n 59,\n 12.3\n ],\n [\n \"3/16/2004 5:00:00\",\n 0.6,\n 17,\n 2,\n 52,\n 12.8\n ],\n [\n \"3/16/2004 6:00:00\",\n 0.9,\n 27,\n 3.5,\n 64,\n 11.2\n ],\n [\n \"3/16/2004 7:00:00\",\n 1.3,\n 50,\n 5.1,\n 70,\n 11\n ],\n [\n \"3/16/2004 8:00:00\",\n 3.4,\n 218,\n 16.2,\n 97,\n 11.7\n ],\n [\n \"3/16/2004 9:00:00\",\n 3.7,\n 285,\n 19.7,\n 95,\n 13.6\n ],\n [\n \"3/16/2004 10:00:00\",\n 5.3,\n 437,\n 25.1,\n 150,\n 17.8\n ],\n [\n \"3/16/2004 11:00:00\",\n 4.1,\n 327,\n 20,\n 162,\n 21.4\n ],\n [\n \"3/16/2004 12:00:00\",\n 3.3,\n 283,\n 18.3,\n 154,\n 24.4\n ]\n ]\n "
};
window.fcDemos['ex32'] = {
js: "\n var jsonify = res => res.json();\n var dataFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/annotating-single-data-point-data.json'\n ).then(jsonify);\n var schemaFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/annotating-single-data-point-schema.json'\n ).then(jsonify);\n \n var myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\n myApp.controller(\"MyController\", [\"$scope\", function($scope){\n $scope.myDataSource = {\n data: null,\n caption: {\n text: 'Interest Rate Analysis'\n },\n subCaption: {\n text: 'Federal Reserve (USA)'\n },\n yAxis: [\n {\n plot: 'Interest Rate',\n format: {\n suffix: '%'\n },\n title: 'Interest Rate'\n }\n ],\n dataMarker: [\n {\n seriesName: 'Interest Rate',\n time: 'Mar-1980',\n identifier: 'H',\n timeFormat: '%b-%Y',\n tooltext:\n 'As a part of credit control program, under the leadership of Paul Volcker, the Fed tightened the money supply, allowing the federal fund rates to approach 20 percent.'\n },\n {\n seriesName: 'Interest Rate',\n time: 'Aug-1982',\n identifier: 'L',\n timeFormat: '%b-%Y',\n tooltext:\n 'The FED eases off the monetary brakes, allowing interest rates to fall and the economy to begin a strong recovery.'\n },\n {\n seriesName: 'Interest Rate',\n time: 'Oct-1987',\n identifier: 'L',\n timeFormat: '%b-%Y',\n tooltext:\n 'The FED is forced to ease rate after the stock market crash.'\n },\n {\n seriesName: 'Interest Rate',\n time: 'May-1989',\n identifier: 'H',\n timeFormat: '%b-%Y',\n tooltext:\n 'Liquidity problem forced the Fed to increase rate to nearly 10%.'\n },\n {\n seriesName: 'Interest Rate',\n time: 'Sept-1992',\n identifier: 'L',\n timeFormat: '%b-%Y',\n tooltext:\n 'To fight the jobless economy growth the Fed had to reduce the interest rate to 3%.'\n },\n {\n seriesName: 'Interest Rate',\n time: 'Jun-2003',\n identifier: 'L',\n timeFormat: '%b-%Y',\n tooltext:\n 'Struggling to revive the economy, the FED cuts it’s benchmark rate to 1%.'\n },\n {\n seriesName: 'Interest Rate',\n time: 'Sep-2007',\n identifier: 'L',\n timeFormat: '%b-%Y',\n tooltext: 'Fed started reducing the Federal Fund Rate.'\n },\n {\n seriesName: 'Interest Rate',\n time: 'Dec-2008',\n identifier: 'L',\n timeFormat: '%b-%Y',\n tooltext:\n 'Fed reduced the interest rates to sub 0.25% to manage the menace of longest economic downturn since World War 2'\n }\n ]\n };\n\n Promise.all([dataFetch, schemaFetch]).then(res => {\n const data = res[0];\n const schema = res[1];\n const fusionTable = new FusionCharts.DataStore().createDataTable(\n data,\n schema\n );\n $scope.$apply(function() {\n $scope.myDataSource.data = fusionTable;\n });\n });\n }]);\n ",
html: "\n \n
\n ",
schema: "\n [\n {\n \"name\": \"Time\",\n \"type\": \"date\",\n \"format\": \"%b-%Y\"\n },\n {\n \"name\": \"Interest Rate\",\n \"type\": \"number\"\n }\n ]\n ",
data: "\n // A shortened version of the data is given here.\n // Please check the link below to see the complete data:\n // https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/annotating-single-data-point-data.json\n [\n [\n \"Jan-1980\",\n 14\n ],\n [\n \"Feb-1980\",\n 20\n ],\n [\n \"Mar-1980\",\n 20\n ],\n [\n \"Apr-1980\",\n 11.5\n ],\n [\n \"May-1980\",\n 11.5\n ],\n [\n \"Jun-1980\",\n 9.75\n ],\n [\n \"Jul-1980\",\n 9.5\n ],\n [\n \"Aug-1980\",\n 10\n ],\n [\n \"Sep-1980\",\n 12\n ],\n [\n \"Oct-1980\",\n 13.75\n ],\n [\n \"Nov-1980\",\n 18\n ],\n [\n \"Dec-1980\",\n 18\n ],\n [\n \"Jan-1981\",\n 16\n ],\n [\n \"Feb-1981\",\n 16\n ],\n [\n \"Mar-1981\",\n 16\n ],\n [\n \"Apr-1981\",\n 16\n ],\n [\n \"May-1981\",\n 20\n ],\n [\n \"Jun-1981\",\n 20\n ],\n [\n \"Jul-1981\",\n 20\n ],\n [\n \"Aug-1981\",\n 20\n ],\n [\n \"Sep-1981\",\n 20\n ],\n [\n \"Oct-1981\",\n 20\n ],\n [\n \"Nov-1981\",\n 13\n ],\n [\n \"Dec-1981\",\n 12\n ],\n [\n \"Jan-1982\",\n 15\n ],\n [\n \"Feb-1982\",\n 15\n ],\n [\n \"Mar-1982\",\n 15\n ],\n [\n \"Apr-1982\",\n 13\n ],\n [\n \"May-1982\",\n 13\n ],\n [\n \"Jun-1982\",\n 13\n ],\n [\n \"Jul-1982\",\n 12\n ],\n [\n \"Aug-1982\",\n 9.5\n ],\n [\n \"Sep-1982\",\n 10\n ],\n [\n \"Oct-1982\",\n 9.5\n ],\n [\n \"Nov-1982\",\n 9\n ],\n [\n \"Dec-1982\",\n 8.5\n ],\n [\n \"Jan-1983\",\n 8.5\n ],\n [\n \"Feb-1983\",\n 8.5\n ],\n [\n \"Mar-1983\",\n 8.5\n ],\n [\n \"Apr-1983\",\n 8.5\n ],\n [\n \"May-1983\",\n 9.63\n ],\n [\n \"Jun-1983\",\n 9.63\n ],\n [\n \"Jul-1983\",\n 9.63\n ],\n [\n \"Aug-1983\",\n 9.5\n ],\n [\n \"Sep-1983\",\n 9.5\n ],\n [\n \"Oct-1983\",\n 9.5\n ],\n [\n \"Nov-1983\",\n 9.5\n ],\n [\n \"Dec-1983\",\n 9.5\n ],\n [\n \"Jan-1984\",\n 9.5\n ],\n [\n \"Feb-1984\",\n 9.5\n ],\n [\n \"Mar-1984\",\n 10.5\n ],\n [\n \"Apr-1984\",\n 10.5\n ],\n [\n \"May-1984\",\n 10.5\n ],\n [\n \"Jun-1984\",\n 11\n ],\n [\n \"Jul-1984\",\n 11.75\n ],\n [\n \"Aug-1984\",\n 11.75\n ],\n [\n \"Sep-1984\",\n 10\n ],\n [\n \"Oct-1984\",\n 10\n ],\n [\n \"Nov-1984\",\n 9\n ],\n [\n \"Dec-1984\",\n 8.25\n ],\n [\n \"Jan-1985\",\n 8.25\n ],\n [\n \"Feb-1985\",\n 9\n ],\n [\n \"Mar-1985\",\n 8.5\n ],\n [\n \"Apr-1985\",\n 8.25\n ],\n [\n \"May-1985\",\n 7.75\n ],\n [\n \"Jun-1985\",\n 7.75\n ],\n [\n \"Jul-1985\",\n 8\n ],\n [\n \"Aug-1985\",\n 8\n ],\n [\n \"May-2001\",\n 4\n ],\n [\n \"Jun-2001\",\n 3.75\n ],\n [\n \"Jul-2001\",\n 3.75\n ],\n [\n \"Aug-2001\",\n 3.5\n ],\n [\n \"Sep-2001\",\n 3\n ],\n [\n \"Oct-2001\",\n 2.5\n ],\n [\n \"Nov-2001\",\n 2\n ],\n [\n \"Dec-2001\",\n 1.75\n ],\n [\n \"Jan-2002\",\n 1.75\n ],\n [\n \"Feb-2002\",\n 1.75\n ],\n [\n \"Mar-2002\",\n 1.75\n ],\n [\n \"Apr-2002\",\n 1.75\n ],\n [\n \"May-2002\",\n 1.75\n ],\n [\n \"Jun-2002\",\n 1.75\n ],\n [\n \"Jul-2002\",\n 1.75\n ],\n [\n \"Aug-2002\",\n 1.75\n ],\n [\n \"Sep-2002\",\n 1.75\n ],\n [\n \"Oct-2002\",\n 1.75\n ],\n [\n \"Nov-2002\",\n 1.25\n ],\n [\n \"Dec-2002\",\n 1.25\n ],\n [\n \"Jan-2003\",\n 1.25\n ],\n [\n \"Feb-2003\",\n 1.25\n ],\n [\n \"Mar-2003\",\n 1.25\n ],\n [\n \"Apr-2003\",\n 1.25\n ],\n [\n \"May-2003\",\n 1.25\n ],\n [\n \"Jun-2003\",\n 1\n ],\n [\n \"Jul-2003\",\n 1\n ],\n [\n \"Aug-2003\",\n 1\n ],\n [\n \"Sep-2003\",\n 1\n ],\n [\n \"Oct-2003\",\n 1\n ],\n [\n \"Nov-2003\",\n 1\n ],\n [\n \"Dec-2003\",\n 1\n ],\n [\n \"Jan-2004\",\n 1\n ],\n [\n \"Feb-2004\",\n 1\n ],\n [\n \"Mar-2004\",\n 1\n ],\n [\n \"Apr-2004\",\n 1\n ],\n [\n \"May-2004\",\n 1\n ],\n [\n \"Jun-2004\",\n 1.25\n ],\n [\n \"Jul-2004\",\n 1.25\n ],\n [\n \"Aug-2004\",\n 1.5\n ],\n [\n \"Sep-2004\",\n 1.75\n ],\n [\n \"Oct-2004\",\n 1.75\n ],\n [\n \"Nov-2004\",\n 2\n ],\n [\n \"Dec-2004\",\n 2.25\n ],\n [\n \"Jan-2005\",\n 2.25\n ],\n [\n \"Feb-2005\",\n 2.5\n ],\n [\n \"Mar-2005\",\n 2.75\n ],\n [\n \"Apr-2005\",\n 2.75\n ],\n [\n \"May-2005\",\n 3\n ],\n [\n \"Jun-2005\",\n 3.25\n ],\n [\n \"Jul-2005\",\n 3.25\n ],\n [\n \"Aug-2005\",\n 3.5\n ],\n [\n \"Sep-2005\",\n 3.75\n ],\n [\n \"Oct-2005\",\n 3.75\n ],\n [\n \"Nov-2005\",\n 4\n ],\n [\n \"Dec-2005\",\n 4.25\n ],\n [\n \"Jan-2006\",\n 4.5\n ],\n [\n \"Feb-2006\",\n 4.5\n ],\n [\n \"Mar-2006\",\n 4.75\n ],\n [\n \"Apr-2006\",\n 4.75\n ],\n [\n \"May-2006\",\n 5\n ],\n [\n \"Jun-2006\",\n 5.25\n ],\n [\n \"Jul-2006\",\n 5.25\n ],\n [\n \"Aug-2006\",\n 5.25\n ],\n [\n \"Sep-2006\",\n 5.25\n ],\n [\n \"Oct-2006\",\n 5.25\n ],\n [\n \"Nov-2006\",\n 5.25\n ],\n [\n \"Dec-2006\",\n 5.25\n ],\n [\n \"Jan-2007\",\n 5.25\n ],\n [\n \"Feb-2007\",\n 5.25\n ],\n [\n \"Mar-2007\",\n 5.25\n ],\n [\n \"Apr-2007\",\n 5.25\n ],\n [\n \"May-2007\",\n 5.25\n ],\n [\n \"Jun-2007\",\n 5.25\n ],\n [\n \"Jul-2007\",\n 5.25\n ],\n [\n \"Aug-2007\",\n 5.25\n ],\n [\n \"Sep-2007\",\n 4.75\n ],\n [\n \"Oct-2007\",\n 4.5\n ],\n [\n \"Nov-2007\",\n 4.5\n ],\n [\n \"Dec-2007\",\n 4.25\n ],\n [\n \"Jan-2008\",\n 3\n ],\n [\n \"Feb-2008\",\n 3\n ],\n [\n \"Mar-2008\",\n 2.25\n ],\n [\n \"Apr-2008\",\n 2\n ],\n [\n \"May-2008\",\n 2\n ],\n [\n \"Jun-2008\",\n 2\n ],\n [\n \"Jul-2008\",\n 2\n ],\n [\n \"Aug-2008\",\n 2\n ],\n [\n \"Sep-2008\",\n 2\n ],\n [\n \"Oct-2008\",\n 1\n ],\n [\n \"Nov-2008\",\n 1\n ],\n [\n \"Dec-2008\",\n 0.125\n ],\n [\n \"Jan-2009\",\n 0.125\n ],\n [\n \"Feb-2009\",\n 0.125\n ],\n [\n \"Mar-2009\",\n 0.125\n ],\n [\n \"Apr-2009\",\n 0.125\n ],\n [\n \"May-2009\",\n 0.125\n ],\n [\n \"Jun-2009\",\n 0.125\n ],\n [\n \"Jul-2009\",\n 0.125\n ],\n [\n \"Aug-2009\",\n 0.125\n ],\n [\n \"Sep-2009\",\n 0.125\n ],\n [\n \"Oct-2009\",\n 0.125\n ],\n [\n \"Nov-2009\",\n 0.125\n ],\n [\n \"Dec-2009\",\n 0.125\n ],\n [\n \"Jan-2010\",\n 0.125\n ],\n [\n \"Feb-2010\",\n 0.125\n ],\n [\n \"Mar-2010\",\n 0.125\n ],\n [\n \"Apr-2010\",\n 0.125\n ],\n [\n \"May-2010\",\n 0.125\n ],\n [\n \"Jun-2010\",\n 0.125\n ],\n [\n \"Jul-2010\",\n 0.125\n ],\n [\n \"Aug-2010\",\n 0.125\n ],\n [\n \"Sep-2010\",\n 0.125\n ],\n [\n \"Oct-2010\",\n 0.125\n ],\n [\n \"Nov-2010\",\n 0.125\n ],\n [\n \"Dec-2010\",\n 0.125\n ],\n [\n \"Jan-2011\",\n 0.125\n ],\n [\n \"Feb-2011\",\n 0.125\n ],\n [\n \"Mar-2011\",\n 0.125\n ],\n [\n \"Apr-2011\",\n 0.125\n ],\n [\n \"May-2011\",\n 0.125\n ],\n [\n \"Jun-2011\",\n 0.125\n ],\n [\n \"Jul-2011\",\n 0.125\n ],\n [\n \"Aug-2011\",\n 0.125\n ],\n [\n \"Sep-2011\",\n 0.125\n ],\n [\n \"Oct-2011\",\n 0.125\n ]\n ]\n "
};
window.fcDemos['ex33'] = {
js: "\n var jsonify = res => res.json();\n var dataFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/single-event-overlay-data.json'\n ).then(jsonify);\n var schemaFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/single-event-overlay-schema.json'\n ).then(jsonify);\n\n var myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\n myApp.controller(\"MyController\", [\"$scope\", function($scope){\n $scope.myDataSource = {\n data: null,\n caption: {\n text: 'Interest Rate Analysis'\n },\n subCaption: {\n text: 'Federal Reserve (USA)'\n },\n yAxis: [\n {\n plot: 'Interest Rate',\n format: {\n suffix: '%'\n },\n title: 'Interest Rate'\n }\n ],\n xAxis: {\n plot: 'Time',\n timemarker: [\n {\n start: 'Mar-1980',\n label: 'US inflation peaked at 14.8%.',\n timeFormat: '%b-%Y',\n style: {\n marker: {\n fill: '#D0D6F4'\n }\n }\n },\n {\n start: 'May-1981',\n label:\n 'To control inflation, the Fed started {br} raising interest rates to over {br} 20%.',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Jun-1983',\n label:\n 'By proactive actions of Mr.Volcker, {br} the inflation falls to 2.4% {br} from the peak of over 14% {br} just three years ago.',\n timeFormat: '%b-%Y',\n style: {\n marker: {\n fill: '#D0D6F4'\n }\n }\n },\n {\n start: 'Oct-1987',\n label:\n 'The Dow Jones Industrial Average lost {br} about 30% of it’s value.',\n timeFormat: '%b-%Y',\n style: {\n marker: {\n fill: '#FBEFCC'\n }\n }\n },\n {\n start: 'Jan-1989',\n label: 'George H.W. Bush becomes {br} the 41st president of US!',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Aug-1990',\n label:\n 'The oil prices spiked to $35 {br} per barrel from $15 per barrel {br} because of the Gulf War.',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Dec-1996',\n label:\n 'Alan Greenspan warns of the dangers {br} of \"irrational exuberance\" in financial markets, {br} an admonition that goes unheeded',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Sep-2008',\n label: 'Lehman Brothers collapsed!',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Mar-2009',\n label:\n 'The net worth of US households {br} stood at a trough of $55 trillion.',\n timeFormat: '%b-%Y',\n style: {\n marker: {\n fill: '#FBEFCC'\n }\n }\n },\n {\n start: 'Oct-2009',\n label: 'Unemployment rate peaked {br} in given times to 10%.',\n timeFormat: '%b-%Y'\n }\n ]\n }\n };\n\n Promise.all([dataFetch, schemaFetch]).then(res => {\n const data = res[0];\n const schema = res[1];\n const fusionTable = new FusionCharts.DataStore().createDataTable(\n data,\n schema\n );\n $scope.$apply(function() {\n $scope.myDataSource.data = fusionTable;\n });\n });\n }]);\n ",
html: "\n \n
\n ",
schema: "\n [\n {\n \"name\": \"Time\",\n \"type\": \"date\",\n \"format\": \"%b-%Y\"\n },\n {\n \"name\": \"Interest Rate\",\n \"type\": \"number\"\n }\n ]\n ",
data: "\n // A shortened version of the data is given here.\n // Please check the link below to see the complete data:\n // https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/single-event-overlay-data.json\n [\n [\n \"Jan-1980\",\n 14\n ],\n [\n \"Feb-1980\",\n 20\n ],\n [\n \"Mar-1980\",\n 20\n ],\n [\n \"Apr-1980\",\n 11.5\n ],\n [\n \"May-1980\",\n 11.5\n ],\n [\n \"Jun-1980\",\n 9.75\n ],\n [\n \"Jul-1980\",\n 9.5\n ],\n [\n \"Aug-1980\",\n 10\n ],\n [\n \"Sep-1980\",\n 12\n ],\n [\n \"Oct-1980\",\n 13.75\n ],\n [\n \"Nov-1980\",\n 18\n ],\n [\n \"Dec-1980\",\n 18\n ],\n [\n \"Jan-1981\",\n 16\n ],\n [\n \"Feb-1981\",\n 16\n ],\n [\n \"Mar-1981\",\n 16\n ],\n [\n \"Apr-1981\",\n 16\n ],\n [\n \"May-1981\",\n 20\n ],\n [\n \"Jun-1981\",\n 20\n ],\n [\n \"Jul-1981\",\n 20\n ],\n [\n \"Aug-1981\",\n 20\n ],\n [\n \"Sep-1981\",\n 20\n ],\n [\n \"Oct-1981\",\n 20\n ],\n [\n \"Nov-1981\",\n 13\n ],\n [\n \"Dec-1981\",\n 12\n ],\n [\n \"Jan-1982\",\n 15\n ],\n [\n \"Feb-1982\",\n 15\n ],\n [\n \"Mar-1982\",\n 15\n ],\n [\n \"Apr-1982\",\n 13\n ],\n [\n \"May-1982\",\n 13\n ],\n [\n \"Jun-1982\",\n 13\n ],\n [\n \"Jul-1982\",\n 12\n ],\n [\n \"Aug-1982\",\n 9.5\n ],\n [\n \"Sep-1982\",\n 10\n ],\n [\n \"Oct-1982\",\n 9.5\n ],\n [\n \"Nov-1982\",\n 9\n ],\n [\n \"Dec-1982\",\n 8.5\n ],\n [\n \"Jan-1983\",\n 8.5\n ],\n [\n \"Feb-1983\",\n 8.5\n ],\n [\n \"Mar-1983\",\n 8.5\n ],\n [\n \"Apr-1983\",\n 8.5\n ],\n [\n \"May-1983\",\n 9.63\n ],\n [\n \"Jun-1983\",\n 9.63\n ],\n [\n \"Jul-1983\",\n 9.63\n ],\n [\n \"Aug-1983\",\n 9.5\n ],\n [\n \"Sep-1983\",\n 9.5\n ],\n [\n \"Oct-1983\",\n 9.5\n ],\n [\n \"Nov-1983\",\n 9.5\n ],\n [\n \"Dec-1983\",\n 9.5\n ],\n [\n \"Jan-1984\",\n 9.5\n ],\n [\n \"Feb-1984\",\n 9.5\n ],\n [\n \"Mar-1984\",\n 10.5\n ],\n [\n \"Apr-1984\",\n 10.5\n ],\n [\n \"May-1984\",\n 10.5\n ],\n [\n \"Dec-2001\",\n 1.75\n ],\n [\n \"Jan-2002\",\n 1.75\n ],\n [\n \"Feb-2002\",\n 1.75\n ],\n [\n \"Mar-2002\",\n 1.75\n ],\n [\n \"Apr-2002\",\n 1.75\n ],\n [\n \"May-2002\",\n 1.75\n ],\n [\n \"Jun-2002\",\n 1.75\n ],\n [\n \"Jul-2002\",\n 1.75\n ],\n [\n \"Aug-2002\",\n 1.75\n ],\n [\n \"Sep-2002\",\n 1.75\n ],\n [\n \"Oct-2002\",\n 1.75\n ],\n [\n \"Nov-2002\",\n 1.25\n ],\n [\n \"Dec-2002\",\n 1.25\n ],\n [\n \"Jan-2003\",\n 1.25\n ],\n [\n \"Feb-2003\",\n 1.25\n ],\n [\n \"Mar-2003\",\n 1.25\n ],\n [\n \"Apr-2003\",\n 1.25\n ],\n [\n \"May-2003\",\n 1.25\n ],\n [\n \"Jun-2003\",\n 1\n ],\n [\n \"Jul-2003\",\n 1\n ],\n [\n \"Aug-2003\",\n 1\n ],\n [\n \"Sep-2003\",\n 1\n ],\n [\n \"Oct-2003\",\n 1\n ],\n [\n \"Nov-2003\",\n 1\n ],\n [\n \"Dec-2003\",\n 1\n ],\n [\n \"Jan-2004\",\n 1\n ],\n [\n \"Feb-2004\",\n 1\n ],\n [\n \"Mar-2004\",\n 1\n ],\n [\n \"Apr-2004\",\n 1\n ],\n [\n \"May-2004\",\n 1\n ],\n [\n \"Jun-2004\",\n 1.25\n ],\n [\n \"Jul-2004\",\n 1.25\n ],\n [\n \"Aug-2004\",\n 1.5\n ],\n [\n \"Sep-2004\",\n 1.75\n ],\n [\n \"Oct-2004\",\n 1.75\n ],\n [\n \"Nov-2004\",\n 2\n ],\n [\n \"Dec-2004\",\n 2.25\n ],\n [\n \"Jan-2005\",\n 2.25\n ],\n [\n \"Feb-2005\",\n 2.5\n ],\n [\n \"Mar-2005\",\n 2.75\n ],\n [\n \"Apr-2005\",\n 2.75\n ],\n [\n \"May-2005\",\n 3\n ],\n [\n \"Jun-2005\",\n 3.25\n ],\n [\n \"Jul-2005\",\n 3.25\n ],\n [\n \"Aug-2005\",\n 3.5\n ],\n [\n \"Sep-2005\",\n 3.75\n ],\n [\n \"Oct-2005\",\n 3.75\n ],\n [\n \"Nov-2005\",\n 4\n ],\n [\n \"Dec-2005\",\n 4.25\n ],\n [\n \"Jan-2006\",\n 4.5\n ],\n [\n \"Feb-2006\",\n 4.5\n ],\n [\n \"Mar-2006\",\n 4.75\n ],\n [\n \"Apr-2006\",\n 4.75\n ],\n [\n \"May-2006\",\n 5\n ],\n [\n \"Jun-2006\",\n 5.25\n ],\n [\n \"Jul-2006\",\n 5.25\n ],\n [\n \"Aug-2006\",\n 5.25\n ],\n [\n \"Sep-2006\",\n 5.25\n ],\n [\n \"Oct-2006\",\n 5.25\n ],\n [\n \"Nov-2006\",\n 5.25\n ],\n [\n \"Dec-2006\",\n 5.25\n ],\n [\n \"Jan-2007\",\n 5.25\n ],\n [\n \"Feb-2007\",\n 5.25\n ],\n [\n \"Mar-2007\",\n 5.25\n ],\n [\n \"Apr-2007\",\n 5.25\n ],\n [\n \"May-2007\",\n 5.25\n ],\n [\n \"Jun-2007\",\n 5.25\n ],\n [\n \"Jul-2007\",\n 5.25\n ],\n [\n \"Aug-2007\",\n 5.25\n ],\n [\n \"Sep-2007\",\n 4.75\n ],\n [\n \"Oct-2007\",\n 4.5\n ],\n [\n \"Nov-2007\",\n 4.5\n ],\n [\n \"Dec-2007\",\n 4.25\n ],\n [\n \"Jan-2008\",\n 3\n ],\n [\n \"Feb-2008\",\n 3\n ],\n [\n \"Mar-2008\",\n 2.25\n ],\n [\n \"Apr-2008\",\n 2\n ],\n [\n \"May-2008\",\n 2\n ],\n [\n \"Jun-2008\",\n 2\n ],\n [\n \"Jul-2008\",\n 2\n ],\n [\n \"Aug-2008\",\n 2\n ],\n [\n \"Sep-2008\",\n 2\n ],\n [\n \"Oct-2008\",\n 1\n ],\n [\n \"Nov-2008\",\n 1\n ],\n [\n \"Dec-2008\",\n 0.125\n ],\n [\n \"Jan-2009\",\n 0.125\n ],\n [\n \"Feb-2009\",\n 0.125\n ],\n [\n \"Mar-2009\",\n 0.125\n ],\n [\n \"Apr-2009\",\n 0.125\n ],\n [\n \"May-2009\",\n 0.125\n ],\n [\n \"Jun-2009\",\n 0.125\n ],\n [\n \"Jul-2009\",\n 0.125\n ],\n [\n \"Aug-2009\",\n 0.125\n ],\n [\n \"Sep-2009\",\n 0.125\n ],\n [\n \"Oct-2009\",\n 0.125\n ],\n [\n \"Nov-2009\",\n 0.125\n ],\n [\n \"Dec-2009\",\n 0.125\n ],\n [\n \"Jan-2010\",\n 0.125\n ],\n [\n \"Feb-2010\",\n 0.125\n ],\n [\n \"Mar-2010\",\n 0.125\n ],\n [\n \"Apr-2010\",\n 0.125\n ],\n [\n \"May-2010\",\n 0.125\n ],\n [\n \"Jun-2010\",\n 0.125\n ],\n [\n \"Jul-2010\",\n 0.125\n ],\n [\n \"Aug-2010\",\n 0.125\n ],\n [\n \"Sep-2010\",\n 0.125\n ],\n [\n \"Oct-2010\",\n 0.125\n ],\n [\n \"Nov-2010\",\n 0.125\n ],\n [\n \"Dec-2010\",\n 0.125\n ],\n [\n \"Jan-2011\",\n 0.125\n ],\n [\n \"Feb-2011\",\n 0.125\n ],\n [\n \"Mar-2011\",\n 0.125\n ],\n [\n \"Apr-2011\",\n 0.125\n ],\n [\n \"May-2011\",\n 0.125\n ],\n [\n \"Jun-2011\",\n 0.125\n ],\n [\n \"Jul-2011\",\n 0.125\n ],\n [\n \"Aug-2011\",\n 0.125\n ],\n [\n \"Sep-2011\",\n 0.125\n ],\n [\n \"Oct-2011\",\n 0.125\n ]\n ]\n "
};
window.fcDemos['ex34'] = {
js: "\n var jsonify = res => res.json();\n var dataFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/date-range-event-overlay-data.json'\n ).then(jsonify);\n var schemaFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/date-range-event-overlay-schema.json'\n ).then(jsonify);\n\n var myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\n myApp.controller(\"MyController\", [\"$scope\", function($scope){\n $scope.myDataSource = {\n data: null,\n caption: {\n text: 'Interest Rate Analysis'\n },\n subCaption: {\n text: 'Federal Reserve (USA)'\n },\n yAxis: [\n {\n plot: 'Interest Rate',\n format: {\n suffix: '%'\n },\n title: 'Interest Rate'\n }\n ],\n xAxis: {\n plot: 'Time',\n timemarker: [\n {\n start: 'Jul-1981',\n end: 'Nov-1982',\n label:\n 'Economic downturn was triggered by {br} tight monetary policy in an effort to {br} fight mounting inflation.',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Jul-1990',\n end: 'Mar-1991',\n label:\n 'This eight month recession period {br} was characterized by a sluggish employment recovery, {br} most commonly referred to as a jobless recovery.',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Jun-2004',\n end: 'Jul-2006',\n label:\n 'The Fed after raising interest rates {br} at 17 consecutive meetings, ends its campaign {br} to slow the economy and forestall inflation.',\n timeFormat: '%b-%Y'\n },\n {\n start: 'Dec-2007',\n end: 'Jun-2009',\n label:\n 'Recession caused by the worst {br} collapse of financial system in recent {br} times.',\n timeFormat: '%b-%Y'\n }\n ]\n }\n };\n\n Promise.all([dataFetch, schemaFetch]).then(res => {\n const data = res[0];\n const schema = res[1];\n const fusionTable = new FusionCharts.DataStore().createDataTable(\n data,\n schema\n );\n $scope.$apply(function() {\n $scope.myDataSource.data = fusionTable;\n });\n });\n }]);\n ",
html: "\n \n
\n ",
schema: "\n [\n {\n \"name\": \"Time\",\n \"type\": \"date\",\n \"format\": \"%b-%Y\"\n },\n {\n \"name\": \"Interest Rate\",\n \"type\": \"number\"\n }\n ]\n ",
data: "\n // A shortened version of the data is given here.\n // Please check the link below to see the complete data:\n // https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/date-range-event-overlay-data.json\n [\n [\n \"Jan-1980\",\n 14\n ],\n [\n \"Feb-1980\",\n 20\n ],\n [\n \"Mar-1980\",\n 20\n ],\n [\n \"Apr-1980\",\n 11.5\n ],\n [\n \"May-1980\",\n 11.5\n ],\n [\n \"Jun-1980\",\n 9.75\n ],\n [\n \"Jul-1980\",\n 9.5\n ],\n [\n \"Aug-1980\",\n 10\n ],\n [\n \"Sep-1980\",\n 12\n ],\n [\n \"Oct-1980\",\n 13.75\n ],\n [\n \"Nov-1980\",\n 18\n ],\n [\n \"Dec-1980\",\n 18\n ],\n [\n \"Jan-1981\",\n 16\n ],\n [\n \"Feb-1981\",\n 16\n ],\n [\n \"Mar-1981\",\n 16\n ],\n [\n \"Apr-1981\",\n 16\n ],\n [\n \"May-1981\",\n 20\n ],\n [\n \"Jun-1981\",\n 20\n ],\n [\n \"Jul-1981\",\n 20\n ],\n [\n \"Aug-1981\",\n 20\n ],\n [\n \"Sep-1981\",\n 20\n ],\n [\n \"Oct-1981\",\n 20\n ],\n [\n \"Nov-1981\",\n 13\n ],\n [\n \"Dec-1981\",\n 12\n ],\n [\n \"Jan-1982\",\n 15\n ],\n [\n \"Feb-1982\",\n 15\n ],\n [\n \"Mar-1982\",\n 15\n ],\n [\n \"Apr-1982\",\n 13\n ],\n [\n \"May-1982\",\n 13\n ],\n [\n \"Jun-1982\",\n 13\n ],\n [\n \"Jul-1982\",\n 12\n ],\n [\n \"Aug-1982\",\n 9.5\n ],\n [\n \"Sep-1982\",\n 10\n ],\n [\n \"Oct-1982\",\n 9.5\n ],\n [\n \"Nov-1982\",\n 9\n ],\n [\n \"Dec-1982\",\n 8.5\n ],\n [\n \"Jan-1983\",\n 8.5\n ],\n [\n \"Feb-1983\",\n 8.5\n ],\n [\n \"Mar-1983\",\n 8.5\n ],\n [\n \"Apr-1983\",\n 8.5\n ],\n [\n \"May-1983\",\n 9.63\n ],\n [\n \"Jun-1983\",\n 9.63\n ],\n [\n \"Jul-1983\",\n 9.63\n ],\n [\n \"Aug-1983\",\n 9.5\n ],\n [\n \"Sep-1983\",\n 9.5\n ],\n [\n \"Oct-1983\",\n 9.5\n ],\n [\n \"Nov-1983\",\n 9.5\n ],\n [\n \"Dec-1983\",\n 9.5\n ],\n [\n \"Jan-1984\",\n 9.5\n ],\n [\n \"Feb-1984\",\n 9.5\n ],\n [\n \"Mar-1984\",\n 10.5\n ],\n [\n \"Apr-1984\",\n 10.5\n ],\n [\n \"May-1984\",\n 10.5\n ],\n [\n \"Jun-1984\",\n 11\n ],\n [\n \"Jul-1984\",\n 11.75\n ],\n [\n \"Aug-1984\",\n 11.75\n ],\n [\n \"Sep-1984\",\n 10\n ],\n [\n \"Oct-1984\",\n 10\n ],\n [\n \"Nov-1984\",\n 9\n ],\n [\n \"Dec-1984\",\n 8.25\n ],\n [\n \"Jan-1985\",\n 8.25\n ],\n [\n \"Feb-1985\",\n 9\n ],\n [\n \"Mar-1985\",\n 8.5\n ],\n [\n \"Apr-1985\",\n 8.25\n ],\n [\n \"May-1985\",\n 7.75\n ],\n [\n \"Jun-1985\",\n 7.75\n ],\n [\n \"Jul-1985\",\n 8\n ],\n [\n \"Aug-1985\",\n 8\n ],\n [\n \"Sep-1985\",\n 8\n ],\n [\n \"Oct-1985\",\n 8\n ],\n [\n \"Nov-1985\",\n 8\n ],\n [\n \"Dec-1985\",\n 7.75\n ],\n [\n \"Jan-1986\",\n 7.75\n ],\n [\n \"Feb-1986\",\n 7.75\n ],\n [\n \"Mar-1986\",\n 7.25\n ],\n [\n \"Apr-1986\",\n 6.75\n ],\n [\n \"May-1986\",\n 6.88\n ],\n [\n \"Jun-1986\",\n 6.88\n ],\n [\n \"Jul-1986\",\n 6.38\n ],\n [\n \"Aug-1986\",\n 5.88\n ],\n [\n \"Sep-1986\",\n 5.88\n ],\n [\n \"Oct-1986\",\n 5.88\n ],\n [\n \"Nov-1986\",\n 5.88\n ],\n [\n \"Dec-1986\",\n 6\n ],\n [\n \"Jan-1987\",\n 6\n ],\n [\n \"Feb-1987\",\n 6\n ],\n [\n \"Mar-1987\",\n 6\n ],\n [\n \"Apr-1987\",\n 6.75\n ],\n [\n \"May-1987\",\n 6.75\n ],\n [\n \"Jun-1987\",\n 6.75\n ],\n [\n \"Jul-1987\",\n 6.75\n ]\n ]\n "
};
window.fcDemos['ex14'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n // datasource\n $scope.myDataSource = {\n \"chart\": {\n \"caption\": \"Average Annual Population Growth\",\n \"subcaption\": \" 1955-2015\",\n \"numbersuffix\": \"%\",\n \"includevalueinlabels\": \"1\",\n \"labelsepchar\": \": \",\n \"entityFillHoverColor\": \"#FFF9C4\",\n \"theme\": \"fusion\"\n },\n \"colorrange\": {\n \"minvalue\": \"0\",\n \"code\": \"#FFE0B2\",\n \"gradient\": \"1\",\n \"color\": [\n \n {\n \"minvalue\": \"0.5\",\n \"maxvalue\": \"1.0\",\n \"color\": \"#FFD74D\"\n },\n {\n \"minvalue\": \"1.0\",\n \"maxvalue\": \"2.0\",\n \"color\": \"#FB8C00\"\n },\n {\n \"minvalue\": \"2.0\",\n \"maxvalue\": \"3.0\",\n \"color\": \"#E65100\"\n }\n ]\n },\n \"data\": [{\n \"id\": \"NA\",\n \"value\": \".82\",\n \"showLabel\": \"1\"\n \n },\n {\n \"id\": \"SA\",\n \"value\": \"2.04\",\n \"showLabel\": \"1\"\n },\n {\n \"id\": \"AS\",\n \"value\": \"1.78\",\n \"showLabel\": \"1\"\n \n },\n {\n \"id\": \"EU\",\n \"value\": \".40\",\n \"showLabel\": \"1\"\n },\n {\n \"id\": \"AF\",\n \"value\": \"2.58\",\n \"showLabel\": \"1\"\n },\n {\n \"id\": \"AU\",\n \"value\": \"1.30\",\n \"showLabel\": \"1\"\n }\n ]\n };\n}]);\n\n",
html: "\n\n
\n\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex10'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n\n $scope.total = 0;\n\n $scope.logMessage = \"Hover on the plot to see the percentage along with the label\";\n\n // Save the function reference in global object, which will be called inside dataplotrollover event handler\n $scope.log = function(label, value){ \n // Since the update is happening outside angular execution context we need \n // the digest cycle to run to make sure that the view is updated. \n $scope.$apply(function(){\n $scope.logMessage = `
${label} is
${value}% of the total`; \n });\n }\n // datasource\n var 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\", \"value\": \"290\" },\n { \"label\": \"Saudi\", \"value\": \"260\" },\n { \"label\": \"Canada\", \"value\": \"180\" },\n { \"label\": \"Iran\", \"value\": \"140\" },\n { \"label\": \"Russia\", \"value\": \"115\" },\n { \"label\": \"UAE\", \"value\": \"100\" },\n { \"label\": \"US\", \"value\": \"30\" },\n { \"label\": \"China\", \"value\": \"30\"}\n ]\n };\n\n var myData=DataSource.data,total=0;\n for(var i=0;i
\n \n \n \n\n-->\n\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex16'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var chart;\n // datasource\n $scope.myDataSource = {\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\", \"value\": \"290\" },\n { \"label\": \"Saudi\", \"value\": \"260\" },\n { \"label\": \"Canada\", \"value\": \"180\" },\n { \"label\": \"Iran\", \"value\": \"140\" },\n { \"label\": \"Russia\", \"value\": \"115\" },\n { \"label\": \"UAE\", \"value\": \"100\" },\n { \"label\": \"US\", \"value\": \"30\" },\n { \"label\": \"China\", \"value\": \"30\"}\n ]\n };\n $scope.selectedTheme = \"fusion\";\n // initialized event handler\n $scope.initialized = function(chartObj){\n // store the reference of chart instance for further usage\n chart = chartObj;\n };\n $scope.applyTheme = function(e){\n chart.setChartAttribute('theme', e.target.value);\n }\n}]);\n\n",
html: "\n\n\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex17'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var datasetName,\n startValue,\n endValue; \n $scope.myDataSource = {\n \"chart\": {\n \"caption\": \"Android and iOS Devices Sales Projections\",\n \"subCaption\": \"Drag the top of columns to adjust projections for 2017 & 2018\",\n \"numberPrefix\": \"$\",\n \"numberSuffix\": \"M\",\n \"yaxismaxvalue\": \"200\",\n \"theme\": \"fusion\",\n \"plotToolText\": \"$label $seriesName: $dataValue \"\n },\n \"categories\": [{\n \"category\": [{\n \"label\": \"2014\",\n \"fontItalic\": \"0\"\n }, {\n \"label\": \"2015\",\n \"fontItalic\": \"0\"\n }, {\n \"label\": \"2016\",\n \"fontItalic\": \"0\"\n }, {\n \"label\": \"2017 (Projected)\"\n }, {\n \"label\": \"2018 (Projected)\"\n }]\n }],\n \"dataset\": [{\n \"seriesname\": \"Android Devices\",\n \"data\": [{\n \"value\": \"73\",\n \"alpha\": \"100\",\n \"allowDrag\": \"0\"\n }, {\n \"value\": \"80\",\n \"alpha\": \"100\",\n \"allowDrag\": \"0\"\n }, {\n \"value\": \"97\",\n \"alpha\": \"100\",\n \"allowDrag\": \"0\"\n }, {\n \"value\": \"110\",\n \"toolText\": \"$label $seriesName: $dataValue \"\n }, {\n \"value\": \"180\",\n \"toolText\": \"$label $seriesName: $dataValue \"\n }]\n }, {\n \"seriesname\": \"iOS Devices\",\n \"data\": [{\n \"value\": \"63.2\",\n \"alpha\": \"100\",\n \"allowDrag\": \"0\"\n }, {\n \"value\": \"68\",\n \"alpha\": \"100\",\n \"allowDrag\": \"0\"\n }, {\n \"value\": \"82\",\n \"alpha\": \"100\",\n \"allowDrag\": \"0\"\n }, {\n \"value\": \"99\",\n \"toolText\": \"$label $seriesName: $dataValue \"\n }, {\n \"value\": \"150\",\n \"toolText\": \"$label $seriesName: $dataValue \"\n }]\n }]\n };\n $scope.message = \"Drag any column for years 2017 or 2018 to see updated value along with the label\"; \n $scope.dataPlotDragstart = function(event){\n startValue = FusionCharts.formatNumber(event.data.startValue, {\n \"decimals\": \"2\",\n \"numberPrefix\": \"$\",\n \"numberSuffix\": \"M\"\n });; \n }\n $scope.dataPlotDragend = function(event){ \n $scope.$apply(function(){\n datasetName = event.data.datasetName;\n endValue = FusionCharts.formatNumber(event.data.endValue,{\n \"decimals\": \"2\",\n \"numberPrefix\": \"$\",\n \"numberSuffix\": \"M\"\n });\n $scope.message = `${datasetName} is modified to ${endValue} from ${startValue} `;\n });\n }\n}]);\n\n",
html: "\n\n\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex18'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n // datasource\n $scope.myDataSource = {\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\", \"value\": \"290\" },\n { \"label\": \"Saudi\", \"value\": \"260\" },\n { \"label\": \"Canada\", \"value\": \"180\" },\n { \"label\": \"Iran\", \"value\": \"140\" },\n { \"label\": \"Russia\", \"value\": \"115\" },\n { \"label\": \"UAE\", \"value\": \"100\" },\n { \"label\": \"US\", \"value\": \"30\" },\n { \"label\": \"China\", \"value\": \"30\"}\n ]\n };\n // handler for rendercomplete event\n $scope.renderComplete = function(){\n $scope.$apply(function(){\n $scope.message = \"render complete\";\n });\n }\n // handler for drawcomplete event\n $scope.drawComplete = function(){\n $scope.$apply(function(){\n $scope.message = \"draw complete\";\n });\n }\n // handler for beforedataupdate event\n $scope.beforeDataUpdate = function(){\n $scope.$apply(function(){\n $scope.message = \"before data update\";\n });\n }\n // handler for dataupdated event\n $scope.dataUpdated = function(){\n $scope.$apply(function(){\n $scope.message = \"data updated\";\n });\n }\n}]);\n\n",
html: "\n\n\n
\n \n \n \n
\n
\n Status: {{ message }}\n
\n
\n
\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex19'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var disableStyle = {\n \"border-color\": \"#d3d3d3\",\n \"color\": \"#d3d3d3\",\n \"background\": \"none\",\n \"cursor\": \"default\"\n },\n activeStyle = {\n \"border-color\": \"#6957da\",\n \"cursor\": \"pointer\"\n }; \n $scope.message = \"Click the below buttons to add an event dynamically to the chart\";\n $scope.myDataSource = {\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\", \"value\": \"290\" },\n { \"label\": \"Saudi\", \"value\": \"260\" },\n { \"label\": \"Canada\", \"value\": \"180\" },\n { \"label\": \"Iran\", \"value\": \"140\" },\n { \"label\": \"Russia\", \"value\": \"115\" },\n { \"label\": \"UAE\", \"value\": \"100\" },\n { \"label\": \"US\", \"value\": \"30\" },\n { \"label\": \"China\", \"value\": \"30\"}\n ]\n };\n $scope.trackButton = activeStyle;\n $scope.resetButton = disableStyle;\n \n // handler for dataplotclick event\n $scope.clickHandler = function(e){\n $scope.$apply(function(){\n $scope.message = \"You have clicked on plot \"+ e.data.categoryLabel + \" whose value is \" + e.data.displayValue + \" \";\n });\n };\n $scope.track = function(){\n FusionCharts.addEventListener(\"dataplotclick\", $scope.clickHandler);\n $scope.message = \"Click on the plot to see the value along with the label\";\n$scope.trackButton = disableStyle; $scope.resetButton = activeStyle; };\n$scope.reset = function(){ FusionCharts.removeEventListener(\"dataplotclick\",\n$scope.clickHandler); $scope.message = \"Click the below buttons to add an event\ndynamically to the chart\"; $scope.trackButton = activeStyle; $scope.resetButton\n= disableStyle; } // unlisten to dataplotclick event when the view gets\ndestroyed. $scope.$on(\"$destroy\", function() {\nFusionCharts.removeEventListener(\"dataplotclick\", $scope.clickHandler); }); }]);\n\n",
html: "\n\n\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex20'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var chart,\n clickedPlot;\n // datasource\n $scope.myDataSource = {\n \"chart\": {\n \"caption\": \"Market Share of Web Servers\",\n \"plottooltext\": \"$percentValue of web servers run on $label servers\",\n \"showLegend\": \"0\",\n \"enableMultiSlicing\": \"0\",\n \"showPercentValues\": \"1\",\n \"legendPosition\": \"bottom\",\n \"useDataPlotColorForLabels\": \"1\",\n \"theme\": \"fusion\",\n },\n \"data\": [{\n \"label\": \"Apache\",\n \"value\": \"32647479\"\n }, {\n \"label\": \"Microsoft\",\n \"value\": \"22100932\"\n }, {\n \"label\": \"Zeus\",\n \"value\": \"14376\"\n }, {\n \"label\": \"Other\",\n \"value\": \"18674221\"\n }]\n };\n // handler for daplotclick event\n $scope.plotClickHandler = function(event){\n $scope.$apply(function(){\n clickedPlot = (event.data.categoryLabel).toLowerCase();\n if ($scope.selectedItem !== clickedPlot) {\n $scope.selectedItem = clickedPlot;\n } else{\n $scope.selectedItem = 'none';\n }\n });\n };\n // handler for initialzed event\n $scope.initialized = function(chartObj){\n // store the reference of chart instance for further usage\n chart = chartObj;\n };\n $scope.selectedItem = \"none\";\n $scope.noneChecked = function(){\n chart.slicePlotItem(0,false);\n chart.slicePlotItem(1,false);\n chart.slicePlotItem(2,false);\n chart.slicePlotItem(3,false);\n }\n $scope.apacheChecked = function(){\n chart.slicePlotItem(0,true);\n }\n $scope.microsoftChecked = function(){\n chart.slicePlotItem(1,true);\n }\n $scope.zeusChecked = function(){\n chart.slicePlotItem(2,true);\n }\n $scope.otherChecked = function(){\n chart.slicePlotItem(3,true);\n }\n}]);\n",
html: "\n\n\n",
schema: "",
data: ""
};
window.fcDemos['ex21'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var selectedDimension,\n dimensionMap = {\n \"400X250\": {\n width: \"400px\",\n height: \"250px\"\n },\n \"600X350\": {\n width: \"600px\",\n height: \"350px\"\n },\n \"700X400\": {\n width: \"700px\",\n height: \"400px\"\n }\n };\n $scope.dimensionType = \"600X350\"; \n $scope.containerStyle = {height: \"350px\", width: \"600px\"};\n // datasource \n $scope.myDataSource = {\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\", \"value\": \"290\" },\n { \"label\": \"Saudi\", \"value\": \"260\" },\n { \"label\": \"Canada\", \"value\": \"180\" },\n { \"label\": \"Iran\", \"value\": \"140\" },\n { \"label\": \"Russia\", \"value\": \"115\" },\n { \"label\": \"UAE\", \"value\": \"100\" },\n { \"label\": \"US\", \"value\": \"30\" },\n { \"label\": \"China\", \"value\": \"30\"}\n ]\n };\n $scope.buttonClick = function(e){\n selectedDimension = dimensionMap[e.target.value];\n $scope.containerStyle.width = selectedDimension.width;\n $scope.containerStyle.height = selectedDimension.height;\n }\n}]);\n",
html: "\n\n\n
\n
\n \n \n
\n
\n
Choose a dimension: \n
\n \n
\n
\n
\n",
schema: "",
data: ""
};
window.fcDemos['ex22'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var chart;\n $scope.chartType = \"column2d\"; \n // datasource\n $scope.myDataSource = {\n \"chart\": {\n \"caption\": \"Recommended Portfolio Split\",\n \"subCaption\": \"For a net-worth of $1M\",\n \"showValues\": \"1\",\n \"showPercentInTooltip\": \"0\",\n \"numberPrefix\": \"$\",\n \"enableMultiSlicing\": \"1\",\n \"theme\": \"fusion\"\n },\n \"data\": [{\n \"label\": \"Equity\",\n \"value\": \"300000\"\n }, {\n \"label\": \"Debt\",\n \"value\": \"230000\"\n }, {\n \"label\": \"Bullion\",\n \"value\": \"180000\"\n }, {\n \"label\": \"Real-estate\",\n \"value\": \"270000\"\n }, {\n \"label\": \"Insurance\",\n \"value\": \"20000\"\n }]\n };\n // handler for initialized event\n $scope.initialized = function(chartObj){\n // store the reference of chart instance for further usage\n chart = chartObj;\n };\n $scope.buttonClick = function(e){\n // using the stored chart instance reference to change the chart type\n chart.chartType(e.target.value);\n }\n}]);\n",
html: "\n\n\n
\n
\n \n \n \n
\n
\n
Choose a chart type: \n
\n \n
\n
\n
\n",
schema: "",
data: ""
};
window.fcDemos['ex23'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n // datasource\n $scope.myDataSource = {\n \"chart\": {\n \"caption\": \"Bakersfield Central - Total footfalls\",\n \"subCaption\": \"Last week\",\n \"xAxisName\": \"Day\",\n \"yAxisName\": \"No. of Visitors (In 1000s)\",\n \"showValues\": \"0\",\n \"theme\": \"fusion\"\n },\n \"data\": [\n {\n \"label\": \"Mon\",\n \"value\": \"15123\"\n },\n {\n \"label\": \"Tue\",\n \"value\": \"14233\"\n },\n {\n \"label\": \"Wed\",\n \"value\": \"25507\"\n },\n {\n \"label\": \"Thu\",\n \"value\": \"9110\"\n },\n {\n \"label\": \"Fri\",\n \"value\": \"15529\"\n },\n {\n \"label\": \"Sat\",\n \"value\": \"20803\"\n },\n {\n \"label\": \"Sun\",\n \"value\": \"19202\"\n }\n ]\n };\n // annotations object\n $scope.annotations = {\n \"groups\": [\n {\n \"id\": \"anchor-highlight\",\n \"items\": [\n {\n \"id\": \"high-star\",\n \"type\": \"circle\",\n \"x\": \"$dataset.0.set.2.x\",\n \"y\": \"$dataset.0.set.2.y\",\n \"radius\": \"12\",\n \"color\": \"#6baa01\",\n \"border\": \"2\",\n \"borderColor\": \"#f8bd19\"\n },\n {\n \"id\": \"label\",\n \"type\": \"text\",\n \"text\": \"Highest footfall 25.5K\",\n \"fillcolor\": \"#6baa01\",\n \"rotate\": \"90\",\n \"x\": \"$dataset.0.set.2.x+75\",\n \"y\": \"$dataset.0.set.2.y-2\"\n }\n ]\n }\n ]\n };\n}]);\n\n",
html: "\n\n\n\n",
schema: "\n",
data: "\n"
};
window.fcDemos['ex24'] = {
js: "\nvar myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\nmyApp.controller(\"MyController\", [\"$scope\", function($scope){\n var chart;\n $scope.themeName = \"fusion\"; \n // datasource\n $scope.myDataSource = {\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\", \"value\": \"290\" },\n { \"label\": \"Saudi\", \"value\": \"260\" },\n { \"label\": \"Canada\", \"value\": \"180\" },\n { \"label\": \"Iran\", \"value\": \"140\" },\n { \"label\": \"Russia\", \"value\": \"115\" },\n { \"label\": \"UAE\", \"value\": \"100\" },\n { \"label\": \"US\", \"value\": \"30\" },\n { \"label\": \"China\", \"value\": \"30\"}\n ]\n };\n // initialized event handler\n $scope.initialized = function(chartObj){\n // store the reference of chart instance for further usage\n chart = chartObj;\n };\n $scope.changeCaption = function(){\n chart.setChartAttribute('caption', 'Test Caption');\n }\n $scope.changeXAxisName = function(e){\n chart.setChartAttribute('xAxisName', 'Test X-Axis');\n }\n $scope.changeYAxisName = function(e){\n chart.setChartAttribute('yAxisName', 'Test Y-Axis');\n }\n $scope.reset = function(e){\n chart.setChartAttribute('caption', 'Countries With Most Oil Reserves [2017-18]');\n chart.setChartAttribute('xAxisName', 'Country');\n chart.setChartAttribute('yAxisName', 'Reserves (MMbbl)');\n }\n}]);\n",
html: "\n\n\n",
schema: "",
data: ""
};
window.fcDemos['ex31'] = {
js: "\n var jsonify = res => res.json();\n var dataFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/candlestick-chart-data.json'\n ).then(jsonify);\n var schemaFetch = fetch(\n 'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/candlestick-chart-schema.json'\n ).then(jsonify);\n\n var myApp = angular.module(\"myApp\", [\"ng-fusioncharts\"]);\n myApp.controller(\"MyController\", [\"$scope\", function($scope){\n $scope.myDataSource = {\n data: null,\n caption: {\n text: 'Apple Inc. Stock Price'\n },\n yAxis: {\n plot: {\n open: 'Open',\n high: 'High',\n low: 'Low',\n close: 'Close',\n type: 'candlestick'\n },\n title: 'Value'\n }\n };\n\n Promise.all([dataFetch, schemaFetch]).then(res => {\n const data = res[0];\n const schema = res[1];\n const fusionTable = new FusionCharts.DataStore().createDataTable(\n data,\n schema\n );\n $scope.$apply(function() {\n $scope.myDataSource.data = fusionTable;\n });\n });\n }]);\n ",
html: "\n \n \n ",
schema: "\n [\n {\n \"name\": \"Date\",\n \"type\": \"date\",\n \"format\": \"%Y-%m-%d\"\n },\n {\n \"name\": \"Open\",\n \"type\": \"number\"\n },\n {\n \"name\": \"High\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Low\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Close\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Volume\",\n \"type\": \"number\"\n }\n ]\n ",
data: "\n // A shortened version of the data is given here.\n // Please check the link below to see the complete data:\n // https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/candlestick-chart-data.json\n [\n [\n \"1980-12-12\",\n 0.513393,\n 0.515625,\n 0.513393,\n 0.513393,\n 117258400\n ],\n [\n \"1980-12-15\",\n 0.488839,\n 0.488839,\n 0.486607,\n 0.486607,\n 43971200\n ],\n [\n \"1980-12-16\",\n 0.453125,\n 0.453125,\n 0.450893,\n 0.450893,\n 26432000\n ],\n [\n \"1980-12-17\",\n 0.462054,\n 0.464286,\n 0.462054,\n 0.462054,\n 21610400\n ],\n [\n \"1980-12-18\",\n 0.475446,\n 0.477679,\n 0.475446,\n 0.475446,\n 18362400\n ],\n [\n \"1980-12-19\",\n 0.504464,\n 0.506696,\n 0.504464,\n 0.504464,\n 12157600\n ],\n [\n \"1980-12-22\",\n 0.529018,\n 0.53125,\n 0.529018,\n 0.529018,\n 9340800\n ],\n [\n \"1980-12-23\",\n 0.551339,\n 0.553571,\n 0.551339,\n 0.551339,\n 11737600\n ],\n [\n \"1980-12-24\",\n 0.580357,\n 0.582589,\n 0.580357,\n 0.580357,\n 12000800\n ],\n [\n \"1980-12-26\",\n 0.633929,\n 0.636161,\n 0.633929,\n 0.633929,\n 13893600\n ],\n [\n \"1980-12-29\",\n 0.642857,\n 0.645089,\n 0.642857,\n 0.642857,\n 23290400\n ],\n [\n \"1980-12-30\",\n 0.629464,\n 0.629464,\n 0.627232,\n 0.627232,\n 17220000\n ],\n [\n \"1980-12-31\",\n 0.611607,\n 0.611607,\n 0.609375,\n 0.609375,\n 8937600\n ],\n [\n \"1981-01-02\",\n 0.616071,\n 0.620536,\n 0.616071,\n 0.616071,\n 5415200\n ],\n [\n \"1981-01-05\",\n 0.604911,\n 0.604911,\n 0.602679,\n 0.602679,\n 8932000\n ],\n [\n \"1981-01-06\",\n 0.578125,\n 0.578125,\n 0.575893,\n 0.575893,\n 11289600\n ],\n [\n \"1981-01-07\",\n 0.553571,\n 0.553571,\n 0.551339,\n 0.551339,\n 13921600\n ],\n [\n \"1981-01-08\",\n 0.542411,\n 0.542411,\n 0.540179,\n 0.540179,\n 9956800\n ],\n [\n \"1981-01-09\",\n 0.569196,\n 0.571429,\n 0.569196,\n 0.569196,\n 5376000\n ],\n [\n \"1981-01-12\",\n 0.569196,\n 0.569196,\n 0.564732,\n 0.564732,\n 5924800\n ],\n [\n \"1981-01-13\",\n 0.546875,\n 0.546875,\n 0.544643,\n 0.544643,\n 5762400\n ],\n [\n \"1981-01-14\",\n 0.546875,\n 0.549107,\n 0.546875,\n 0.546875,\n 3572800\n ],\n [\n \"1981-01-15\",\n 0.558036,\n 0.5625,\n 0.558036,\n 0.558036,\n 3516800\n ],\n [\n \"1981-01-16\",\n 0.555804,\n 0.555804,\n 0.553571,\n 0.553571,\n 3348800\n ],\n [\n \"1981-01-19\",\n 0.587054,\n 0.589286,\n 0.587054,\n 0.587054,\n 10393600\n ],\n [\n \"1981-01-20\",\n 0.571429,\n 0.571429,\n 0.569196,\n 0.569196,\n 7520800\n ],\n [\n \"1981-01-21\",\n 0.580357,\n 0.584821,\n 0.580357,\n 0.580357,\n 3976000\n ],\n [\n \"1981-01-22\",\n 0.587054,\n 0.591518,\n 0.587054,\n 0.587054,\n 8887200\n ],\n [\n \"1981-01-23\",\n 0.587054,\n 0.589286,\n 0.584821,\n 0.584821,\n 2805600\n ],\n [\n \"1981-01-26\",\n 0.578125,\n 0.578125,\n 0.575893,\n 0.575893,\n 6160000\n ],\n [\n \"1981-01-27\",\n 0.575893,\n 0.575893,\n 0.571429,\n 0.571429,\n 5924800\n ],\n [\n \"1981-01-28\",\n 0.555804,\n 0.555804,\n 0.553571,\n 0.553571,\n 7039200\n ],\n [\n \"1981-01-29\",\n 0.535714,\n 0.535714,\n 0.533482,\n 0.533482,\n 10976000\n ],\n [\n \"1981-01-30\",\n 0.508929,\n 0.508929,\n 0.504464,\n 0.504464,\n 11547200\n ],\n [\n \"1981-02-02\",\n 0.477679,\n 0.477679,\n 0.475446,\n 0.475446,\n 5941600\n ],\n [\n \"1981-02-03\",\n 0.493304,\n 0.495536,\n 0.493304,\n 0.493304,\n 4788000\n ],\n [\n \"1981-02-04\",\n 0.511161,\n 0.513393,\n 0.511161,\n 0.511161,\n 6966400\n ],\n [\n \"1981-02-05\",\n 0.511161,\n 0.515625,\n 0.511161,\n 0.511161,\n 1982400\n ],\n [\n \"1981-02-06\",\n 0.513393,\n 0.515625,\n 0.513393,\n 0.513393,\n 3466400\n ],\n [\n \"1981-02-09\",\n 0.491071,\n 0.491071,\n 0.486607,\n 0.486607,\n 4188800\n ],\n [\n \"1981-02-10\",\n 0.486607,\n 0.488839,\n 0.486607,\n 0.486607,\n 4586400\n ],\n [\n \"1981-02-11\",\n 0.473214,\n 0.473214,\n 0.470982,\n 0.470982,\n 3460800\n ],\n [\n \"1981-02-12\",\n 0.46875,\n 0.46875,\n 0.466518,\n 0.466518,\n 3640000\n ],\n [\n \"1981-02-13\",\n 0.459821,\n 0.459821,\n 0.455357,\n 0.455357,\n 2788800\n ],\n [\n \"1981-02-17\",\n 0.466518,\n 0.46875,\n 0.466518,\n 0.466518,\n 3068800\n ],\n [\n \"1981-02-18\",\n 0.486607,\n 0.491071,\n 0.486607,\n 0.486607,\n 4810400\n ],\n [\n \"1981-02-19\",\n 0.459821,\n 0.459821,\n 0.457589,\n 0.457589,\n 5577600\n ],\n [\n \"1981-02-20\",\n 0.435268,\n 0.435268,\n 0.433036,\n 0.433036,\n 6092800\n ],\n [\n \"1981-02-23\",\n 0.439732,\n 0.441964,\n 0.439732,\n 0.439732,\n 3528000\n ],\n [\n \"1981-02-24\",\n 0.428571,\n 0.428571,\n 0.424107,\n 0.424107,\n 4244800\n ],\n [\n \"1981-02-25\",\n 0.450893,\n 0.453125,\n 0.450893,\n 0.450893,\n 4872000\n ],\n [\n \"1981-02-26\",\n 0.457589,\n 0.459821,\n 0.457589,\n 0.457589,\n 2710400\n ],\n [\n \"1981-02-27\",\n 0.473214,\n 0.477679,\n 0.473214,\n 0.473214,\n 3690400\n ],\n [\n \"1981-03-02\",\n 0.475446,\n 0.477679,\n 0.475446,\n 0.475446,\n 2940000\n ],\n [\n \"1981-03-03\",\n 0.470982,\n 0.470982,\n 0.46875,\n 0.46875,\n 4043200\n ],\n [\n \"1981-03-04\",\n 0.466518,\n 0.466518,\n 0.464286,\n 0.464286,\n 3427200\n ],\n [\n \"1981-03-05\",\n 0.464286,\n 0.464286,\n 0.462054,\n 0.462054,\n 1344000\n ],\n [\n \"1981-03-06\",\n 0.462054,\n 0.462054,\n 0.457589,\n 0.457589,\n 2900800\n ],\n [\n \"1981-03-09\",\n 0.424107,\n 0.424107,\n 0.421875,\n 0.421875,\n 3830400\n ],\n [\n \"1981-03-10\",\n 0.404018,\n 0.404018,\n 0.401786,\n 0.401786,\n 7095200\n ],\n [\n \"1981-03-11\",\n 0.390625,\n 0.390625,\n 0.386161,\n 0.386161,\n 7464800\n ],\n [\n \"2018-09-11\",\n 218.009995,\n 224.300003,\n 216.559998,\n 223.850006,\n 35749000\n ],\n [\n \"2018-09-12\",\n 224.940002,\n 225,\n 219.839996,\n 221.070007,\n 49278700\n ],\n [\n \"2018-09-13\",\n 223.520004,\n 228.350006,\n 222.570007,\n 226.410004,\n 41706400\n ],\n [\n \"2018-09-14\",\n 225.75,\n 226.839996,\n 222.520004,\n 223.839996,\n 31999300\n ],\n [\n \"2018-09-17\",\n 222.149994,\n 222.949997,\n 217.270004,\n 217.880005,\n 37195100\n ],\n [\n \"2018-09-18\",\n 217.789993,\n 221.850006,\n 217.119995,\n 218.240005,\n 31571700\n ],\n [\n \"2018-09-19\",\n 218.5,\n 219.619995,\n 215.300003,\n 218.369995,\n 27123800\n ],\n [\n \"2018-09-20\",\n 220.240005,\n 222.279999,\n 219.149994,\n 220.029999,\n 26608800\n ],\n [\n \"2018-09-21\",\n 220.779999,\n 221.360001,\n 217.289993,\n 217.660004,\n 96246700\n ],\n [\n \"2018-09-24\",\n 216.820007,\n 221.259995,\n 216.630005,\n 220.789993,\n 27693400\n ],\n [\n \"2018-09-25\",\n 219.75,\n 222.820007,\n 219.699997,\n 222.190002,\n 24554400\n ],\n [\n \"2018-09-26\",\n 221,\n 223.75,\n 219.759995,\n 220.419998,\n 23984700\n ],\n [\n \"2018-09-27\",\n 223.820007,\n 226.440002,\n 223.539993,\n 224.949997,\n 30181200\n ],\n [\n \"2018-09-28\",\n 224.789993,\n 225.839996,\n 224.020004,\n 225.740005,\n 22929400\n ],\n [\n \"2018-10-01\",\n 227.949997,\n 229.419998,\n 226.350006,\n 227.259995,\n 23600800\n ],\n [\n \"2018-10-02\",\n 227.25,\n 230,\n 226.630005,\n 229.279999,\n 24788200\n ],\n [\n \"2018-10-03\",\n 230.050003,\n 233.470001,\n 229.779999,\n 232.070007,\n 28654800\n ],\n [\n \"2018-10-04\",\n 230.779999,\n 232.350006,\n 226.729996,\n 227.990005,\n 32042000\n ],\n [\n \"2018-10-05\",\n 227.960007,\n 228.410004,\n 220.580002,\n 224.289993,\n 33580500\n ],\n [\n \"2018-10-08\",\n 222.210007,\n 224.800003,\n 220.199997,\n 223.770004,\n 29663900\n ],\n [\n \"2018-10-09\",\n 223.639999,\n 227.270004,\n 222.25,\n 226.869995,\n 26891000\n ],\n [\n \"2018-10-10\",\n 225.460007,\n 226.350006,\n 216.050003,\n 216.360001,\n 41990600\n ],\n [\n \"2018-10-11\",\n 214.520004,\n 219.5,\n 212.320007,\n 214.449997,\n 53124400\n ],\n [\n \"2018-10-12\",\n 220.419998,\n 222.880005,\n 216.839996,\n 222.110001,\n 40337900\n ],\n [\n \"2018-10-15\",\n 221.160004,\n 221.830002,\n 217.270004,\n 217.360001,\n 30791000\n ],\n [\n \"2018-10-16\",\n 218.929993,\n 222.990005,\n 216.759995,\n 222.149994,\n 29184000\n ],\n [\n \"2018-10-17\",\n 222.300003,\n 222.639999,\n 219.339996,\n 221.190002,\n 22885400\n ],\n [\n \"2018-10-18\",\n 217.860001,\n 219.740005,\n 213,\n 216.020004,\n 32581300\n ],\n [\n \"2018-10-19\",\n 218.059998,\n 221.259995,\n 217.429993,\n 219.309998,\n 33078700\n ],\n [\n \"2018-10-22\",\n 219.789993,\n 223.360001,\n 218.940002,\n 220.649994,\n 28792100\n ],\n [\n \"2018-10-23\",\n 215.830002,\n 223.25,\n 214.699997,\n 222.729996,\n 38767800\n ],\n [\n \"2018-10-24\",\n 222.600006,\n 224.229996,\n 214.539993,\n 215.089996,\n 40925500\n ],\n [\n \"2018-10-25\",\n 217.710007,\n 221.380005,\n 216.75,\n 219.800003,\n 29855800\n ],\n [\n \"2018-10-26\",\n 215.899994,\n 220.190002,\n 212.669998,\n 216.300003,\n 47258400\n ],\n [\n \"2018-10-29\",\n 219.190002,\n 219.690002,\n 206.089996,\n 212.240005,\n 45935500\n ],\n [\n \"2018-10-30\",\n 211.149994,\n 215.179993,\n 209.270004,\n 213.300003,\n 36660000\n ],\n [\n \"2018-10-31\",\n 216.880005,\n 220.449997,\n 216.619995,\n 218.860001,\n 38358900\n ],\n [\n \"2018-11-01\",\n 219.050003,\n 222.360001,\n 216.809998,\n 222.220001,\n 58323200\n ],\n [\n \"2018-11-02\",\n 209.550003,\n 213.649994,\n 205.429993,\n 207.479996,\n 91328700\n ],\n [\n \"2018-11-05\",\n 204.300003,\n 204.389999,\n 198.169998,\n 201.589996,\n 66163700\n ],\n [\n \"2018-11-06\",\n 201.919998,\n 204.720001,\n 201.690002,\n 203.770004,\n 31882900\n ],\n [\n \"2018-11-07\",\n 205.970001,\n 210.059998,\n 204.130005,\n 209.949997,\n 33424400\n ],\n [\n \"2018-11-08\",\n 209.979996,\n 210.119995,\n 206.75,\n 208.490005,\n 25362600\n ],\n [\n \"2018-11-09\",\n 205.550003,\n 206.009995,\n 202.25,\n 204.470001,\n 34365800\n ],\n [\n \"2018-11-12\",\n 199,\n 199.850006,\n 193.789993,\n 194.169998,\n 51135500\n ],\n [\n \"2018-11-13\",\n 191.630005,\n 197.179993,\n 191.449997,\n 192.229996,\n 46882900\n ],\n [\n \"2018-11-14\",\n 193.899994,\n 194.479996,\n 185.929993,\n 186.800003,\n 60801000\n ],\n [\n \"2018-11-15\",\n 188.389999,\n 191.970001,\n 186.899994,\n 191.410004,\n 46478800\n ],\n [\n \"2018-11-16\",\n 190.5,\n 194.970001,\n 189.460007,\n 193.529999,\n 36208500\n ]\n ]\n "
};
AngularJS FusionCharts
Simple and effective AngularJS bindings for FusionCharts JavaScript Charting Library.
The Angular JS module lets you easily include FusionCharts in your AngularJS projects and add interactive charts to your
AngularJS applications.
Features
Allows you to enable interactivity between Javascript charts
Adds a chart from a JSON URL, from a XML URL, or using props Binding.
{{currentTitle}}
Quick Demo:
Step 1: Include angularjs-fusioncharts.js
In your HTML, include
fusioncharts
library,
angularjs
core file, and
angularjs-fusioncharts
directive :
Step 2: Include
ng-fusioncharts
in your module
In the app, include
ng-fusioncharts
as a dependency. If you looking for where to add the dependency, look
for the call to
angular.module
in your code.
Step 3: Add the
fusioncharts
directive
In your HTML, find the section where you wish to add the chart and add a
<div>
with the
fusioncharts
directive. We are assuming it's inside a controller called
MyController
which would change based on your usage.
Step 4: Populate required variables in controller
In the previous code, we are binding to a scope variable myDataSource, but that hasn't been defined yet. In your controller,
set the DataSource as you would for a regular FusionCharts JSON format DataSource (see
this tutorial for a general introduction to this format).
And your chart should display when you load the page.
Usage and integration of FusionTime
In the app, include
ng-fusioncharts
as a dependency. If you looking for where to add the dependency, look
for the call to
angular.module
in your code.
Consider the example below for integration of FusionTime
If you've included angular-fusioncharts.js
and fusioncharts in your html
then add the following script
tag:
In your index.html
In your script.js
Use a bundler like browserify to bundle the script
See the installation docs here
Again in your index.html
Licensing
React-FusionCharts module is licensed under open-source, distributed under the terms of the MIT/X11
License. You will still need to include FusionCharts in your page, as this project provides no
direct functionality. You can download a free evaluation version
here . To use in a commercial environment, please
purchase a FusionCharts license .