Skip to content

Commit be3cd89

Browse files
committed
Readme fix for jsx
1 parent da45a1b commit be3cd89

File tree

1 file changed

+32
-17
lines changed

1 file changed

+32
-17
lines changed

README.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -222,23 +222,38 @@ import DrillDown from 'react-fusioncharts/components/DrillDown';
222222
DrillDown.fcRoot(FusionCharts, Charts);
223223
```
224224

225-
```xml
226-
<DrillDown
227-
dataSource={dataSource} /* Same as ReactFC's dataSource */
228-
plotChildMap={plotChildMap}
229-
btnConfig={btnConfig}
230-
btnStyle={btnStyle}
231-
dataFormat={dataFormat} /* Same as ReactFC's dataFormat */
232-
type={type} /* Same as ReactFC's type */
233-
height={height} /* Same as ReactFC's height */
234-
width={width} /* Same as ReactFC's width */
235-
...other /* Other ReactFC attributes like events for parent chart*/
236-
>
237-
<ReactFC /> /* ReactFC as a child */
238-
<ReactFC />
239-
...
240-
<DrillDown></DrillDown> /* DrillDown as a child for next level drill down*/
241-
</DrillDown>
225+
```jsx
226+
class MyComponent extends React.Component{
227+
constructor(props){
228+
super(props);
229+
this.plotChildMap = [ 0, 2, 1 ];
230+
this.dataSource = /*Data Source A : Given above */ ;
231+
this.btnConfig = {text : 'Back'};
232+
this.type= 'column2d';
233+
this.height = 400;
234+
this.width = 400;
235+
}
236+
render(){
237+
return (
238+
<DrillDown
239+
dataSource={dataSource}
240+
plotChildMap={plotChildMap}
241+
btnConfig={btnConfig}
242+
btnStyle={btnStyle}
243+
dataFormat={dataFormat}
244+
type={type}
245+
height={height}
246+
width={width}
247+
...other
248+
>
249+
<ReactFC /> /* ReactFC as a child */
250+
<ReactFC />
251+
...
252+
<DrillDown></DrillDown> /* DrillDown as a child for next level drill down*/
253+
</DrillDown>
254+
)
255+
}
256+
}
242257
```
243258

244259
#### Attribute Description

0 commit comments

Comments
 (0)