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

Real number x axis line for BarChartView #901

Closed
amitvyawahare opened this issue Mar 30, 2016 · 5 comments
Closed

Real number x axis line for BarChartView #901

amitvyawahare opened this issue Mar 30, 2016 · 5 comments

Comments

@amitvyawahare
Copy link

Do you support bar graphs with a real number x axis line. All I have found is support for "labeled/NSObject" bars, but I would like to be able to give a bar a double value and have it plotted on a real number line, same as y axis. In a similar vein, is there a way for me to plot a ChartLimitLine on the xaxis at a real number location rather than an index when using the bar graph.

If I want to plot price (X-Axis) and quantity (Y-Axis)
price = [1, 2, 5]
quantity = [1.0, 2.0, 5.0]

I am getting following graph
screen shot 2016-03-30 at 6 26 56 pm

But I want something like this
screen shot 2016-03-30 at 6 28 51 pm

I am using the correct Chart Type? I am using BarChartView.

@Aft3rmathpwnz
Copy link

#860

@amitvyawahare
Copy link
Author

So basically there is no way to do this, I have to insert some zero quantity data on the x axis. What about ChartLimitLine on the x axis at a real number's location rather than an index when using the bar graph.

@pmairoldi
Copy link
Collaborator

NSObject can be anything even a float value. Try using an NSNumber to achieve what you are looking for. But maybe I am misunderstanding your question.

@liuxuan30
Copy link
Member

@petester42 seems he is talking about the float x axis style.
Currently we don't support this, x axis is index based, but some peole are working on it. You can insert the intermediate x values but not insert entry for it, and you can get what you want.

e.g. price = [1, 2, 5] -> [1,2,3,4,5]
quantity = [1.0, 2.0, 5.0] -> [1.0 for xIndex 0, 2.0 for 1, 5.0 for 4]

@surayashivji
Copy link

Are there any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants