SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
I’m trying to render a column chart with multiple series. I want the two series to show side-by-side. See the reference image attachment for how I want it to look.
However, when I add a second series to a surface, the two series overlap and draw over each other, such that you can ‘t see some of the column data points.
Is there a way to draw multiple series that don’t overlap?
While I’m here, a have a couple of more questions:
• Is there a way to show more of the values on the time/date series X-axis . Notice in the SciChart column chart that is attached it shows every third value on the X-axis (Jan, April, July, October). It would be great if I could show every two, or all for each data point.
• For a time/date series X-axis, can I show a different representation of the time/date values? Specifically, I want to show, e.g.
Presumably one would specify a different date formatter but I only see how to do variations of “MM-dd-yyy”. I want to show values as textual rather than numeric.
• Is there a way to extend the Y-axis to go higher?
In the SciChart column chart attachment, the Y-axis goes up to 100, but the values go higher. I would like to show the the Y-axis going up to 120.
• Is there a way to change the interval of the Y-axis?
Instead of showing every 20 values, can I show every 25 values?
I want the two series to show side-by-side.
The feature will be in v2.0. Also in v2.0 you will have ability to stack column series vertically.
Is there a way to show more of the values on the time/date series X-axis.
The count of labels depends on size of labels, you can change size of labels by their font size. Also you should set maxAutoTicks count that you want and axis tries to draw as much as possible.
textFormatting= [[SCITextFormattingStyle alloc] init]; [textFormatting setFontSize:12]; [textFormatting setFontName:@"Helvetica"]; SCIAxisStyle * axisStyle = [[SCIAxisStyle alloc]init]; [axisStyle setLabelStyle:textFormatting]; SCIDateTimeAxis *axisX = [[SCIDateTimeAxis alloc] init]; axisX.maxAutoTicks = 99;
Also You can change autoTick = NO. And manually setup minor and major interval between labels on axis. For example:
SCIDateTimeAxis *axisX = [[SCIDateTimeAxis alloc] init]; axisX.autoTicks = NO; float threeDaysTimeIntervalInSeconds = 60*60*24*3; axisX.majorDelta = SCIGeneric([NSDate dateWithTimeIntervalSince1970:threeDaysTimeIntervalInSeconds]); // every third day is shown on axisX.
For a time/date series X-axis, can I show a different representation of the time/date values?
Yes, you can. See code below:
SCIDateTimeAxis *axisX = [[SCIDateTimeAxis alloc] init]; [axisX setTextFormatting:@"MMM dd"]; // Formatter is "Jan 17"
Is there a way to extend the Y-axis to go higher?
You can set constant visible range for any axis. In the snippet code:
SCIAxisBase *axis = [[SCINumericAxis alloc] init]; axis.autoRange = SCIAutoRange_Never; SCIIntegerRange *visibleRange = [[SCIIntegerRange alloc] initWithMin:SCIGeneric(0) Max:SCIGeneric(120)]; [axis setVisibleRange:visibleRange];
Or you can set auto visible range and growBy to set inset.
SCIAxisBase *axis = [[SCINumericAxis alloc] init]; axis.autoRange = SCIAutoRange_Always; [axis setGrowBy: [[SCIIntegerRange alloc]initWithMin:SCIGeneric(0.0) Max:SCIGeneric(0.1)]]; //Your range is from 0 to 110 if your y values vary from 0 to 100.
Is there a way to change the interval of the Y-axis?
The same like in example with x axis above.
Best Regards, Mykola
Hi Doug, to add to the above, the feature you are looking for is Stacked Column Side by Side.
This is demoed in our v2.x SciChart iOS Chart examples here:
SciChart iOS v2.x is in early access preview (pre-release) as we polish some final features. It is fit for consumption with the caveat of it being a BETA, and a huge leap from SciChart iOS v1.x. We expect to be releasing it shortly.
There are instructions on how to access SciChart iOS Framework v2.x via Cocoapods in the Readme of our examples repository above.
Please login first to submit.