SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I’m trying to create a horizontal bar chart, with bars starting at 0 point on the left then going to the right. I do this by putting the X axis at the left and the Y Axis on the bottom. However, setting the X Axis in the Left or Right area still produces a bar chart with the bars starting at 0 on the right and going left.
I thought I could make the Y Axis flipped and this might help. For example, there’s a property called ‘isAxisFlipped’ in SciAxis2D protocol. However, calling has no effect because is says the SciNumericAxis hasn’t implemented this method. I tried subclassing SciNumericAxis and overriding the isAxisFlipped method myself to return true. However, this has no effect as I don’t see this method ever getting called by anyone else.
So, is there a way to do horizontal columns/bar that go left to right?
Sorry for slow response
To achieve desired behaviour you need to do following steps:
1) Create Y axis, set alignment Top or Bottom, set it flipped and attach to surface
id<SCIAxis2D> yAxis = [[SCINumericAxis alloc] init]; yAxis.axisId = @"yAxis"; [yAxis setFlipCoordinates:YES]; [yAxis setAxisAlignment:SCIAxisAlignment_Top]; [surface attachAxis:yAxis IsXAxis:NO];
2) Create X axis, set alignemnt Left or Right and attach to surface
id<SCIAxis2D> xAxis = [[SCIDateTimeAxis alloc] init]; xAxis.axisId = @"xAxis"; [xAxis setAxisAlignment:SCIAxisAlignment_Left]; [surface attachAxis:xAxis IsXAxis:YES];
Please let me know if it solved your problem.
I’ve added resulting charts in attachment, if it is not what you want to achieve, send some scetch drawing with desired charts layout, please
SciChart iOS Developer
Please login first to submit.