Skip to content

Commit 9c10cf8

Browse files
committed
Merge branch 'release/1.0.4'
2 parents 54f06ff + 76df674 commit 9c10cf8

File tree

6 files changed

+15
-25
lines changed

6 files changed

+15
-25
lines changed

dist/react-fusioncharts.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
2020

2121
var _react2 = _interopRequireDefault(_react);
2222

23-
var FusionCharts = typeof window !== 'undefined' ? window['FusionCharts'] : typeof global !== 'undefined' ? global['FusionCharts'] : null;
23+
var _fusioncharts = (typeof window !== "undefined" ? window['FusionCharts'] : typeof global !== "undefined" ? global['FusionCharts'] : null);
2424

25-
if (typeof FusionCharts === 'undefined') {
26-
FusionCharts = require('fusioncharts');
27-
}
25+
var _fusioncharts2 = _interopRequireDefault(_fusioncharts);
2826

2927
var ReactFC = (function (_React$Component) {
3028
_inherits(ReactFC, _React$Component);
@@ -43,7 +41,7 @@ var ReactFC = (function (_React$Component) {
4341
this.fcConfig = props;
4442
this.renderAt = propsObj.renderAt;
4543

46-
this.chartObj = new FusionCharts(this.fcConfig);
44+
this.chartObj = new _fusioncharts2['default'](this.fcConfig);
4745

4846
this.getRenderAt = function () {
4947
return _this.renderAt || _this.chartObj.id + '-container';
@@ -106,5 +104,5 @@ exports['default'] = ReactFC;
106104
module.exports = exports['default'];
107105

108106
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
109-
},{"fusioncharts":undefined}]},{},[1])(1)
107+
},{}]},{},[1])(1)
110108
});

dist/react-fusioncharts.min.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.

example/src/url-sample.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<!doctype html>
22
<head>
33
<title>react-fc</title>
4-
<link rel="stylesheet" href="example.css">
54
</head>
65
<body>
76
<div class="container">
8-
<h1>react-fc</h1>
9-
<h2><a href="https://github.com/rohitkr/react-fc">View project on GitHub</a></h2>
7+
<h1>react-fusioncharts</h1>
8+
<h3><a href="https://github.com/fusioncharts/react-fusioncharts-component">View project on GitHub</a></h3>
109
<!-- the example app is rendered into this div -->
11-
<div id="app"></div>
10+
<div id="app"> Loading chart... </div>
1211
<div class="hint">
1312
<!-- put any hints about your component example here -->
1413
</div>

lib/ReactFC.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ var _react = require('react');
1818

1919
var _react2 = _interopRequireDefault(_react);
2020

21-
var FusionCharts = typeof window !== 'undefined' ? window['FusionCharts'] : typeof global !== 'undefined' ? global['FusionCharts'] : null;
21+
var _fusioncharts = require('fusioncharts');
2222

23-
if (typeof FusionCharts === 'undefined') {
24-
FusionCharts = require('fusioncharts');
25-
}
23+
var _fusioncharts2 = _interopRequireDefault(_fusioncharts);
2624

2725
var ReactFC = (function (_React$Component) {
2826
_inherits(ReactFC, _React$Component);
@@ -41,7 +39,7 @@ var ReactFC = (function (_React$Component) {
4139
this.fcConfig = props;
4240
this.renderAt = propsObj.renderAt;
4341

44-
this.chartObj = new FusionCharts(this.fcConfig);
42+
this.chartObj = new _fusioncharts2['default'](this.fcConfig);
4543

4644
this.getRenderAt = function () {
4745
return _this.renderAt || _this.chartObj.id + '-container';

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-fusioncharts",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "React FusionCharts",
55
"main": "lib/ReactFC.js",
66
"author": "FusionCharts",
@@ -54,7 +54,8 @@
5454
"react": "^0.14.0"
5555
},
5656
"browserify-shim": {
57-
"react": "global:React"
57+
"react": "global:React",
58+
"fusioncharts": "global:FusionCharts"
5859
},
5960
"scripts": {
6061
"build": "gulp clean && NODE_ENV=production gulp build",

src/ReactFC.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import React from 'react';
2-
3-
var FusionCharts = (typeof window !== 'undefined' ? window['FusionCharts'] :
4-
typeof global !== 'undefined' ? global['FusionCharts'] : null);
5-
6-
if (typeof FusionCharts === 'undefined') {
7-
FusionCharts = require('fusioncharts');
8-
}
2+
import FusionCharts from 'fusioncharts';
93

104
class ReactFC extends React.Component {
115
constructor (props) {

0 commit comments

Comments
 (0)