cqs-opt

1.0.0 • Public • Published

Steps to use cqs-opt are displayed in the following file

// Import jquery
var $ = require('jquery');
window.jQuery = $;

// Import myriad highchart component
var React = require('react');
var Highchart = React.createFactory(require('../Highchart'));

// Import the chart config from cqs-opt library
import LineChart from "cqs-opt/src/vizspecs/LineChart";

class RenderHighchartContainer extends React.PureComponent {
    
  render() {
    
    // Data which is essential to draw the chart
    const configData = {
      categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
      data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
      scrollbar: false,
      series: [{
          data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
      }]
    };

    
    return Highchart({
      ref: 'monitor-viz',
      height: '65vh',
      configs: [LineChart(configData)],
      width: 300
    });
  }
}
export default RenderHighchartContainer; 

Contributions & Maintainer


Readme

Keywords

none

Package Sidebar

Install

npm i cqs-opt

Weekly Downloads

7

Version

1.0.0

License

none

Unpacked Size

4.84 MB

Total Files

578

Last publish

Collaborators

  • aniketk007