Coder Social home page Coder Social logo

chart_builder's Introduction

c3js_chart_builder

Sample demo to create png out of d3js charts in server side by using phantomjs server

        How to Use (For Windows)

1:Install phantomJS http://attester.ariatemplates.com/usage/phantom.html

2:Download this project zip and extract

3:Open command prompt, navigate to this project directory

4:run command "phantomjs server.js" , this will start the server ,if everything goes well you can see the following message "web server is running on port 9494"

5:post data using "curl -X POST -d @testdata.json -H "Content-Type: application/json" localhost:9494"

Post Params

6: See post params example in testdata.json file

To Add new charts

7: so if you want to create new charts just make a copy of chart.html , change the code in chartBuilder function, make sure not change function name and not remove added scripts.

8: change the "inFile" in input data to match the new html.file

For linux users

9: check server.js code line #9 url = 'file:///' + fs.absolute('./'+drawerPayload.inFile); you might have to change

Thanks subramanya2107 for d3js-phantomjs-demo example

chart_builder's People

Contributors

ilnuro avatar xysevenf avatar elvir avatar

Watchers

James Cloos avatar Alexander Mescheryakov avatar  avatar  avatar  avatar Artur Shaidullin avatar IQ300Company Account avatar Irina avatar Vitaliy A avatar  avatar Azat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.