Pre loader

Tag: background

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

0 votes
8k views

I want to use my custom image as a background for SciChart js.
I tried to put background-image to body of the page.
Then I enabled transparent background via:

sciChartSurface.backgroundCompletelyTransparentEnabled = true;

But it doesn’t work. It does nothing.
Then I tried to put transparent background to SciChart:

sciChartSurface.background = "#00000000";

But it doesn’t work as well. Chart completely disappears in this case.

How can I put my image as a background for SciChart?

  • Roman Zye asked 2 years ago
  • last active 2 years ago
0 votes
4k views

Hi;

When I open Scichart for the first time, the chart view looks black until it is displayed by drawing the chart.
Is it possible to make the background in a different color until the chart is displayed?

Tnx.

0 votes
10k views

I am using SCIStackedMountainRenderableSeries in my iOS application, I am always getting chart background as black grids, I want to make it clear or white background. How can I do that?

I have tried

sciChartSurface?.backgroundColor = UIColor.white
sciChartSurface?.applyThemeProvider(nil)

That did not worked, Please help.

0 votes
11k views

Hello, for my bottom graph on my screenshot below, is it possible to dynamically change the black background to red? Indeed, when the microphone saturates like on the screenshot below I want to change the black background to red for 2 seconds, so I need to do it programmatically.

https://i.ibb.co/7XCLDwf/sature.png

I init my bottom graph like this :

 @Override
    public void initGraph(Context context) {
        Log.d(TAG, "initGraphs");
        SciChartSurface audioStreamSciChart = new SciChartSurface(context);
        mAudiostream.addView(audioStreamSciChart);
        xAxis = new NumericAxis(context);
        xAxis.setVisibleRange(new DoubleRange(startAudioStreamRange, endAudioStreamRange));
        xAxis.setDrawLabels(false);
        xAxis.setDrawMinorTicks(false);
        xAxis.setDrawMajorBands(false);
        xAxis.setDrawMinorGridLines(false);
        audioStreamSciChart.getXAxes().add(xAxis);

        NumericAxis yAxis = new NumericAxis(context);
        yAxis.setVisibleRange(new DoubleRange(-1.0, 1.0));
        yAxis.setDrawLabels(true);
        yAxis.setDrawMinorTicks(false);
        yAxis.setDrawMajorBands(false);
        yAxis.setDrawMinorGridLines(false);
        yAxis.setAxisAlignment(AxisAlignment.Left);

        audioStreamSciChart.getYAxes().add(yAxis);

        float lineThickness = SciChartExtensionsKt.dip(context, 1.0F);

        FastLineRenderableSeries f = new FastLineRenderableSeries();
        f.setDataSeries(scichartTools.getAudioDS());
        f.setStrokeStyle(new SolidPenStyle(ColorUtil.Grey, true, lineThickness, null));
        audioStreamSciChart.getRenderableSeries().add(f);
        scichartLayout = mAudiostream.getChildAt(0);
    }

I can keep a reference of my FastLineRenderableSeries to do it but i didn’t find any method to change his backgroud color.
Can i ?

Thanks,
Wavely

1 vote
9k views

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.

0 votes
14k views

Hi guys,

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.

Best,
Igor

  • Igor Peric asked 7 years ago
  • last active 6 years ago
Showing 6 results

Try SciChart Today

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

Start TrialCase Studies