You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

chart-generator-for-highcharts-js

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chart-generator-for-highcharts-js

Generate Highcharts using the highcharts api, javascript, and jade

4.0.4
latest
npmnpm
Version published
Maintainers
1
Created
Source

Highchart Generator using node js, bootstrap and Highcharts api

This module supports Jade templating language.

Installation steps:

  • npm install chart-generator-for-highcharts-js

  • npm install

  • in your app.js file do the following:

    • Include the package var hc = require('chart-generator-for-highcharts-js'); and add the following lines app.use(hc);
  • in the routes folder access the index.js file add the following line to render the content routes / index.js

    var express = require('express'); var router = express.Router(); var hc = require('chart-generator-for-highcharts-js');

    /* GET home page. */ router.get('/', function(req, res, next) {

    res.render('index', { title: 'Express', hc: hc}); });

    module.exports = router;

  • in the main jade file add the following lines of code views/index.jade

     div#dataForm
             script(src="https://code.highcharts.com/highcharts.js")
             script(src="https://code.highcharts.com/modules/funnel.js")
             script(src="https://code.highcharts.com/modules/exporting.js")
             script(src="/javascripts/index.js")
     div(id="tabs" style="display:none;")
         ul.nav.nav-tabs
             li.active
                 a(href='#pieChart' id="pie" onclick='init(); showPie();' data-toggle="tab") Pie Chart
             li
                 a(href='#barChart' id="bar" onclick='init(); showBar();'  data-toggle="tab") Bar Chart
             li
                 a(href='#lineChart' id="line" onclick='init(); showLine();'  data-toggle="tab") Pyramid Chart
     
         div
             div(id="pieChart" class="charts",style="display:none;width:42%;")
                 h2.
                     Pie Charts
             div(id="barChart" class="charts",style="display:none;width:45%;")
                 h2.
                     Column Chart
             div(id="lineChart" class="charts",style="display:none;width:45%;")
                 h2.
                     Pyramid Chart
    

Supports use of pie charts, bar chart and pyrmaid graphs. NB: Any data values entered for data fields must be numeric or it wont render.

FAQs

Package last updated on 11 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts