Hide all x axes except the primary one?


#1

I need to plot multiple series on the same chart where there is one common y-axis, but each plot needs its own x-axis since they each have their own x scale (i.e. all have different min max values in the x-axis). The only way I’ve managed to accomplish this is to add an x-axis per series and associate the series with the correct axis. This is essentially working the way I want except that I have some pretty specific x-axis formatting requirements that I will probably implement in a separate UIView.

In order to do this I would like to hide all x-axes. Currently, no matter what I do there is a always vertical space allocated by the chart which has the undesired effect of shrinking the plot area. Here is what the chart currently looks like:

http://cl.ly/image/2M0k3l1R2e3J

Thanks!


#2

Hi Metatation,

Try styling your axes so that all of their components are disabled or clear. (From you picture it looks as though you have done this, but you need to also set your axis.style.lineColor to clear too.)

Then set the width property on your axes to @0.

Let me know how you get on.  :grin:

Thanks,
Jan


#3

I ended up having to switch to a different charting library for performance reasons before I got a chance to try out your suggestion. Regardless, thanks for the help.