Git Product home page Git Product logo

Comments (4)

airblade avatar airblade commented on August 15, 2024

The current version of this gem bundles Chart.js v1.0.2. It doesn't know about plugins; I imagine you could add a plugin by getting the asset pipeline to pick it up after Chart.js, but I haven't tried it.

The gem doesn't do anything to the x axis; you get whatever Chart.js gives you.

What sort of error are you seeing?

from chartjs-ror.

pjammer avatar pjammer commented on August 15, 2024

Using <%= line_chart @data, {width: 1000, generateLegend: true, scaleOverride: true} %>


chartjs-ror (2.2.0) lib/chartjs/axis_helpers.rb:27:in `each'
chartjs-ror (2.2.0) lib/chartjs/axis_helpers.rb:27:in `max'
chartjs-ror (2.2.0) lib/chartjs/axis_helpers.rb:27:in `ordinate_scale'
chartjs-ror (2.2.0) lib/chartjs/chart_helpers.rb:25:in `chart'
chartjs-ror (2.2.0) lib/chartjs/chart_helpers.rb:7:in `block (2 levels) in '
app/views/datastores/compare.html.erb:4:in `_app_views_datastores_compare_html_erb__3985059706827773447_70232126434220'

No error on scaleSteps: 2 example above anymore, i think i had a dodgy chartjs.scatter mucking up the assets dir. I got rid of it and this is the only error i am getting now, but i don't know what scaleOverride:true does anyways, just thought i'd report.

from chartjs-ror.

airblade avatar airblade commented on August 15, 2024

You didn't include the actual exception message so I'm not sure what the problem is. Could you post the message please?

However I suggest you leave out the scaleOverride: true altogether. I originally put it in because I wanted the y-axis scale handled differently in my app (see chartjs/Chart.js#132) – but now I think this gem should be a simple wrapper around Chart.js, without any extra functionality.

from chartjs-ror.

airblade avatar airblade commented on August 15, 2024

Closing this because I've upgraded the plugin (v3.0.0) to use Chart.js v2.1.4, which has a different way of scaling.

from chartjs-ror.

Related Issues (20)

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.