Pre loader

Tag: cursormodifier

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
710 views

I am trying to change the format of CursorModifier

sciChartSurface.chartModifiers.add(
  new CursorModifier({
    modifierGroup: 'Chart',
    showAxisLabels: true,
    showTooltip: false,
    showYLine: false,
    showXLine: true,
  })
);

I have a custom DateLabelProvider for the xAxis that return dates in this format ‘MM/dd HH:mm’ but the CursorModifier tooltip is showing the ‘MM/dd/YYYY’ format, how can I change it?

1 vote
814 views

Hello.
I’d checked examples from your Demo ‘SciChart.Examples.Demo’ and looks like the example “SciChart.Examples.Examples.CreateRealtimeChart.UsingSeriesValueModifier” is applicable for me because I need functionality like this.

But as I understand Legend as LegendModifier component is a part of chart and it ‘know’ about chart data and can manipulate layout of it. In my application I want to have chart settings not in chart layout but in separate part of application. Can I bind chart settings with my custom controls? At start I want to set visibility for chart series which created in code

        private XyDataSeries<double, double> _lineDataDiameter1;
        private XyDataSeries<double, double> _lineDataDiameter2;
        private XyDataSeries<double, double> _lineDataCovering1;
        private XyDataSeries<double, double> _lineDataCovering2;
        private XyDataSeries<double, double> _lineDataCovering3;

private void InitCharts()
    { // TODO names and color maybe make as settings
        _lineDataDiameter1 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_DIAMETER_1, LineColor = Colors.OrangeRed, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataDiameter2 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_DIAMETER_2, LineColor = Colors.BlueViolet, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataCovering1 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_1, LineColor = Colors.LimeGreen, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataCovering2 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_2, LineColor = Colors.DeepSkyBlue, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataCovering3 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_3, LineColor = Colors.White, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
    }

    private XyDataSeries<double, double> InitChart(InitChartRequest request)
    {
        XyDataSeries<double, double> lineData = new()
        {
            SeriesName = request.ChartName,
        };

        RenderableSeries.Add(new LineRenderableSeriesViewModel()
        {
            StrokeThickness = request.LineThickness,
            Stroke = request.LineColor,
            DataSeries = lineData,
            StyleKey = request.ChartStyle,
        });

        return lineData;
    }

And additional little question. How can I make CursorModifier visible or not?

            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:SeriesValueModifier/>
                    <s:CursorModifier/>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>

Even if I make it like this

                <s:SciChartSurface.ChartModifier>
                    <s:ModifierGroup>
                        <s:SeriesValueModifier/>
                        <s:CursorModifier Visibility="Hidden"/>
                    </s:ModifierGroup>
                </s:SciChartSurface.ChartModifier>

I see it

1 vote
1k views

I am new to scichart javascript library and trying to run the provided examples locally. I was working on this example
https://www.scichart.com/documentation/js/current/The%20Candlestick%20Series%20type.html

I am able to run this example locally. now I want to add cursor snapping in it. An example would be tradingview candlestick charts. in those charts cursor snaps to nearest candles.
I am trying to achieve similar. I looked into the docs but couldn’t find the answer.

Thanks !

1 vote
1k views

Am trying to get the same look and feel of the cursor modifier on both the charts.

  • am not able to get the tool tip to show on the other side.
  • am not able to get the get horizontal lines.
  • P S asked 4 months ago
  • last active 4 months ago
1 vote
1k views

As if right now, I have create a custom annotation, which is a red circle and the idea is to show some info when hovering on it, like a tooltip.

Right now, when hovering on the red circle, I am adding another custom annotation to show the info and then removing it when not hovering anymore. The issue with this is that it is not very stable, as in if I don’t point my cursor right in the middle of the red circle, it won’t register as hit. I tried putting hitTestRadius to 50 on CursorModifier, but doesn’t seem to make any difference.

I have also try with xyScatterRenderableSeries and EllipsePointMarker, the issue I find with it is that it is interfering with my data series tooltip, as the cursor modifier recognize it as a chart series and try to show on the tooltip, which I don’t want. I only want the red circle to be trigger only when cursor is right on it.

The first image is my code and how I am trying to achieve it at the moment, it does work, but I don’t think it’s very stable, I wish there is a more natural way to do it.

The second image is how my current solution looks like, as you can see, the data series tooltip is overlapping it, which I want to avoid. I can’t think of a way to solve the overlapping issue yet. Other than unstableness and the tooltip overlapping, it work fine.

The third image is how I want it to look like.

  • Nung Khual asked 5 months ago
  • last active 5 months ago
1 vote
1k views

Imagine I have a chart with a RolloverModifier, such that I see the point marker, and also a CursorModifier so I see the axis labels with the exact value I’m hovering.
This chart has the axis title hidden, and also the labels hidden, so I can really only see them trough the CursorModifier axis labels.
Since the axis title and labels are hidden, the axis labels spawn inside the chart, and the point marker from the RolloverModifier may be drawn on top of the labels.

I’d like to properly control drawing order here, so my axis labels get prioritised.
Is there a way to do so?

Codepen example: https://codepen.io/jrfv/full/VwqVBdo

1 vote
2k views

I have a use case for a chart, that is a heatmap, which may also contain multiple series drawn on top, with multiple internal axis as well.
I can’t transform the data I receive, because that would be too slow, and it needs to maintain a speedy feeling, even when appending more data.

For this reason, when building the chart, I just flip the axis. The bottom axis is the Y axis, and the left axis it the X axis.

The multiple series that can be added (XyDataSeries), provide one extra axis each, and use one of the main axis.
We can think of them as horizontal or vertical series, depending if they use the main X axis, or the main Y axis.

When hovering over the chart, I want to show a tooltip, that shows for each series, their own axis value.

The issue — The normal CursorModifier, can’t correctly present a tooltip, for this case of mixed horizontal/vertical series. I’m not sure if there are configurations I’m missing, or if it is an actual uncovered edge case, hoping to get an answer on this.

To show what the issue is, and how I’m currently fixing it, please have a look at the codepen I made -> https://codepen.io/jrfv/full/zYMjEzP

Any tips on this, is it something scichart will fix eventually?

0 votes
8k views

We have a sciChart surface in a fragment that has a scrollable view. We enabled tooltips using custom cursor modifier on the sci chart to show the values as the selection (touching a point in the chart object).

When we are moving the selection on x-axis tooltip sometimes it works fine and disappears when the selection is taken out. But sometimes it get freezed. At the same time, if we touch and move the selection in a vertical axis, tooltip box gets stuck and does not disappear even when the selection is taken out.

Tried so far:
We tried to replicate the issue in landscape mode and it works fine.
If we make the chart object to the whole page view, tool tips appears and disappears as expected.
But when the same used in portrait mode as a part of fragment (50% of screen) , problem arises

Steps to reproduce:
Have a chart object in a scrollable view.
Make sure the chart object doesnot appear on the fully screen without scrolling.
Now scroll to see the chart object.
Try to see the tooltip and move the selection in vertical axis.

  • Krish J asked 9 months ago
  • last active 9 months ago
1 vote
1k views

Hello All,

Is there a way to have a cursor modifier display on a mouse left/center/right click instead of automatically showing when the mouse is over the chart? I tried setting the ExecuteOn property but had no effect.

Thanks in advance,
Sergio.

1 vote
5k views

Hey, how would I go about adding a custom template for the cursor axis labels using the Javascript 2D chart API?

I’d like the x-axis to not just have a date in MM/DD/YYYY format but a date and time displayed. The current implementation is below, and below that is the desired implementation.

Current: https://ibb.co/qJgJ36j

Desired: https://ibb.co/XzTkDgw

I have looked through the documentation but I may have missed something. If I have, please point me in the right direction, thanks!

0 votes
2k views

Hi guys, I got problem that cursor modifier is not display full lines on x and y axis, ( also it breaks when browser zoom changes ) is there any solution now ?

0 votes
5k views

Hi
I am trying out JS SciChart based on the Blazor example you have posted more than a year ago.
I cannot get the auto scaling to work by code (the default behavior does auto scale once right after adding the data). Calling sciChartSurface.zoomExtents(); (or zoomExtentsX() and zoomExtentsY() after one another) does zoom into a very details portion of the graph.

Also (maybe related) the tooltip does not update when moving the cursor around, it always keeps the same data. I tried using CursorModifier as well as RolloverModifier, both having the same problem.

Attached the JS code and the c# files and a picture how this looks like after calling the autoScale() method.

Thanks for any help
Regards
Reto

0 votes
5k views

Is there any way to provide custom axis label for cursor modifier or at least change label size? I could find only axis label stroke & fill properties in cursor modifier API.

0 votes
5k views

Hi, Custom tooltip is not working on v2.0.2179.
Its working on v2.0.2146. Can you please check the issue..

import { SciChartSurface } from "scichart/Charting/Visuals/SciChartSurface";
import { NumericAxis } from "scichart/Charting/Visuals/Axis/NumericAxis";
import { XyDataSeries } from "scichart/Charting/Model/XyDataSeries";
import { FastLineRenderableSeries } from "scichart/Charting/Visuals/RenderableSeries/FastLineRenderableSeries";
import { RangeSelectionChartModifier } from "./RangeSelectionChartModifier";
import { RubberBandXyZoomModifier } from "scichart/Charting/ChartModifiers/RubberBandXyZoomModifier";
import { MouseWheelZoomModifier } from "scichart/Charting/ChartModifiers/MouseWheelZoomModifier";
import { EXyDirection } from "scichart/types/XyDirection";
import { ZoomExtentsModifier } from "scichart/Charting/ChartModifiers/ZoomExtentsModifier";
import { EClipMode } from "scichart/Charting/Visuals/Axis/AxisBase2D";
import { MouseButtonZoomChartModifier } from "./MouseButtonZoomChartModifier";
import { SeriesInfo } from "scichart/Charting/Model/ChartData/SeriesInfo";
import { CursorTooltipSvgAnnotation } from "scichart/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation";
import { CursorModifier } from "scichart/Charting/ChartModifiers/CursorModifier";



async function initSciChart() {
    const { sciChartSurface, wasmContext } = await SciChartSurface.create("scichart-root");

      const xAxis = new NumericAxis(wasmContext);
      const yAxis = new NumericAxis(wasmContext);

      sciChartSurface.xAxes.add(xAxis);
      sciChartSurface.yAxes.add(yAxis);

      const xyData = new XyDataSeries(wasmContext);
      for (let i = 0; i < 250; i++) {
        xyData.append(i, Math.sin(i * 0.1));
      }
      sciChartSurface.renderableSeries.add(
        new FastLineRenderableSeries(wasmContext, { dataSeries: xyData })
      );

      const cursorModifier = new CursorModifier({
        crosshairStrokeThickness: 1,
        showTooltip: true,
        showAxisLabels: false,
        crosshairStroke: "transparent",
      });
      cursorModifier.tooltipSvgTemplate = (seriesInfo, svgAnnotation) => {
        let rowString = "";
        seriesInfo.forEach(() => {
          rowString = rowString + `<tspan x="8" dy="1.2em" fill="red">Test : 123</tspan>`;  
        });

        const string = `<svg width="300" height="33" x="0"><defs>
            <filter id="id_1610011455082" x="0" y="0" width="200%" height="200%">
            <feOffset result="offOut" in="SourceAlpha" dx="3" dy="3"></feOffset>
            <feGaussianBlur result="blurOut" in="offOut" stdDeviation="3"></feGaussianBlur>
            <feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend>
            </filter>
            </defs>
            <rect rx="4" ry="4" width="95%" height="90%" style="stroke-width:1;stroke:'#ffffff'}"></rect>
            <svg width="100%"><text x="8" y="3" font-size="13" font-family="Verdana" dy="0">`;

        svgAnnotation.xCoordShift = 5;
        svgAnnotation.yCoordShift = 5;
        return string + rowString + `</text></svg></svg>`;
      };
      sciChartSurface.chartModifiers.add(
        cursorModifier
      );


      const mouseWheelModifier = new MouseWheelZoomModifier();
      mouseWheelModifier.modifierMouseWheel = args => {
        const delta = args.mouseWheelDelta * 0.1;
        mouseWheelModifier.parentSurface.xAxes.asArray().forEach(x => {
          x.scroll(delta, EClipMode.None);
        });
      };
      sciChartSurface.chartModifiers.add(
        new RubberBandXyZoomModifier({ xyDirection: EXyDirection.XDirection })
      );
      sciChartSurface.chartModifiers.add(mouseWheelModifier);
      sciChartSurface.chartModifiers.add(new ZoomExtentsModifier());
  }

   initSciChart();
0 votes
3k views

I have a chart with multiple series, and I would like to have the RolloverModifier behavior for all selected series, but with a single tooltip combining the values for all selected series rather than a separate tooltip per series (similar to the CursorModifier)

Is there a way to do one of the following?

  1. Merge the tooltips from the RolloverModifier?
    OR
  2. Only show the vertical crosshair from the CursorModifier, and snap the crosshair to the closest point in the series?

The RolloverModifier is closer to the behavior I want, the only change I would want is the merged tooltip.

0 votes
6k views

Hi,

I want to use a CursorModifier that snaps to series, but not all series. I can see the BaseRenderableSeriesViewModel has, for example, IncludeTooltipModifier, but there is no IncludeCursorModifier property so I haven’t been able to get it to work out of the box.
Is this a missing feature?
https://www.scichart.com/documentation/win/current/webframe.html#CursorModifier.html
https://www.scichart.com/documentation/win/current/webframe.html#TooltipModifier.html

Are there any work arounds? I was thinking of adding metadata to a series, but there is no metadata for the entire series, just a metadata for the point markers.

I also tried to create a class that inherits from, for example, LineRenderableSeriesViewModel, that has an IncludeCursorModifier, or similarly named property. The issue I had with that is that when I create my own inherited version of CursorModifer I only have access to the ParentSurface?.RenderableSeries which is not the ViewModel version of the series, and thus that information seems to be lost – I can’t cast a member of RenderableSeries to my custom MyLineRenderableSeriesViewModel, thus I can’t inspect whether it should be included in the cursor modifier.

I appreciate the help.

Matt

0 votes
0 answers
3k views

After moving from version: 1.4.1575 to version: 1.4.1611 we are seeing the the Cursor modifier replicating across all the charts in our dashboard. Obviously this is not desirable. I’ve attached screenshots to show this.

Please could you advise?

0 votes
6k views

I am getting a console error when using isVisible: false to the FastLineRenderableSeries or FastMountainRenderableSeries and CursorModifier together.

  const { wasmContext, sciChartSurface } = await SciChartSurface.create(
    "chart" + this.element
  );
  sciChartSurface.xAxes.add(
    new NumericAxis(wasmContext, { axisAlignment: EAxisAlignment.Top })
  );
  sciChartSurface.yAxes.add(
    new NumericAxis(wasmContext, {
      axisAlignment: EAxisAlignment.Left,
      growBy: new NumberRange(0.4, 0.4)
    })
  );

  const dataSeries = new XyDataSeries(wasmContext);
  const POINTS = 1000;
  const STEP = (3 * Math.PI) / POINTS;
  for (let i = 0; i <= 1000; i++) {
    const k = 1 - i / 2000;
    dataSeries.append(i, Math.sin(i * STEP) * k * 0.7);
  }

  const rendSeries = new FastLineRenderableSeries(wasmContext, {
    dataSeries: dataSeries,
    strokeThickness: 1,
    stroke: "red",
    isVisible: false
  });
  sciChartSurface.renderableSeries.add(rendSeries);
  // sciChartSurface.background = this.color;

  sciChartSurface.chartModifiers.add(
    new ZoomExtentsModifier(),
    new ZoomPanModifier(),
    new MouseWheelZoomModifier()
  );

  // Add CursorModifier behavior
  const cursorModifier = new CursorModifier({
    crosshairStroke: "#ff6600",
    crosshairStrokeThickness: 1,
    tooltipContainerBackground: "#000",
    tooltipTextStroke: "#ff6600",
    showTooltip: true,
    axisLabelsFill: "#b36200",
    axisLabelsStroke: "#fff"
  });
  sciChartSurface.chartModifiers.add(cursorModifier);

  sciChartSurface.zoomExtents();
  return { wasmContext, sciChartSurface };
0 votes
3k views

Hi,

Using a tooltip with a LineSeries with an Logarithmic Y-axis, seem to give widely inaccurate results.

The series is as follows:

double[] x = new double[] { 1, 1.0e1 , 1.0e2 };
double[] y = new double[] { 615.9, 275.6197, 11.05376};

Using a CursorModifier as follows:

<s:CursorModifier ShowAxisLabels="True" UseInterpolation="True" SnappingMode="CrosshairToSeries" ShowTooltip="True"/>

The expected behaviour would be for the Crosshair to follow the curve, but for some reason it’s some way off. It looks as if it’s following Y-values which are somewhat truncated. X-values are fine for some reason.

Is there are a way to increase the resolution of the Y-values so the user gets the correct value when using a tooltip.

0 votes
6k views

I am getting a console error when using isVisible: false to the FastLineRenderableSeries or FastMountainRenderableSeries and CursorModifier together.

0 votes
3k views

Screenshots attached.

To recreate:

  • Create a chart
  • Add a CursorModifier – default options is fine
  • Either directly remove the modifier using .remove(modifier), or clear all using .clear()

Expected behaviour:
– Should remove the cursor modifier

Actual behaviour with bug:
– Crashes the page

This appears to be an issue with CursorModifier only (out of the 5 or 6 that I’ve tried). Other modifiers work as expected.

Traced the issue to this.parentSurface being undefined in CursorModifier.js, so when onDetach() is called, it errors.

Thanks!
Joe

0 votes
0 answers
3k views

i have a SciChartGroup may have multiple charts, i hope when i click mouse left every chart it is cross only, i click it again every chart it is arrow only

  • Allen Qiu asked 4 years ago
  • last active 4 years ago
0 votes
7k views

hello, i have an exception.
see the try catch

public class CategoryDateTimeAxisEx : CategoryDateTimeAxis
{
    public override IComparable GetDataValue(double pixelCoordinate)
    {
        var dataValue = DateTime.MinValue;

        var coordCalc = GetCurrentCoordinateCalculator();
        if (coordCalc != null)
        {
            // Returns the index of a dataPoint, need to transform it to a dataValue
            var value = coordCalc.GetDataValue(pixelCoordinate);

            var catCoordCalc = coordCalc as ICategoryCoordinateCalculator<DateTime>;
            try
            {
                dataValue = catCoordCalc?.TransformIndexToData((int)value) ?? value.ToDateTime();
            }
            catch (Exception e)
            {
                 //TransformIndexToData() throw exception because catCoordCalc.BaseXValues is null,
                 //it only happend when my mouse over SciSurface and move faster on app startup
            } 
        }
        return dataValue;
    }
}

I use this class and override function now, it can work .but i don’t like this way.

0 votes
0 answers
7k views

Hello, I am using the Cross CursorModifier with axis labels and tool tips on a FastCandlestickRenderableSeries only. I have been using the CursorModifier:SnappingMode=”CrosshairToSeries” however I would like to only have the X axis of the CursorModifier snap to the nearest X data point of the series. This way the Y axis of the CursorModifier is still free to view price and hold a reference for where the Tooltip should be displayed. Any direction to the proper documentation for this functionality would be appreciated.

Thank you,

0 votes
5k views

I am not able to find the data point corresponding to current mouse position on heatmap series PreviewMouseMove event.

Here is my code,

private void Contour_PreviewMouseMove(object sender, MouseEventArgs e)
    {
        var xCalc = Contour.RenderableSeries[0].XAxis.GetCurrentCoordinateCalculator();
        var yCalc = Contour.RenderableSeries[0].YAxis.GetCurrentCoordinateCalculator();
        Point mousePoint = e.GetPosition(((SciChartSurface)sender).ModifierSurface as UIElement);
        double peakXCordInfoValue = xCalc.GetDataValue(mousePoint.X);
        double peakYCordInfoValue = yCalc.GetDataValue(mousePoint.Y);
    }

“Contour” is my SciChart object. When I debugged to find out my X and Y axis data points and compared them with what I find above in peakXCordInfoValue, then they don’t match. Ideally if I am finding the data point then it should match exactly.

I also tried to find index

var index = Contour.RenderableSeries[0].DataSeries.FindIndex(yDataForCoordinate, SearchMode.Nearest);

But it gives error “Operation is not valid due to the current state of the object.”
I also tried cursormodifier and its OnModifierMouseMove event, but it gives same error.

For Example: The actual data point on Y axis is 280.774501562118, and the above code returns 280.523009343212

  • Anil Soman asked 5 years ago
  • last active 5 years ago
0 votes
11k views

I am using a custom CursorModifier class in my WPF code. I have created a class inherited from CursorModifier for this purpose. Now I want to apply cross-hair cursor style to my chart. The style in XAML is not getting applied at all. However, when I use the CursorModifier directly (instead of custom modifier class) in XAML, then it applies.

If I changed the TargetType to “loca:MyCursorModifier”, then it gives error “The memeber StrokeThickness is not recognized” & “The “memeber Stroke is not recognized”.

<UserControl.Resources>
    <Style x:Key="CrossLineStyle" TargetType="Line">
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Stroke" Value="Black " />
    </Style>
</UserControl.Resources>

<local:MyCursorModifier ShowTooltip="False" ShowTooltipOn="Never" ShowAxisLabels="False" SourceMode="AllSeries" LineOverlayStyle="{StaticResource CursorLineStyle}"/>
  • Anil Soman asked 5 years ago
  • last active 5 years ago
0 votes
11k views

It seems most of the modifiers bring up tooltip data with a pan, and then it goes away when the user lifts their finger. Is there any way to bring up tooltip data with a tap (and does not go away when the finger has lifted)? The main problem that we’re trying to solve is that we would like to be able to pan to look at the chart (and don’t want an axis pan), but would also like to bring up tooltip data.

  • Carolyn asked 5 years ago
  • last active 5 years ago
0 votes
5k views

I’m trying to make a chart with a “toggle function”.

The “toggle function” what i wanted to make is this.

  1. enter to UIViewController which Chart is in it
  2. before singleTap on a chart, a chart has zoomPanModifier, XAxisDragModifier,, etc
  3. after make singleTap on the chart, that chart has only CursorModifier.
  4. CursorModifier’s UI stays on chart without disappearing and i can move crossed line to specific point i want (just like what CursorModifier originally does)
  5. another single tap on chart would make a chart to have all other modifiers but CursorModifer.

What I have made successfully was 1,2,3,5 . not 4.

The way i was going to solve this problem was make fake touch event on Chart view and
snatch UIGestureRecognizer Event and let ChartView think they’re being touched till I give stop signal

But I heard that there is no more way to pass fake touch to UIView.

So I’m feeling difficulty on this problem…..

is there any easy way to solve this problem?

TL;DR;

I WANT TO MAKE CURSORMODIFIER’ UI STAYS ON A CHART!

+)
(lldb) po SciChartVersionNumber
0x3ff0000000000000

(lldb) po SciChartVersionString
0x474f525029232840

I wanted to know what version I’m using.. but i couldn’t know… what version am i using..?

0 votes
6k views

In examples I often see.

s:CursorModifier.TooltipTemplate="{StaticResource CursorTooltipTemplate2}"

s:RolloverModifier.TooltipContainerStyle="{StaticResource TooltipStyle2}"
s:RolloverModifier.TooltipTemplate="{StaticResource RolloverTooltipTemplate2}"

s:TooltipModifier.TooltipContainerStyle="{StaticResource TooltipStyle2}"
s:TooltipModifier.TooltipTemplate="{StaticResource TooltipTemplate2}"

s:VerticalSliceModifier.TooltipContainerStyle="{StaticResource TooltipStyle2}"
s:VerticalSliceModifier.TooltipTemplate="{StaticResource VerticalSliceTooltipTemplate2}"

Why can’t I use TooltipContainerStyle attached property with CursorModifier?

0 votes
0 answers
6k views

I’m getting a Argument Exception with the message: An item with the same key has already been added.
This happens when I use the Rollover or Cursor Chart Modifiers.
Visual Studio is unable to evaluate the exception.

System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/UnhandledUnhandled exceptionUBB3.exeSystem.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func2 elementSelector)
at Abt.Controls.SciChart.BaseRenderableSeries.NearestHitResult(Point rawPoint)
at Abt.Controls.SciChart.BaseRenderableSeries.HitTest(Point rawPoint, Boolean interpolate)
at Abt.Controls.SciChart.RolloverModifier.c361550073312ad3169f1a460aa44d307(Point c9fb04a4a0826429a55d599c809a4f6e6, Boolean c3791a1b71c1577bde30b55c12b2a5583)
at Abt.Controls.SciChart.RolloverModifier.OnModifierMouseMove(ModifierMouseArgs e)
at Abt.Controls.SciChart.ModifierGroup.c07d1dcb1c7ba461bbcbf5a1dd47c58a5(IChartModifier c6b1effd112e5355cd5f051dd91cd4f67, ModifierMouseArgs cbb39038dde40bfc3fdcfa70f4bbf8778)
at (Object , IChartModifier , ModifierMouseArgs )
at A.c4839d4bc452a3cc647260fc7e1ad10c1.c6dea473323fdce89c6d7460d087afc9c(Object c2e4dcf306e5d5e570ccc0d688db6e42c, IChartModifier c2e4dcf306e5d5e570ccc0d688db6e42c, ModifierMouseArgs c2e4dcf306e5d5e570ccc0d688db6e42c)
at Abt.Controls.SciChart.ModifierGroup.c9e8960a6a8527c20ac9e46e162c72b22(Action2 c4bd4ab823835cf92d221476b6fb65a17, ModifierMouseArgs c4c23d80d4d060e409c3479ef17d6c65e)
at Abt.Controls.SciChart.ModifierGroup.OnModifierMouseMove(ModifierMouseArgs e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.ca5839647cb861fa726b3261de72c52c0(ModifierMouseArgs cbb39038dde40bfc3fdcfa70f4bbf8778, IReceiveMouseEvents c18509698be3f9366c690e7d2b107b62c, Boolean c3791a1b71c1577bde30b55c12b2a5583)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cf88844ca415efe316ebbc6460c4d5477.c7ca7af35639f570327394b11001b543a.c5980502f76d6e282773f80c5da0f84e7(IReceiveMouseEvents c133657388cc0f6f6615e21e129ac4b3a)
at A.c3631c672e3fc9e342ac08ff1a63d428e.cacf72b657252e3e73860afb89d70cb9f[c13c28af86f0b14202b9c7ef43b1bd11a](IEnumerable
1 c40a30a1bb6416cd164565919fdef15a9, Action1 c885aac61bc9832561b7ff07903c88d5e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cf88844ca415efe316ebbc6460c4d5477.c6b7aec04ebfc28e092adf0e569761d15(Object cae49ecc8585f35e8dd5ce624f7fb7ab5, MouseEventArgs c4c23d80d4d060e409c3479ef17d6c65e)
at (Object , Object , MouseEventArgs )
at A.c5acf1f2ae72fe65952cbdccf2f5089f9.c6dea473323fdce89c6d7460d087afc9c(Object c2e4dcf306e5d5e570ccc0d688db6e42c, Object c2e4dcf306e5d5e570ccc0d688db6e42c, MouseEventArgs c2e4dcf306e5d5e570ccc0d688db6e42c)
at A.cd43732d305fa7b65b611005fdcef35d8.c769264f2530d8b47196e47cbbe58cb89(MouseEventArgs cbb39038dde40bfc3fdcfa70f4bbf8778)
at A.cd43732d305fa7b65b611005fdcef35d8.cbe8969038b3b47585f72b9c703cd47da(Object c5e18ac7ef25e3e9c51dc36756b25ed1e, MouseEventArgs c4c23d80d4d060e409c3479ef17d6c65e)
at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp;amp; msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at UBB3.App.Main()</StackTrace><ExceptionString>System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary
2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector)
at Abt.Controls.SciChart.BaseRenderableSeries.NearestHitResult(Point rawPoint)
at Abt.Controls.SciChart.BaseRenderableSeries.HitTest(Point rawPoint, Boolean interpolate)
at Abt.Controls.SciChart.RolloverModifier.c361550073312ad3169f1a460aa44d307(Point c9fb04a4a0826429a55d599c809a4f6e6, Boolean c3791a1b71c1577bde30b55c12b2a5583)
at Abt.Controls.SciChart.RolloverModifier.OnModifierMouseMove(ModifierMouseArgs e)
at Abt.Controls.SciChart.ModifierGroup.c07d1dcb1c7ba461bbcbf5a1dd47c58a5(IChartModifier c6b1effd112e5355cd5f051dd91cd4f67, ModifierMouseArgs cbb39038dde40bfc3fdcfa70f4bbf8778)
at (Object , IChartModifier , ModifierMouseArgs )
at A.c4839d4bc452a3cc647260fc7e1ad10c1.c6dea473323fdce89c6d7460d087afc9c(Object c2e4dcf306e5d5e570ccc0d688db6e42c, IChartModifier c2e4dcf306e5d5e570ccc0d688db6e42c, ModifierMouseArgs c2e4dcf306e5d5e570ccc0d688db6e42c)
at Abt.Controls.SciChart.ModifierGroup.c9e8960a6a8527c20ac9e46e162c72b22(Action
2 c4bd4ab823835cf92d221476b6fb65a17, ModifierMouseArgs c4c23d80d4d060e409c3479ef17d6c65e)
at Abt.Controls.SciChart.ModifierGroup.OnModifierMouseMove(ModifierMouseArgs e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.ca5839647cb861fa726b3261de72c52c0(ModifierMouseArgs cbb39038dde40bfc3fdcfa70f4bbf8778, IReceiveMouseEvents c18509698be3f9366c690e7d2b107b62c, Boolean c3791a1b71c1577bde30b55c12b2a5583)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cf88844ca415efe316ebbc6460c4d5477.c7ca7af35639f570327394b11001b543a.c5980502f76d6e282773f80c5da0f84e7(IReceiveMouseEvents c133657388cc0f6f6615e21e129ac4b3a)
at A.c3631c672e3fc9e342ac08ff1a63d428e.cacf72b657252e3e73860afb89d70cb9f[c13c28af86f0b14202b9c7ef43b1bd11a](IEnumerable1 c40a30a1bb6416cd164565919fdef15a9, Action1 c885aac61bc9832561b7ff07903c88d5e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cf88844ca415efe316ebbc6460c4d5477.c6b7aec04ebfc28e092adf0e569761d15(Object cae49ecc8585f35e8dd5ce624f7fb7ab5, MouseEventArgs c4c23d80d4d060e409c3479ef17d6c65e)
at (Object , Object , MouseEventArgs )
at A.c5acf1f2ae72fe65952cbdccf2f5089f9.c6dea473323fdce89c6d7460d087afc9c(Object c2e4dcf306e5d5e570ccc0d688db6e42c, Object c2e4dcf306e5d5e570ccc0d688db6e42c, MouseEventArgs c2e4dcf306e5d5e570ccc0d688db6e42c)
at A.cd43732d305fa7b65b611005fdcef35d8.c769264f2530d8b47196e47cbbe58cb89(MouseEventArgs cbb39038dde40bfc3fdcfa70f4bbf8778)
at A.cd43732d305fa7b65b611005fdcef35d8.cbe8969038b3b47585f72b9c703cd47da(Object c5e18ac7ef25e3e9c51dc36756b25ed1e, MouseEventArgs c4c23d80d4d060e409c3479ef17d6c65e)
at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp; msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at UBB3.App.Main()

0 votes
0 answers
8k views

I am using a CursorModifier with custom template to display tool tips with cross hairs on my scatter plots. Everything works as intended until the plot gets busy with points then the tool tip only shows for a few points. I am using ResamplingMode.None on my XyScatterRenderableSeries. Any ideas? Thanks

<s:CursorModifier IsEnabled="{Binding AreTooltipsEnabled}"
                  ReceiveHandledEvents="False" 
                  ShowTooltipOn="MouseOver" 
                  ShowAxisLabels="False"
                  SourceMode="AllSeries"  
                  ShowTooltip="True"                                      
                  TooltipContainerStyle="{StaticResource CursorTooltipStyle}"
                  LineOverlayStyle="{DynamicResource CursorLineStyle}"
                  UseInterpolation="True"/>
0 votes
6k views
  1. Is it possible to display the peak value instead of X and Y values at touch point using a modifier ? If so, how can I achieve this ? (Both Rollover and Cursor modifier only shows the X and Y values)

  2. In real time chart, since the values are updating continuously, the cursor modifier is constantly disappearing and appearing and is not stationary. How can I keep the cursor modifier always visible ?

  • Chui asked 7 years ago
  • last active 7 years ago
0 votes
9k views

I need to get Yaxis value of mouse with using OnClick Event. If I use CursorModifier I can get only one value of “primary” or first declared axis. So even this axis’s Visibility Property set as Collapsed I get is’s Y Value, and if displayed axes and “primary” have a different scale (and they have), I get a very wrong value. How can I get Y value of displayed axes or of all axes?

0 votes
9k views

Hi, guys

it seems that i had found a mistake:

At SCICursorModifierStyle class if i try to set up axisVerticalTooltipCornerRadius property it lead to changing of axisHorizontalTooltipCornerRadius

Please take a look

Best regards,
Sushynski Andrei

0 votes
6k views

I’m creating a chart using scichart. I want to display some markers (eg. small Ellipses) on Yaxis for every Data Series depending on where the cursor is.
So far by using:

<s:SciChartSurface.ChartModifier>
   <s:ModifierGroup>
      <s:CursorModifier/>
   </s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

I’ve obtained a cursor that marks the datapoints directly on charts.
Here is a picture of what I want to obtain (see the markers on Yaxis):
Link

0 votes
11k views

I have attempted to change the text format on the cursors that show the Y-Intercept on my vertical line annotations. WIthin by ModifierGroup, I added the following:

<s:CursorModifier ContentStringFormat="0.000"/>

I suspect that since the Y intercept is a double or float, it is causing the ContentStringFormat functionality not fire (can’t deal with a non-string). Is there a way to set the format of these cursors to a 0.000 format? Right now they are showing as 0.00.

Thank you

  • Ryan Woods asked 8 years ago
  • last active 5 years ago
0 votes
12k views

Hello,

My aim is to create a permament tooltip that will always show current mouse position and current position with extra information when cursor is over renderable series. I’ve looked through all examples and found suitable one (example). But there is a little problem. When cursor is out of renderable series x-data range, tool tip disappearrs, even ShowTooltipOnproperty is set “Always”.

How can I solve this problem?

Thanks in advance

  • Egor asked 8 years ago
  • last active 8 years ago
1 vote
12k views

Upon your advice for a recent question, I have converted my annotations over to an XY scatter point series, using custom point markers to render them. That is working beautifully and is much faster than creating annotations as WPF UIElements. I now need to figure out if/how I can get the tooltips displaying like I would prefer.

I currently have a cursor modifier that I’m using to display a consolidated rollover tooltip for all of the visible series. However, now that the annotations are data series also, their information is getting included in this tooltip and I don’t want it to. I would like to have a separate tooltip that appears when the mouse is hovering over a custom point marker that displays the custom metadata for the point. This was the functionality I had working when I was creating the annotations as actual annotations. I’m hoping I can achieve it when creating them as regular data points.

So I guess my questions are: Is there a way to only include certain data series for a given chart modifier so I can keep my “regular” data and “annotation” data segregated? And, is there a way to show a tooltip with metadata only when the actual point is hovered? I was looking at the Series With Metadata example which is similar to what I want to achieve, but the tooltip appears whenever the mouse hovers over anything, not just when it’s over an actual point.

Thanks,
Scott

  • sdamge asked 8 years ago
  • last active 2 years ago
0 votes
8k views

I have multliple renderable series on one scichartsurface and each series has its own y-axis, when CursorModifier-cross moves over line/scatter point/ohlc/candle series how can I ONLY show the y-Value on the with the rendered series matching y-Axis?

With multiple rendered series its virtually impossible to determine which y-Axis value pertains to the specific point of the CursorModifier which “hit-tests” a rendered series.

Is there a simple way to only highlight the y-Value on the matching yAxis as soon as the CursorModifier hit-tests a rendered series? I do not mind to show all yValues on all yAxes when the CursorModifier does not hit-test any rendered series.

Thanks

  • bbmat asked 8 years ago
  • last active 8 years ago
0 votes
11k views

How can I set Tooltip to emerge when pressing definite keyboard button? All my mouse button are needed for other things, hover is not good variant. If my memory serves me correctly in first versions there was possibility to show tooltip on Ctrl button.

  • RTrade A asked 9 years ago
  • last active 9 years ago
1 vote
11k views

How to set Crosshair (CursorModifier) color and thickness in xaml?

  • RTrade A asked 9 years ago
  • last active 9 years ago
0 votes
0 answers
8k views

I use a similar multi-pane setup as your multi-pane stock chart demo and specify the ChartModifier within SciChartSurface.ChartModifier as follows:

<s:SciChartSurface.ChartModifier>
                        <s:ModifierGroup s:MouseEventGroup="SharedMouseGroup">
                            <s:RubberBandXyZoomModifier IsAnimated = "False" IsXAxisOnly = "True" ExecuteOn = "MouseRightButton"/>
                            <s:ZoomPanModifier XyDirection="XYDirection" ClipModeX = "ClipAtExtents" ExecuteOn ="MouseLeftButton" />
                            <s:MouseWheelZoomModifier XyDirection = "XYDirection"/>
                            <s:ZoomExtentsModifier IsAnimated = "False" ExecuteOn = "MouseDoubleClick" />
                            <s:CursorModifier SourceMode="AllSeries"  UseInterpolation="True" ShowAxisLabels="True"/>
                            <s:LegendModifier Name="GeneralLegend" ShowLegend="True" LegendPlacement ="Inside" GetLegendDataFor="AllSeries" Margin="10" LegendItemTemplate="{StaticResource LegendItemTemplate}"/>

                            <s:SeriesSelectionModifier ReceiveHandledEvents="True">
                                <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                    <Style TargetType="s:BaseRenderableSeries">
                                        <Setter Property="StrokeThickness" Value="10"/>
                                    </Style>
                                </s:SeriesSelectionModifier.SelectedSeriesStyle>
                            </s:SeriesSelectionModifier>

                        </s:ModifierGroup>
                    </s:SciChartSurface.ChartModifier>

The problem I have is that the vertical chart modifier (a vertical line as part of the crosshair that vertically tracks the mouse cursor) is only visible within the respective pane where the mouse cursor is currently located at. When I move the mouse cursor onto another pane then the vertical line of the cross hair tracks in this different pane but only within this specific pane. I want the vertical line to be visible across all panes just like in your multi-pane stock chart demo. When I pan or zoom any of the panes then all panes are responding accordingly and in synchronized fashion, so I am sure the panes’ xaxis are all correctly linked to the primary xAxis.

What am I doing wrong?

Thanks

  • bbmat asked 9 years ago
  • last active 9 years ago
Showing 42 results

Try SciChart Today

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

Start TrialCase Studies