A powerful yet simple Javascript chart library, built on top of JavaScript and JSON which unleash the power of SVG to create Smart, Interactive, Responsive, High Performance Charts.
IE / Edge |
Firefox |
Chrome |
Safari |
Opera |
---|---|---|---|---|
Edge | 51+ | 56+ | 10+ | 43+ |
npm install smartcharts-nxt --save
<script src="https://cdn.jsdelivr.net/npm/smartcharts-nxt"></script>
var SmartChartsNXT = require('smartcharts-nxt');
import SmartChartsNXT from 'smartcharts-nxt';
To create a simple Line Chart with minimal configuration, write as follows :
SmartChartsNXT.ready()
.then( () => {
let lineChart = new SmartChartsNXT.Chart({
"type": SmartChartsNXT.CHART_TYPE.LINE_CHART,
"targetElem": "chartContainer",
"dataSet": {
"xAxis": {
"categories": ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
"series": [{
"name": "Temperature",
"data": [2.6, 4.0, 6.4, 9.9, 13.8, 16.9, 18.7, 18.3, 15.4, 10.8 ,6.3, 3.4]
}]
}
});
});
This will render this line chart inside element with id #chartContainer
.