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 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.