Giter VIP home page Giter VIP logo

phantom-chart-to-png's People

Contributors

mamor avatar renatocassino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

phantom-chart-to-png's Issues

Can't create a PNG using the command or the scripts provided in examples

When I try to render a Chart JS or Google chart using phantomjs on the command line or using the PHP example you provided:

phantomjs chartjs.coffee chartjs.png 600 400 line '{"labels":["January","February","March","April","May","June","July"],"datasets":[{"fillColor":"rgba(220, 220, 220, 0.5)","strokeColor":"rgba(220, 220, 220, 1)","pointColor":"rgba(220, 220, 220, 1)","pointStrokeColor":"#fff","data":[65,59,90,81,56,55,40]},{"fillColor":"rgba(151, 187, 205, 0.5)","strokeColor":"rgba(151, 187, 205, 1)","pointColor":"rgba(151, 187, 205, 1)","pointStrokeColor":"#fff","data":[28,48,40,19,96,27,100]}]}' '{"scaleLineWidth":"5"}'

I get the following error:

TypeError: undefined is not a constructor (evaluating 'extensions[ext](this, this.filename)') _load@phantomjs://platform/bootstrap.js:278:24 require@phantomjs://platform/bootstrap.js:311:21 require@phantomjs://platform/bootstrap.js:263:32 global code@phantomjs://code/script.js:7:12

I am using OS X El Capitan, phantomJS installed as an NPM module as you said in the README file.

How can I fix it?

Error running google chart

Hello

The command to create chart are working fine, but the code to generate google chart are returning this error:

phantomjs googlecharts.js googlecharts.png 600 400 ComboChart '[["Month","Bolivia","Ecuador","Madagascar","Papua New Guinea","Rwanda","Average"],["2004\/05",165,938,522,998,450,614.6],["2005\/06",135,1120,599,1268,288,682],["2006\/07",157,1167,587,807,397,623],["2007\/08",139,1110,615,968,215,609.4],["2008\/09",136,691,629,1026,366,569.6]]' '{"title":"Monthly Coffee Production by Country","vAxis":{"title":"Cups"},"hAxis":{"title":"Month"},"seriesType":"bars","series":{"5":{"type":"line"}}}'


PHANTOM ERROR: ReferenceError: Can't find variable: $
TRACE:
 -> undefined: 3
 -> undefined: 20

  phantomjs://code/googlecharts.js:19 in onError

How can I solve this?

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.