SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I’m trying to change the background color from black to white. I’ve been adjusting every value I can but I just can’t find how to change the areas in black/grey in the image below to white. Can anyone help? 🙂
Is it possible to put a background image on a chart? I hope you can give me a hint thanks in advance.
I attach an image for the purpose of my query.
I am having difficulties setting the background of my bar chart with SCICategoryDateTime X axis since I switched to 2.0.
As far as I understand, just setting the background property of the SCIChartSurface should suffice.
These are all of the things I’ve tried:
1. [self.barSurface setBackgroundColor:[UIColor clearColor]]; 2. [self.barSurfaceView setBackgroundColor:[UIColor clearColor]]; 3. self.barSurface.renderableSeriesAreaFill = [[SCISolidBrushStyle alloc] initWithColor:[UIColor clearColor]]; 4. [self.barSurface.renderSurface setIsTransparent:YES];
I didn’t find any other way of setting it, but it still remains black. Any thought on what might cause it?
EDIT: I just found out about this color setting:
[axisStyle setGridBandBrush:[[SCISolidBrushStyle alloc] initWithColor:[UIColor whiteColor]]];
The result I got was a black and white chess board, as shown on the attached picture. I really don’t understand this behaviour. If I set this gridBandBrush to nil, columns are coloured with random colours, so the chart looks like a rainbow. I understand why is this happening but shouldn’t there be a default colour in case brush is nil?
EDIT 2: While debugging using “Capture view hierarchy” in XCode I discovered that render surface is actually white inside debugger. Perhaps it will give more insight to you, it doesn’t mean much to me – I guess it’s because rendering is done on GPU and the context is not available to the debugger.