Pre loader

How to do Left to Right column chart

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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?

Version
1.0.0.492
  • You must to post comments
2
0

Good day

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

Best regards
Andrii
SciChart iOS Developer

Images
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies