Skip to content

Commit

Permalink
Removed jQuery dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Amaral committed Apr 15, 2019
1 parent 86ce7bf commit 1e431b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class ChartWeb extends Component {
}
</style>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
${this.props.stock ? '<script src="https://code.highcharts.com/stock/highstock.js"></script>'
: '<script src="https://code.highcharts.com/highcharts.js"></script>'}
${this.props.more ? '<script src="https://code.highcharts.com/highcharts-more.js"></script>'
Expand All @@ -40,10 +39,9 @@ class ChartWeb extends Component {
: ''}
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script>
$(function () {
document.addEventListener("DOMContentLoaded", function(event) {
Highcharts.setOptions(${JSON.stringify(this.props.options)});
Highcharts.${this.props.stock ? 'stockChart' : 'chart'}('container', `,
end:` );
Highcharts.${this.props.stock ? 'stockChart' : 'chart'}('container', `, end: `);
});
</script>
</head>
Expand Down
6 changes: 2 additions & 4 deletions react-native-highcharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class ChartWeb extends Component {
}
</style>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
${this.props.stock ? '<script src="https://code.highcharts.com/stock/highstock.js"></script>'
: '<script src="https://code.highcharts.com/highcharts.js"></script>'}
${this.props.more ? '<script src="https://code.highcharts.com/highcharts-more.js"></script>'
Expand All @@ -40,10 +39,9 @@ class ChartWeb extends Component {
: ''}
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script>
$(function () {
document.addEventListener("DOMContentLoaded", function(event) {
Highcharts.setOptions(${JSON.stringify(this.props.options)});
Highcharts.${this.props.stock ? 'stockChart' : 'chart'}('container', `,
end:` );
Highcharts.${this.props.stock ? 'stockChart' : 'chart'}('container', `, end: `);
});
</script>
</head>
Expand Down

0 comments on commit 1e431b8

Please sign in to comment.