Pre loader

Tag: Z-Index

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

1 vote
14k views

Have a good day!

I’m working with render context in modifiers. I have this code snippet:

public override void OnParentSurfaceRendered(SciChartRenderedMessage e)
        {
            if (Mouse.LeftButton == MouseButtonState.Pressed&&IsEnabled)
            {
                if (ParentSurface == null) return;
                var yCalc = ParentSurface.YAxes.GetAxisById(TextOfYAxis);
                var startTVD = yCalc.GetDataValue(StartPoint.Y);
                var finalTVD = yCalc.GetDataValue(CurrentPoint.Y);
                var deltaTVD = Math.Round((double) finalTVD - (double) startTVD);
                var pen = e.RenderContext.CreatePen(Colors.Red,true,1);
                var brush = e.RenderContext.CreateBrush(Colors.Red);
                e.RenderContext.DrawLine(pen, StartPoint, new Point(StartPoint.X, CurrentPoint.Y));
                e.RenderContext.DrawEllipse(pen, brush, StartPoint, 4, 4);
                e.RenderContext.DrawEllipse(pen,brush,new Point(StartPoint.X,CurrentPoint.Y),2,2);
                e.RenderContext.DrawText(
                    new Rect(new Point(CurrentPoint.X - 20, CurrentPoint.Y - 20), new Size(100, 30)), Colors.Red, 10,
                    "Delta TVD:" + Math.Round(Geomodel.DeltaTVD + deltaTVD, 2));
                pen.Dispose();
            }
        }

My aim is to place rectangle below line series.
Is there any way to work with z-index of such method of drawing?

0 votes
7k views

Hello again!

I’m working with FastMountainRenderableSeries. I have some questions:

1) How can I escape changing z-order of renderable series when I select renderable series?

2) How can I make Y-Zero lIne be not a single number, but for example a function? (See picture 1)

Thanks in advance.

  • Egor asked 8 years ago
  • last active 8 years ago
0 votes
16k views

Good day everybody!
I have got a problem. I need to place axis title above axis ticks. But I can’t find any method to do it. Could you help me?
Thank in advance.

  • Egor asked 10 years ago
  • last active 10 years ago
0 votes
8k views

I’m trying to add annotations on a chart but they are rendering above my legend.

Initially (similar to most of the demo code I’ve seen), I setup my modifiers, then created my series and animated them in — then added my annotations (adding to annotationGroup). This created a timeline of blank chart surface with legend (good so far), annotations popping in before the chart series animated in (weird / not good) and on TOP of the legend (really bad), then the animation of the series after that.

I’ve tried about everything I can think of and the best I’ve been able to do is use a completion block of the animation rendering the series — and moved my chart modifiers (and legend) into that completion block. If I put the annotations in the completion block, they will render after the chart modifier and I have the same problem (even if placed after the chart modifiers). I have to set the annotations before the animation, and then the chart modifier in the completion block will work and the legend will be above the . Of course, this is a bit odd too — as first my annotations pop up by themselves on the blank surface, followed by my series animating in, then at the end of the 2 second animation, the legend just pops in.

I really would like my legend to be rendered first on the blank surface and the annotations and chart series to animate in together under my legend. I’m gathering that’s unlikely (at least the animation part) — but is there anyway I can place my legend first and still have the annotations go under it? It feels like the layers should be: modifiers > annotations > rendered series. I also I’ve read this order before in some WPF docs I believe, but doesn’t seem to be respected on iOS?

UPDATE: My current work around isn’t sufficient because I really need access to the renderable series to create the annotations which means I really can’t defer my chart modifiers (i.e. legend) until after the annotations. Additionally, if I need to update (remove / re-add) an annotation due to a series being deactivated in the legend, now my annotations are on top of the legend again.

0 votes
8k views

I have several BandRenderableSeriesViewModel in my chart that the user can click on to select. The issue is that they pop up into the foreground when selected and hide everything else that is now behind them. Is there a way to keep them where they are upon selection?

Showing 5 results

Try SciChart Today

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

Start TrialCase Studies