Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
chartview graphs color issues in ios 7.1
posted

Hello,

I have updated my xcode to xcode 5.1(which include iOS 7.1 simulator), now the i'm facing some strange color issues with infragistic's chartview graphs

Also same issues i'm facing on Device having iOS 7.1...

On iOS 6.0,6.1 & 7.0 my bar graph,line graphs looks like following(see the links)

         1.  https://ramjansayyad.opendrive.com/files?Nl8zNTExMzg3MF9vQWdlWg

         2.  https://ramjansayyad.opendrive.com/files?Nl8zNTExMzg3Ml9YQUpsMA

         3.  https://ramjansayyad.opendrive.com/files?Nl8zNTExMzg3NV9kbjlGcQ

And on ios 7.1 same graphs looks as follows(see the links)

         1.  https://ramjansayyad.opendrive.com/files?Nl8zNTExMzkwOF9OWHFFaQ

         2.  https://ramjansayyad.opendrive.com/files?Nl8zNTExMzkxMF8weThuTQ

         3.  https://ramjansayyad.opendrive.com/files?Nl8zNTExMzkxM19seVVEcQ


Here i'm adding the code sniphet i use to create single column series graph 

IGChartView *infraChart = [[IGChartView alloc] initWithFrame:CGRectMake(20,20,200,150)];

[infraChart setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];

infraChart.delegate = self;

IGCategoryXAxis *xAxis = [[IGCategoryXAxis alloc] initWithKey:@"xAxis"];

IGNumericYAxis *yAxis = [[IGNumericYAxis alloc] initWithKey:@"yAxis"];

[infraChart addAxis:xAxis];

[infraChart addAxis:yAxis];

        

xAxis.labelBrush = [[IGBrush alloc] initWithColor:[UIColor whiteColor]];

yAxis.labelBrush = [[IGBrush alloc] initWithColor:[UIColor whiteColor]];

yAxis.minimum = 0.0;

yAxis.maximum = max;

xAxis.crossingAxis = yAxis;

xAxis.crossingValue = 0.0;

yAxis.labelsLocation = IGAxisLabelsLocationInsideTop;

IGCategorySeriesDataSourceHelper *source = [[IGCategorySeriesDataSourceHelper alloc] init];

source.data = [pendingGraphData copy];

source.valuePath = @"cost";

source.labelPath = @"product";

IGColumnSeries *colSeries3 = (IGColumnSeries *) [infraChart addSeriesForType:[IGColumnSeries class] usingKey:@"PendingSeries" withDataSource:source3 firstAxisKey:@"xAxis" secondAxisKey:@"yAxis"];

colSeries3.brush = [[IGBrush alloc] initWithColor:[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:0.0/255.0 alpha:1]];   //From here i'm assigning color to column series graph(if you see in above links column series graph for pending getting yellow color with these RGBs )

colSeries3.title = @"Pending";


infraChart.tooltipPinLocation = IGTooltipPinLocationTop;

infraChart.crosshairsThickness = 2.0f;

infraChart.crosshairsVisibility = IGCrosshairsVisibilityVertical;

infraChart.crosshairsBackground = [UIColor whiteColor];

[self.view addSubview:infraChart];