smartcharts-nxt
v1.0.0-rc.6
Published
Lightweight, simple and flexible Ultra fast SVG based js chart library for Mobile, Web and App.
Downloads
11
Maintainers
Readme
SmartChartsNXT
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.
Browsers support
| IE / Edge | Firefox | Chrome | Safari | Opera | | --------- | --------- | --------- | --------- | --------- | | Edge | 51+| 56+ | 10+| 43+
Download and Installation
Installing via npm
npm install smartcharts-nxt --save
Direct <script> include
<script src="https://cdn.jsdelivr.net/npm/smartcharts-nxt"></script>
Usage
CommonJS
var SmartChartsNXT = require('smartcharts-nxt');
ESM
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
.