Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Multiple Y-Axes example in README seems to be outdated #77

Open
SvHu opened this issue Oct 18, 2021 · 1 comment
Open

[BUG] Multiple Y-Axes example in README seems to be outdated #77

SvHu opened this issue Oct 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@SvHu
Copy link

SvHu commented Oct 18, 2021

Describe the bug
When adding example data to application to produce multiple Y-Axes then it does not work and produces error undefined method 'first' for 1.4:Float

To Reproduce
Steps to reproduce the behavior:

  1. copy code to your app
  2. visit page

Expected behavior
Should see same chart as given in readme file

Additional context
And even if I do something like this, then the opposite yaxis still wont appear

series = [
        {
          name: 'Income',
          type: 'column',
          data: {2009 => 1.1, 2010 => 2, 2011=>2.5, 2012=>1.5}
          #[1.4, 2, 2.5, 1.5, 2.5, 2.8, 3.8, 4.6]
        },
        {
          name: 'Cashflow',
          type: 'column',
          data: {2009 => 1.1, 2010=> 2, 2011=>3.17, 2012=>4}
          #[1.1, 3, 3.1, 4, 4.1, 4.9, 6.5, 8.5]
        },
        {
          name: 'Revenue',
          data: {2009 => 20, 2010=> 29, 2011=>37, 2012=>36}
          #[20, 29, 37, 36, 44, 45, 50, 58]
        }
      ]

      xaxis = {
        title: {text: 'Year'},
        categories: [2009, 2010, 2011, 2012]
      }

      yaxis = [
        {title: {text: "Income"}},
        {
          title: {text: "Operating Cashflow"},
          opposite: true,
          seriesName: 'Cashflow'
        },
        {
          title: {text: "Revenue"},
          opposite: true,
          seriesName: 'Revenue'
        }
      ]
      line_chart(series, xaxis: xaxis, yaxis: yaxis, defer: true)

It would be nice if there would be actually example for combo_chart chart also

@SvHu SvHu added the bug Something isn't working label Oct 18, 2021
@SvHu
Copy link
Author

SvHu commented Oct 18, 2021

Oh, I just noticed that actually these changes are still only in master branch and not in any latest version. Also FYI version 1.11.0 needs try schema version which requires ruby 2.6.0. I'm using ruby 2.5 so that is at least blocked also for me. Please update the gem requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant