@@ -27,18 +27,15 @@ import React from 'react';
2727import ReactDOM from ' react-dom' ;
2828import FusionCharts from ' fusioncharts' ;
2929import Charts from ' fusioncharts/fusioncharts.charts' ;
30- import OceanTheme from ' fusioncharts/themes/fusioncharts.theme.ocean' ;
3130import ReactFC from ' react-fusioncharts' ;
3231
3332Charts (FusionCharts);
34- OceanTheme (FusionCharts);
3533
3634const myDataSource = {
3735 chart: {
3836 caption: ' Harry\' s SuperMart' ,
3937 subCaption: ' Top 5 stores in last month by revenue' ,
4038 numberPrefix: ' $' ,
41- theme: ' ocean' ,
4239 },
4340 data: [
4441 {
@@ -73,13 +70,60 @@ const chartConfigs = {
7370};
7471
7572ReactDOM .render (
76- < div>
77- < ReactFC {... chartConfigs} / >
78- < / div> ,
73+ < ReactFC {... chartConfigs} / > ,
7974 document .getElementById (' root' ),
8075);
8176```
8277
78+ ## Using Licensed Version of FusionCharts
79+
80+ While using licensed version of ` FusionCharts ` , you need to specify library as follows:
81+
82+ Specify library for all charts:
83+
84+ ``` javascript
85+ import React from ' react' ;
86+ import ReactDOM from ' react-dom' ;
87+ // Here import licensed version of FusionCharts
88+ import FusionCharts from ' ./library_path/fusioncharts' ;
89+ import Charts from ' ./library_path/fusioncharts/fusioncharts.charts' ;
90+ import ReactFC from ' react-fusioncharts' ;
91+
92+ // Provide FusionCharts core and other modules to resolve
93+ ReactFC .fcRoot (FusionCharts, Charts)
94+
95+ ...... ..
96+
97+ ```
98+
99+ Specify library for a particular chart:
100+
101+ ``` javascript
102+ import React from ' react' ;
103+ import ReactDOM from ' react-dom' ;
104+ // Here import licensed version of FusionCharts
105+ import FusionCharts from ' ./library_path/fusioncharts' ;
106+ import Charts from ' ./library_path/fusioncharts/fusioncharts.charts' ;
107+ import ReactFC from ' react-fusioncharts' ;
108+
109+ // Resolve modules
110+ Charts (FusionCharts)
111+
112+ ReactDOM .render (
113+ < ReactFC
114+ width= " 600"
115+ height= " 400"
116+ type= " column2d"
117+ dataSource= { /* Chart data source */ }
118+ fcLibrary= {FusionCharts} // Provide FusionCharts library
119+ / > ,
120+ document .getElementById (' root' ),
121+ );
122+
123+ ...... .
124+
125+ ```
126+
83127## Test
84128
85129``` sh
0 commit comments