image-charts / image-charts/ruby

wrong number of arguments (given 1, expected 0)

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
6
Forks
1
PR merge metrics
No merged PRs in 30d

Description

I want to build an image and I use the code from the docs/example:

ImageCharts()
            .cht('bvg') # vertical bar chart
            .chs('300x300') # 300px x 300px
            .chd('a:60,40') # 2 data points: 60 and 40
            .to_file('/tmp/chart.png')

I always get wrong number of arguments (given 1, expected 0) no matter what I change/adapt.

Even this one fails with the same error

ImageCharts().cht('bvg')

When I leave the arguments empty
ImageCharts().cht()
I get this error message
wrong number of arguments (given 0, expected 1)

So having arguments fails and leaving them empty either!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure from the docs/example, starting at the ImageCharts entry point and the chained cht call. Check how arguments are defined for ImageCharts and cht, then verify that both the documented call and the empty-argument cases produce the intended behavior without arity errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.