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

Trouble making custom labels along the X and Y Axis of my bar chart #1724

Closed
pktrkts opened this issue Oct 26, 2016 · 1 comment
Closed

Trouble making custom labels along the X and Y Axis of my bar chart #1724

pktrkts opened this issue Oct 26, 2016 · 1 comment

Comments

@pktrkts
Copy link

pktrkts commented Oct 26, 2016

Hi,

I'm creating a bar chart with labels on the X- and Y-axes. The bar chart's X-axis is time, and it's Y-axis is Yes or No, with Yes being +1 and No being -1. I would like to label the bars along the X-axis so that the bars that occur at exactly 5 minute intervals have the time in hours and minutes below or on top of them, depending on whether a particular bar is Yes (where the bar is above the axis) or No (where the bar is below the axis). So I'm clear, the labels will be in the same place no matter where the bar is- it's only the bar's location that changes. My problem is getting the custom labels in place for both of these axes. I've researched it- I found a function titled "setValuesForKeys," but this function takes a dictionary of Strings to Any as its parameter, and I can't think of what should go in such a dictionary when the chart takes doubles for its X-values. I am baffled at how this function works. Any help you could give to point me in the right direction would be greatly appreciated.

Thanks,
Sean

@liuxuan30
Copy link
Member

Check out ChartsDemo - Bar chart and Stacked Bar Chart Negative for customizing x axis and y axis.

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

2 participants