Pre loader

Tag: RolloverModifier

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
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
1k views

Hi,
the Tooltip from the rolloverModifier shows for the Open-Values the Label “Open”.

I would like to be able to change that. There might be serveral reasons for that. Maybe the shown data are not “openValues” or the word “open” needs to be translated into another language.

I managed to edit the title of a FastCandlestickRenderableSeries by setting a title and get it into the variable like this:

rolloverTitle = newtitle;
renderableSeries0.rolloverModifierProps.tooltipTitle = rolloverTitle;

unfortunately i did not find a way to set the name/label for the open-,low-,close-, or high-values of this Series.

Can someone give ma a hint how to do this?

1 vote
5k views

In our app we have a feature by which user can add indicators. These indicators can consist of 2 or a maximum of 4 lines.

We don’t want to render svg tooltips(which setted up by the default) with data for each line, instead of that we get point data and pass it to our app inner service that can render indicator legend.

To prevent default tooltips from being displayed we set for each renderable series of an indicator the following values.

rolloverModifierProps.width = 0; rolloverModifierProps.height = 0;

But of course tooltips are still rendered in the DOM and this leads to performance issues when we have 3 or more indicators of this type.

My question is the following

How we can render only circles svg for rollover modifier and completely dont render svg for tooltips in the DOM?

This is what the indicators look like

1 vote
2k views

Hello, I am using SciChartJS and have a new requirement from our users as follows that I need help with the implementation. Any pointers from anyone would be a great help.

**Requirements: **

  • Assume that x-axis is Time and y-axis is prices.
  • There are multiple series in the chart (e.g., Bid Price, Ask Price)
  • Allow user to select a time on xAxis using CTRL + CLICK
  • When the user selects the time, show the rollover line and the tooltip for all series at the selected time
  • This rollover line and tooltip should remain visible until the user selects a new time on the x-axis at which point the rollover tooltip should display the tooltip for the new point.

I started inheriting the RolloverModifier but couldn’t find an appropriate method to show the tooltip.

So, I started implementing the above feature using CustomModifierBase2d and adding a VerticalLineAnnotation for the rollover line. But again, struggling with the tooltip.

If someone could help me out or give me pointers, that would be highly appreciated.

Best Regards,
Sachin Patel.

1 vote
2k views

Hi, I’m looking for a way to programmatically dismiss a RolloverModifier from a chart. I’ve been tasked with creating a user experience that does two things: 1. when a user stops scrubbing on the chart, the rollover modifier should persist, and 2. when the user taps outside of the chart the rollover modifier should disappear.

I’ve accomplished the first part of the problem by implementing a subclass of SCIRolloverModifier and overriding the onEvent(args:) function, but I cannot figure out how to dismiss the rollover modifier when the user taps outside the chart surface.

Is there a way to accomplish this?

1 vote
2k views

Hello,

When annotations and the rollover modifiers are displayed on the very left side of a chart they align with the center of the candlesticks on the chart. However, as they get displayed toward the right side of the chart they get more and more offset to the right side of the candlestick.

Can anyone point me in the right direction to figure out how to fix this issue seemingly with my xAxis?

See attached screenshots,

  • Leland asked 9 months ago
  • last active 9 months ago
1 vote
4k views

Hi,

I’ve been trying to customize the RolloverModifier tooltip content with a vertical chart but am at a loss to try to get the format I need. I’d like to take in all the series info and display them in a tooltip together with a small icon and the y-value next to this.

I was able to do this in the CursorModifier content but unable to do so in the RolloverModifier which is what I really want to use.

I’ve included a CodeSandbox link below showing the custom SVG template and output on the CursorModifier I’d like to use for the RolloverModifier. Is this type of output template possible?

Thanks in advance!

0 votes
5k views

Hi all,

When we enable the rollover modifier and drag the chart, we can see the tooltip.
However, when I release the finger, the tooltip also disappears.
Is there a way to keep the tooltip showing when releasing the finger?
The problem we want to solve is user will use their finger to mark a critical point, then we will take a screenshot of the chart to generate a report.
Not sure if there is any good way to make the tooltip keeps showing to achieve this requirement?
Thanks

  • DCMA DCMA asked 2 years ago
  • last active 7 months ago
1 vote
2k views

Hi,

I am facing a issue with RolloverModifier. I have multiple charts in single window. For some points the lines over the chart are missing.

Please find the attached images for some examples and the code for reproduce the issue. on the attachment you can see that the line on some chart is missing when mouse on left and right corner area of the chart.

Posting again because on latest version also the same issue not resolved.
https://www.scichart.com/questions/js/rollovermodifier-in-multiple-chart-line-missing-on-some-areas

1 vote
2k views

Hi,

I am facing a issue with RolloverModifier. I have multiple charts in single window. For some points the lines over the chart are missing.

Please find the attached images for some examples and the code for reproduce the issue. on the attachment you can see that the line on some chart is missing when mouse on left and right corner area of the chart

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
6k views

I am looking to customize the shape of the rollover vertical line (Android) – particularly, make it dashed and potentially increase the line thickness.
I saw that this is possible for WPF (https://www.scichart.com/questions/wpf/crosshair-cursormodifier-color-and-thickness), but was not able to find any information for Android.

Is this styling capable in Android?

1 vote
2k views

I need to implement custom html legend instead of built-in options.
To hide built-in rollover I’m using series config:

    this.series.rolloverModifierProps.width = 0;
    this.series.rolloverModifierProps.height = 0;
    this.series.rolloverModifierProps.markerColor = "rgba(255, 255, 255, 0)";

I can’t set

 rolloverModifierProps.showRollover = false; 

because in that case rolloverModifierProps.tooltipDataTemplate handler is not firing.
My handler looks like

rolloverModifierProps.tooltipDataTemplate = (seriesInfo: SeriesInfo): string[] => {
            const ohlcInfo = seriesInfo as OhlcSeriesInfo;
            myOwnHandlerToPassDataToHtml({ high: ohlcInfo.highValue, low: ohlcInfo.lowValue, open: ohlcInfo.openValue, close: ohlcInfo.closeValue });
            return [];
        };

I’am wondering if there is any other way to hide rollover marker but keep tooltipDataTemplate handler firing?

0 votes
3k views

I have an impulse series chart, and with SciChart v3.x the rollover modifier line would “snap” to the nearest point. Since migrating to v6.5 this no longer happens – only the rollover marker snaps, not the vertical line. Setting UseInterpolation=”False” has no effect.

I’ve only noticed this on the impulse series, and the rollover line does still snap on other types (e.g. line, scatter). I just wanted to check that I’m not missing something, or if there any way to reinstate this snapping behaviour?

1 vote
6k views

Hello

My application environment is on the mobile browser, so we need to switch between [pan] and [rollover]

When I use a button to switch, everything is fine, but when I want to switch with a long press, an exception occurs

Below is my code

    initModifier() {
        this.partitionList.forEach((obj, idx)=>{
            let sciChartSurface = this.sciObj[idx].sciChartSurface;
            this.zoomPanModifier[idx] = new ZoomPanModifier();
            this.rolloverModifier[idx] = new RolloverModifier({modifierGroup: this.modifierGroupId, showTooltip: false});
            this.zoomPanModifier[idx].isEnabled = true;
            // 擴增功能
            sciChartSurface.chartModifiers.add(
                this.zoomPanModifier[idx],
                new ZoomExtentsModifier(),
                new MouseWheelZoomModifier(),
                new PinchZoomModifier(),
            );
        });
    },
    switchCross() {
        let enablePan = !this.zoomPanModifier[0].isEnabled;
        this.partitionList.forEach((obj, idx)=>{
            let sciChartSurface = this.sciObj[idx].sciChartSurface;
            this.zoomPanModifier[idx].isEnabled = enablePan;
            if (enablePan)
                sciChartSurface.chartModifiers.removeAt(4);
            else
                sciChartSurface.chartModifiers.add(this.rolloverModifier[idx]);
        });
    },

I recorded a video, first use the button to switch, and then long press to switch, you can see the problem I want to narrate from the video, the URL is as follows: https://youtu.be/vJjbLNGS-iM

After the problem occurred, it was expected that touchmove should be [pan], but it became [zoom]

Thanks for your help

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.

1 vote
0 answers
7k views

Hi Sci Chart,

I am using WPF with MVVM.

What i want to achieve is by reading the rollover modifier current hit point data, when user click left click, i want to add VerticalSliceModifier in the graph based on the hit point.

Attach is my code from xaml and viewmodel.

I have two issues which are:
“if (DistanceSeriesData.SeriesInfo.Count > 0)”, i always get zero count of seriesinfo.

In DistanceVerticalLines?.Add(new VerticalLineAnnotation(), the added Distance Vertical Lines data did not reflect in graph.

1 vote
3k views

Hi,

I’m trying to convert Java code to swift and I need the RolloverModifier class’s updateCurrentPoint method. I create CustomRolloverModifier class inherits from SCIRolloverModifier class and import SciChart.Protected.SCIRolloverModifier extension too. But i can’t find updateCurrentPoint method. What is the updateCurrentPoint equivalent method on swift?

Thanks.

0 votes
10k views

Hello,

I’m wanting to switch to SciChart from a previous charting library. One neat thing that our previous library did that I cannot figure out how to do in SciChart is change the interaction between tooltips/rollover and panning.

What I would like to do is Pan/Drag the chart on short tap events, and do a rollover or tooltip cursor on long tap events. By default it looks like I get rollover and panning together on any tap event, which is not ideal behavior for my apps. Depending on the tap event type, I would like to do just one or the other, not both. How can I do something similar with SciChart?

Thank you,

  • C Bolton asked 4 years ago
  • last active 4 years ago
0 votes
6k views

Hello, I have tried to see if it is possible to show the rollover without showing any labels so that is is just a vertical bar. I was searching on StackOverflow and a few answers said it was not possible to omit any of the values from the graph. I did see that we can customize the cursor, is it possible to just have it be a vertical bar instead of a cross?? Then I could just use it instead of the default rollover.

I am linking a mockup we made of what we want to make. In the image, you have the graphic showing where the use as pressed, and above the graphic, we will show and update a graphic with the relevant information for that point.

Also, I will need to programmatically dismiss it so it will need to stay visible even if the user is panning or zooming.

0 votes
10k views

Hi again,

Is it possible to move the rollover modifier without a touch when I know the x-axis and y-axis values?

At the moment user can tap the chart and the rollover modifier shows up and snaps to the closest point. Then I leave the rollover modifier visible by ignoring the onTouchUp() event. I have an external component that has the same data as the graph and now if user selects an item from that external component I would like to move the rollover modifier to that point. How can I do this?

0 votes
7k views

Hi,

Is it possible to require two finger touch to pan the chart horizontally? I have a line chart with a rollover modifier so I don’t want to pan when I am moving the rollover modifier.

0 votes
7k 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.

0 votes
10k views

I have two questions on rollover modifier.

One is the tooltip of the rollover is right under the finger on a heatmap chart. Can I move it to the top left section of the touch point?

Second question is how can I implement a callback function whenever Y axis of the rollover modifier changes?

Thanks for your attention in advance.

  • Gang Xu asked 4 years ago
  • last active 4 years ago
0 votes
4k views

Hello SciChart Team,

I was facing a problem lately and would like to know if you can reproduce it or maybe if you have fixed it in the latest version already.

I have created a chart with a X axis using DateTime as format. When I use the RolloverModifier in combination with Interpolation I get an ArgumentOutOfRangeException when moving the cursor to the Y Axis (see attached image).

I have attached the full excetption details as well.

I am looking forward to your feedback.

Thanks and best regards
Stefan

SciChart Version: 5.4.0.12119
SciChart Runtime Version: v4.0.30319


System.ArgumentOutOfRangeException was unhandled Message: An unhandled
exception of type 'System.ArgumentOutOfRangeException' occurred in
WindowsBase.dll Additional information: Ticks must be between
DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.


System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
   at System.DateTime..ctor(Int64 ticks)
   at A.ARB.Subtract(DateTime a, DateTime b)
   at SciChart.Charting.Model.DataSeries.DataSeries2.FindClosestLine(IComparable x, IComparable y, Double xyScaleRatio, Double xRadius, LineDrawMode drawNanAs)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.NearestHitResult(Point mouseRawPoint, Double hitTestRadiusInPixels, SearchMode searchMode, Boolean considerYCoordinateForDistanceCalculation)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.HitTestInternal(Point rawPoint, Double hitTestRadius, Boolean interpolate)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.HitTest(Point rawPoint, Double hitTestRadius, Boolean interpolate)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.VerticalSliceHitTest(Point rawPoint, Boolean interpolate)
   at SciChart.Charting.ChartModifiers.RolloverModifier.GWB(Point D)
   at SciChart.Charting.ChartModifiers.RolloverModifier.BY.MoveNext()
   at SciChart.Charting.Common.Extensions.EnumerableExtensions.RU.MoveNext()
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable1 enumerable, Action1 operation)
   at SciChart.Charting.ChartModifiers.RolloverModifier.FillWithIncludedSeries(IEnumerable1 infos, ObservableCollection1 seriesInfos)
   at SciChart.Charting.ChartModifiers.RolloverModifier.HandleMasterMouseEvent(Point mousePoint)
   at SciChart.Charting.ChartModifiers.InspectSeriesModifierBase.TUB(Point D)
   at SciChart.Charting.ChartModifiers.InspectSeriesModifierBase.HandleMouseEvent(ModifierMouseArgs e)
   at SciChart.Charting.ChartModifiers.InspectSeriesModifierBase.OnModifierMouseMove(ModifierMouseArgs e)
   at SciChart.Charting.ChartModifiers.ModifierGroup.<>c.OB(IChartModifier D, ModifierEventArgsBase I)
   at SciChart.Charting.ChartModifiers.ModifierGroup.FTB(Action2 D, ModifierEventArgsBase I)
   at SciChart.Charting.ChartModifiers.ModifierGroup.OnModifierMouseMove(ModifierMouseArgs e)
   at SciChart.Core.Utility.Mouse.MouseManager.UB(ModifierMouseArgs D, IReceiveMouseEvents I, Boolean J)
   at SciChart.Core.Utility.Mouse.MouseManager.ZDB.M(IReceiveMouseEvents D)
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable1 enumerable, Action1 operation)
   at SciChart.Core.Utility.Mouse.MouseManager.JB(IReceiveMouseEvents D, ModifierMouseArgs I, Action3 J)
   at SciChart.Core.Utility.Mouse.MouseManager.GB(IPublishMouseEvents D, IReceiveMouseEvents I, MouseEventArgs J, MouseButtons M, Action3 O)
   at SciChart.Core.Utility.Mouse.MouseManager.AEB.T(Object D, MouseEventArgs I)
   at A.LEB.S(MouseEventArgs D)
   at A.LEB.M(Object D, MouseEventArgs I)
   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& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& 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& 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 XXX.App.Main()
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
  • Stefan Ott asked 4 years ago
  • last active 4 years ago
0 votes
4k views

I’m getting the following crash:

2020-02-14 16:45:43.902812-0500 CommonStock Development[2425:710225] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080
2020-02-14 16:45:43.904098-0500 CommonStock Development[2425:710225] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080’

whenever I try to scrub my chart, I must also note that in order for the legend to show, I have to tap really hard on the surface.

This is my code:

func set(data set: SimpleChartDataSet, alternate: SimpleChartDataSet) {

    let lineDataSeries = SCIXyDataSeries(xType: .double, yType: .double)
    let dashedDataSeries = SCIXyDataSeries(xType: .double, yType: .double)

    let group = DispatchGroup()
    group.enter()

    DispatchQueue.global(qos: .userInteractive).async {
        for (index, i) in set.enumerated() {
            lineDataSeries.append(x: Double(index), y: Double(i))
        }

        for (index, i) in alternate.enumerated() {
            dashedDataSeries.append(x: Double(index), y: Double(i))
        }

        group.leave()
    }

    group.notify(queue: .main) {

        let lineSeries = SCIFastMountainRenderableSeries()
        lineSeries.zeroLineY = set.min() ?? 0.0
        lineSeries.dataSeries = lineDataSeries
        lineSeries.strokeStyle = SCISolidPenStyle(color: UIColor.green, thickness: 2.0)
        lineSeries.areaStyle =  SCILinearGradientBrushStyle(start: CGPoint(x: 0, y: 1), end: CGPoint(x: 0, y: 0), start: UIColor.green, end: UIColor.clear)

        let dashedSeries = SCIFastLineRenderableSeries()
        dashedSeries.zeroLineY = set.min() ?? 0.0
        dashedSeries.dataSeries = dashedDataSeries
        dashedSeries.strokeStyle = SCISolidPenStyle(color: UIColor.white, thickness: 2.0, strokeDashArray: [2.0,2.0,2.0,2.0])

        SCIUpdateSuspender.usingWith(self.surface) {

            self.surface.xAxes.clear()
            self.surface.yAxes.clear()
            self.surface.renderableSeries.clear()

            let xAxis = SCINumericAxis()
            xAxis.drawLabels = false
            xAxis.drawMajorBands = false
            xAxis.drawMajorGridLines = false
            xAxis.drawMinorGridLines = false
            xAxis.drawMinorTicks = false
            xAxis.drawMajorTicks = false
            xAxis.drawLabels = false

            let yAxis = SCINumericAxis()
            yAxis.drawLabels = false
            yAxis.drawMajorBands = false
            yAxis.drawMajorGridLines = false
            yAxis.drawMinorGridLines = false
            yAxis.drawMinorTicks = false
            yAxis.drawMajorTicks = false
            yAxis.drawLabels = false

            self.surface.xAxes.add(items: xAxis)
            self.surface.yAxes.add(items: yAxis)
            self.surface.renderableSeries.add(items: lineSeries, dashedSeries )
            self.surface.chartModifiers.add(SCIRolloverModifier())
        }
    }
}
0 votes
8k views

Hi,

I’m using RolloverModifier and i want to show only point marker. I don’t want to show tooltip or any info on series. Is it possible?

Tnx.

0 votes
10k views

I set a rolloverModifier to a CandlestickSeries, but I can not find a API to hide RolloverMarker,I only find a article about WPF(https://www.scichart.com/documentation/v5.x/webframe.html#RolloverModifier.html), how could I hide RolloverMarker or change the style of RolloverMarker in Android?

enter image description here

  • jiahao li asked 4 years ago
  • last active 4 years ago
0 votes
11k views

I have several series on a surface and currently use the Rollovermodifier. It highlights the datapoint on each series that intersects with the current vertical line of the RolloverModifier. However, I don’t seem to be able to display the corresponding y-values on the Y-Axis. How can I accomplish such? Is there any easy way to show the y-value of each series on the y-Axis that intersects with the vertical line of the Rollovermodifier?

  • bbmat asked 4 years ago
  • last active 4 years ago
0 votes
9k views

hello, i use RolloverModifier on my chart, can i hide Pointmarker?

0 votes
9k views

Hi there:

I am developing an application where the main chart is a heat map type one. I would like to have a custom cursor modifier to show some values of the x, y and z axes with limit digits. The problem is that so far I get these result:

Capture
EDIT: PLEASE INSERT AN IMAGE HERE

I would like to show only 1 decimal in the Z axis and 0 decimals en the X and Y axis. I have checked your modifiers demo but it seems to be not working for my heatmap chart. Any kind of advice about this issue would help me to have the application I am looking for.

The XAML of my chart is like this:

 <s:SciChartSurface x:Name="sciChart" Grid.Column="1" Grid.Row="3" Padding="0" BorderThickness="0" MouseDown="SciChart_MouseDown" Margin="0">
            <s:SciChartSurface.RenderableSeries>
                <s:FastUniformHeatmapRenderableSeries x:Name="heatmapSeries" 
                                                      Opacity="0.9"/>
            </s:SciChartSurface.RenderableSeries>

            <s:SciChartSurface.XAxis>
                <s:NumericAxis DrawMajorBands="True"  
                               DrawLabels="False"
                               TextFormatting="0N"
                               GrowBy="0, 1"
                               s:RolloverModifier.AxisLabelContainerStyle="{StaticResource AxisLabelStyle}" 
                               s:RolloverModifier.AxisLabelTemplate="{StaticResource AxisLabelTemplate}" 
                               s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorAxisLabelStyle}"/>
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:NumericAxis DrawMajorBands="True" 
                               GrowBy="0, 1"
                               DrawLabels="False" 
                               VisibleRange="0,249"  
                               TextFormatting="0"/>
            </s:SciChartSurface.YAxis>

            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RolloverModifier x:Name="RolloverModifier"
                                    IsEnabled="True"
                                    ShowTooltipOn="Always" />
                    <!--<s:CursorModifier IsEnabled="True" ShowTooltip="True" ShowTooltipOn="MouseOver"
                        ShowAxisLabels="true" SourceMode="AllSeries"/>-->
                    <s:CursorModifier x:Name="CursorModifier"
                                  IsEnabled="False"
                                  UseInterpolation="False"
                                  ShowAxisLabels="False"
                                  ShowTooltip="True"
                                  ShowTooltipOn="MouseOver"/>
                    <!--<s:VerticalSliceModifier IsEnabled="True">
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation IsEditable="false"
                                                  LabelPlacement="Axis"
                                                  ShowLabel="true"
                                                  LabelTextFormatting="0"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>-->
                </s:ModifierGroup>

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

Thanks in advanced.

0 votes
6k views

Hello, I’m using rollover modifier. By default data label is in first line, and data value is in second line. How can I modify it to have label and value in single line?

0 votes
6k views

In my implementation I have the xAxis using a DateAxis in the dataset I am using there is only one data point.

The RolloverModifier is very sensitive it is very hard to highlight that one point.

RolloverModifier rolloverModifier = new VitalChartRolloverModifier();
rolloverModifier.setSourceMode(SourceMode.AllVisibleSeries);
rolloverModifier.setDrawVerticalLine(true);
rolloverModifier.setShowTooltip(true);
rolloverModifier.setShowAxisLabels(false);
rolloverModifier.setIsEnabled(true);
rolloverModifier.setUseInterpolation(false);

Is there a way of making it less sensitive?

0 votes
7k views

Thank you for your previous response however I would like to know how to recover the Date value from the AxisInfo parameter of the updateInternal method of the AxisToolTip class when used with a DateAxis.

To give context to the question. I am using a DateAxis for the xAxis on this chart and specifying a customised AxisInfoProvider as in the ‘CustomizationRolloverModifierTooltips’ example. When the RolloverModifier highlights some points and if ShowAxisLabels is true then the customised version of the updateInternal method of a customised AxisToolTip is called to to display the xAxis value on the axis.

The AxisInfo object contains a dataValue member variable the question then is: how to convert this back to a Date object.

0 votes
0 answers
9k views

Hello,

I’m currently evaluating SciChart to see if it supports our needs for an application. We’re trying to have a chart that closely mimics the iOS Stock application (attachment: StockApp.PNG) but for sensor values. Our effort so far can be seen in attachment: SciChart.jpg.

  1. Inside the tooltip provided by the RolloverModifier, we only want to display the value of the Y axis – and get rid of the X axis (datetime). Is there a way to hide the X axis value and only display the Y axis value inside the tooltip? Refer to SciChart.jpg. For example, when RolloverModifier is visible, the tooltip for Turbidity line should only read “Turbidity: 2.50 NTU”, where 2.50 is the Y-axis value and NTU is the unit of measure. Notice we do not want to see “X: 28/01/18 12:24PM” at all in the tooltip.

  2. Similar to the iOS Stock app, we require a second RolloverModifier when a second finger rests on the chart. The idea is to provide a quick popover to display the difference in Y-axis value between the two RolloverModifier values. I tried adding a second instance of RolloverModifier to the SCIChartSurface however the vertical trace line would just overlap the first finger’s trace line.

There are the two major requirements I see right now in determining whether to invest in SciChart. So please let me know if they are possible. Below is the code.

    override func viewDidLoad() {
        super.viewDidLoad()

        layout()

        configXaxis(surface: sciChartSurface)
        configYaxis(surface: sciChartSurface)        
        loadDataSeriesFromCsv(csv: rlCSVToDownload!)
    }

   private func layout() {
        let margins = view.layoutMarginsGuide

        sciChartSurface = SCIChartSurface()
        sciChartSurface?.translatesAutoresizingMaskIntoConstraints = false
        self.view.addSubview(sciChartSurface!)

        sciChartSurface?.leadingAnchor.constraint(equalTo: self.view.leadingAnchor).isActive = true
        sciChartSurface?.trailingAnchor.constraint(equalTo: self.view.trailingAnchor).isActive = true
        sciChartSurface?.bottomAnchor.constraint(equalTo: margins.bottomAnchor).isActive = true
        sciChartSurface?.topAnchor.constraint(equalTo: margins.topAnchor).isActive = true
    }

    private func configYaxis(surface: SCIChartSurface!) {
        let axis = SCINumericAxis(), numericFormat = "%.02f"
        axis.textFormatting = numericFormat
        axis.cursorTextFormatting = numericFormat
        surface.yAxes.add(axis)
    }

    private func configXaxis(surface: SCIChartSurface!) {
        let axis = SCIDateTimeAxis(), datetimeFormat = "dd/MM/YY H:mm a", subDayFormat = "H:mm a"
        axis.textFormatting = datetimeFormat
        axis.subDayTextFormatting = subDayFormat
        axis.cursorTextFormatting = datetimeFormat

        surface.xAxes.add(axis)
    }

    private func addModifiers() {
        let xAxisDragmodifier = SCIXAxisDragModifier()
        xAxisDragmodifier.dragMode = .pan
        xAxisDragmodifier.clipModeX = .none

        let yAxisDragmodifier = SCIYAxisDragModifier()
        yAxisDragmodifier.dragMode = .pan

        let extendZoomModifier = SCIZoomExtentsModifier()
        let pinchZoomModifier = SCIPinchZoomModifier()

        let rolloverModifier = SCIRolloverModifier()

        let legend = SCILegendModifier()

        let groupModifier = SCIChartModifierCollection(childModifiers: [xAxisDragmodifier, yAxisDragmodifier, pinchZoomModifier, extendZoomModifier, legend, rolloverModifier])

        sciChartSurface?.chartModifiers = groupModifier
    }

   private func loadDataSeriesFromCsv(csv: CSV) {
        rlCSVConnection?.download(csv: csv, onProgress: nil, onComplete: {
            [weak self] (csv) -> (Void) in

            self?.turbDataSeries = SCIXyDataSeries(xType: SCIDataType.dateTime, yType: SCIDataType.double)
            self?.turbDataSeries.seriesName = "Turbidity"

            self?.cl2DataSeries = SCIXyDataSeries(xType: SCIDataType.dateTime, yType: SCIDataType.double)
            self?.cl2DataSeries.seriesName = "Chlorine"

            //... Populate data into DataSeries ...

            self?.turbRenderableSeries = SCIFastLineRenderableSeries()
            self?.turbRenderableSeries.isDigitalLine = true
            self?.turbRenderableSeries.dataSeries = self?.turbDataSeries
            self?.turbRenderableSeries.style.strokeStyle = SCISolidPenStyle(color: UIColor.orange, withThickness: 1)

            self?.cl2RenderableSeries = SCIFastLineRenderableSeries()
            self?.cl2RenderableSeries.isDigitalLine = true
            self?.cl2RenderableSeries.dataSeries = self?.cl2DataSeries
            self?.cl2RenderableSeries.style.strokeStyle = SCISolidPenStyle(color: UIColor.green, withThickness: 1)

            self?.sciChartSurface?.renderableSeries.add(self?.turbRenderableSeries)
            self?.sciChartSurface?.renderableSeries.add(self?.cl2RenderableSeries)

            self?.addModifiers()
        }, onFailure: nil)
    }

Thanks.

0 votes
11k views

Using custom label provider I am able to format the cursor label, but still there is the name of the axis. I only want to show the value here, like “0,91” and remove the “X:” (see attached screenshots).

Thanks in advance.

override func formatCursorLabel(_ dataValue: SCIGenericType) -> String! {
    return "" // super.formatCursorLabel(dataValue)
}
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
7k views

Hi !
Is it possible to display the RollOverModifier tooltip on the real points only ? Say I have points (1 1) and (3 3) in my chart and I don’t wan’t the tooltip to display (1.5 1.5), (2 2), (2.5 2.5) etc. when rolling over… Any idea ?

Thank you,

Adrien

0 votes
9k views

Hello !

I have a chart displaying very accurate data and I would like the RolloverModifier to adopt the same format as my Y axis.
I want to avoid problems similar to the one on the screenshot attached. The tooltip is indicating -0 and I would like it to display something like -2.5E-6.

Thank you for your help,

Adrien

0 votes
10k views

In the Knowledge Base, an article discusses a rollover modifier that utilises a vertical hit test to draw a vertical line at the cursor and highlight the nearest point: http://support.scichart.com/index.php?/Knowledgebase/Article/View/17235/32/custom-chartmodifiers—part-1—creating-a-custom-rollover-modifier

This is perfect for data which moves/is unique along the X axis (such as time series data).

How can I best replicate this modifier for data which moves/is unique along the Y axis? Drawing a horizontal line is easy, but there is no HorizontalSliceHitTest function.

  • Rick C asked 7 years ago
  • last active 7 years ago
0 votes
6k views

Hi,

I’m trying to update a chart from version 3.1.x of a chart. In the old chart there was a XyScatterRenderableSeries with markers width set to 8. The Rollover line had the same width as the marker and it was easy to hit a point. After update the rollover line is thin and it is hard to hit a point. Please advise if it is possible to get back the old behavior.

0 votes
6k views

I want to have Y axis starting at 0 at the bottom and max value at the top, but I also want 0 index in heatmap data buffer to be displayed at the max value. I was able to achieve that using your HeatMapExampleView by modifying CreateSeries method like this

return new Heatmap2DArrayDataSeries<int, int, double>(data, ix => ix, iy => h - iy);

Note the iy => h – iy. What I noticed is that after doing that the RolloverModifier stopped working. How can I fix this or is this a bug?

  • Rok Rode asked 7 years ago
  • last active 7 years ago
0 votes
8k views

After migrating to 4.0.5, I have shadows on my tooltips as below.
Also, the herringbone pattern is new to 4.0.
I have:

  </Border>
</ControlTemplate>


<s:SciChartSurface.ChartModifier>
    <s:ModifierGroup>
      <s:RolloverModifier s:Name="rolloverModifier"
                                    LineOverlayStyle="{StaticResource RolloverLineStyle}"
                                    DrawVerticalLine="True"
                                    SourceMode="AllSeries"
                                    ShowTooltipOn="MouseLeftButtonDown"                                  
                                    ShowAxisLabels="True" />
      <s:SeriesSelectionModifier ReceiveHandledEvents="True" />
    </s:ModifierGroup>
  </s:SciChartSurface.ChartModifier>

Any hints on how to get rid of them?

After upgrade to 4.0

1 vote
7k views

In version 3, I had

<ControlTemplate x:Key="RolloverLabelTemplate" TargetType="s:TemplatableControl">
  <Border Background="#77FFFFFF"
                BorderBrush="{Binding Stroke,
                                      Converter={StaticResource ColorToBrushConverter}}"
                BorderThickness="2"
                CornerRadius="5">
    <!--<StackPanel Margin="5">
                <TextBlock FontSize="12"
                           FontWeight="Bold"
                           Foreground="{Binding Stroke,
                                                Converter={StaticResource ColorToBrushConverter}}"
                           Text="{Binding SeriesName}" />
                <TextBlock FontSize="11"
                           Foreground="{Binding Stroke,
                                                Converter={StaticResource ColorToBrushConverter}}"
                           Text="{Binding Value}" />
            </StackPanel>-->
  </Border>
</ControlTemplate>

  <s:ModifierGroup>
      <s:RolloverModifier x:Name="rolloverModifier"
                                    LineOverlayStyle="{StaticResource RolloverLineStyle}"
                                    DrawVerticalLine="True"
                                    SourceMode="AllSeries"
                                    ShowTooltipOn="MouseLeftButtonDown"
                                    TooltipTemplate="{StaticResource RolloverLabelTemplate}"
                                    ShowAxisLabels="True" />
      <s:SeriesSelectionModifier ReceiveHandledEvents="True" />
    </s:ModifierGroup>

In Version 4, I get the error on the
 TooltipTemplate="{StaticResource RolloverLabelTemplate}"

An object of the type "System.Windows.Controls.ControlTemplate" cannot be applied to a property that expects the type "System.Windows.DataTemplate".

Could I get some help on this please?

Thanks,
-Robert
1 vote
0 answers
7k views

Why I can’t access to the TooltipContainerStyle property in RolloverModifier in SciChart v4.0?
I’ve read documentation and it seems that it should work but it doesn’t ;(
Does it any other way to change the tooltip label in RolloverModifier?

0 votes
17k views

Dear All:

I have been looking for a good way to obtain data from a multi-line chart (more than 1 y-value/y-axis) by either clicking an area that’s highlighted with a vertical line rollover, or selected with a vertical slice.

Basically I would like to take the data that I see in the Series Vertical Slices example, and extract the X-Axis values, as well as the Curve A, Curve B, and Curve C values that are shown on the vertical slice, so that I can insert that in something like a TextBox in a WPF.

Any idea how to do this, as well as with MVVM? (Will use MVC if necessary).

Thanks kindly!

— A

  • Ari Sagiv asked 8 years ago
  • last active 8 years ago
0 votes
0 answers
9k views

Hi,

I am displaying some charts on the screen (4 per screen). When I double click one chart, it opens in another, modal window.
I have the below problem with the tooltip modifier and the rollover modifier (one is enabled at a time, tried with both, need the fix at least for the tooltip modifier)

When I close the window, the following happens, to the chart that was double clicked:

1- If the chart is a simple column chart, the tooltip modifier does not work as soon as the maximized window is closed. Nothing happens when I move the mouse. I found a simple workaround, which is to zoom in/out even very little, and the modifier works back. Here I’m forcing it by code:

private void ChrtSurface_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //Get the chart from the sender tag
            var surface = (SciChartSurface)sender;
            var chart = (SciChart)surface.Tag;

            //The chart is already executed, so no need  do that again. Start the single view form
            var form = new SingleChartView(new SingleChartViewModel(chart, this._viewModel.SelectedModule.Id));
            form.ShowDialog();

            ZoomChartToExtents(chart);
        }

public void ZoomChartToExtents(SciChart chart)
        {
            var scichartSurface = lstCharts.FindVisualChildren<SciChartSurface>().FirstOrDefault(x => x.Tag == chart);
            Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action<SciChartSurface>(ZoomExtents), scichartSurface);

        }

        public void ZoomExtents(SciChartSurface chart)
        {
            chart.ZoomExtents();
            chart.ChartModifier.OnModifierMouseUp(new ModifierMouseArgs() { MouseButtons = MouseButtons.Right });
        }

2- If the chart is a stacked chart, I get a null reference exception. Here’s the exception:

“An exception of type ‘System.NullReferenceException’ occurred in Abt.Controls.SciChart.Wpf.dll but was not handled in user code

Additional information: Object reference not set to an instance of an object.”

And the stack trace (if zoom extents is not called):

at Abt.Controls.SciChart.Visuals.RenderableSeries.StackedColumnRenderableSeries.HitTestInternal(Point rawPoint, Double hitTestRadius, Boolean interpolate)
at Abt.Controls.SciChart.Visuals.RenderableSeries.BaseRenderableSeries.HitTest(Point rawPoint, Double hitTestRadius, Boolean interpolate)
at Abt.Controls.SciChart.Visuals.RenderableSeries.BaseColumnRenderableSeries.HitTest(Point rawPoint, Double hitTestRadius, Boolean interpolate)
at Abt.Controls.SciChart.Visuals.RenderableSeries.BaseRenderableSeries.HitTest(Point rawPoint, Boolean interpolate)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase. . (IRenderableSeries )
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase. .MoveNext()
at Abt.Controls.SciChart.ChartModifiers.TooltipModifier.YB(Point C, Point& D)
at Abt.Controls.SciChart.ChartModifiers.TooltipModifier.HandleMasterMouseEvent(Point mousePoint)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase.YB(Point C)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase.HandleMouseEvent(ModifierMouseArgs e)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase.OnModifierMouseMove(ModifierMouseArgs e)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.AC(IChartModifier C, ModifierEventArgsBase D)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.YB(Action2 C, ModifierEventArgsBase D)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.OnModifierMouseMove(ModifierMouseArgs e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager. (ModifierMouseArgs , IReceiveMouseEvents , Boolean )
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.
. . (IReceiveMouseEvents )
at Abt.Controls.SciChart.Common.Extensions.EnumerableExtensions. [ ](IEnumerable
1 , Action`1 )
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.
. (Object , MouseEventArgs )
at A. . (MouseEventArgs )
at A. . (Object , MouseEventArgs )
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& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
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 ISF.Application.App.Main() in c:\Users\Charbel\Documents\Projects\ISF\ISFSolution\ISF.Application\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

If zoom extends is called, I get the following stack trace:

at Abt.Controls.SciChart.Visuals.RenderableSeries.StackedColumnRenderableSeries.GetXRange()
at Abt.Controls.SciChart.Visuals.Axes.AxisBase.YB()
at Abt.Controls.SciChart.Visuals.Axes.AxisBase.GetMaximumRange()
at Abt.Controls.SciChart.Visuals.SciChartSurface.YB(TimeSpan C)
at Abt.Controls.SciChart.Visuals.SciChartSurface.YB(TimeSpan C)
at Abt.Controls.SciChart.Visuals.SciChartSurface.ZoomExtents()
at ISF.Application.Dashboard.Windows.Dashboard.ZoomExtents(SciChartSurface chart) in c:\Users\Charbel\Documents\Projects\ISF\ISFSolution\ISF.Application\Dashboard\Windows\Dashboard.xaml.cs:line 54

More info in case it helps:

I tried using the SimpleRolloverModifier code from http://support.scichart.com/index.php?/Knowledgebase/Article/View/17235/32/custom-chartmodifiers—part-1—creating-a-custom-rollover-modifier

And found that when the problem happens, the hit test either detects nothing or causes a null reference.

The problem ONLY happens when I open and close the modal window. If I don’t do that all works fine.

Thanks
Charbel

  • cabdo asked 9 years ago
  • last active 9 years ago
0 votes
8k views

Hi,

NOTE: Still using Scichart 1.7 here…

I have two questions about the rollovermodifier behaviour:

  1. As you can see in the picture, when rolling over the chart, sometimes the Xvalues of the series are not aligned. Is it possible to force this to be the same? Basically i always want the Xvalue to be the same for all the series when rolling over, would be nice to have the xvalue where the vertical bar is shown…
    Two hitpoints

  2. Might be just the chart behaviour, but is it possible to have the rollover feedback performed for values not in the visible range? When zoomed in, and for instance the top of the columnBar is not within the range, the seriesinfo is not shown for this datapoint.

Thanks a lot for the feedback.

0 votes
10k views

Hello,

I would like to use the RolloverModifier to display a given datapoint’s identification (string) metadata. The solution suggested in this link on correlating metadata to datapoints seems promising, but for the fact that I have multiple charts to display simultaneously, hence I need multiple lookup arrays. I originally thought to use a ValueConverter that would manage lookup of the identification value based a chart view model instance code (ChartId) and the index provided in the XyzDataSeries. As control charts are instantiated, they register with the ValueConverter, which maintains a static lookup dictionary. In the XAML, the ZValue is passed as the value and the chartID is passed as a parameter to the ValueConverter. I have run into a couple key challenges, however:

  1. ConverterParameters cannot be bound; hence I cannot bind to the ChartId, whether it is stored in a viewmodel or in a different XAML element.
  2. WPF does not allow use of nested value converters in XAML; this prevents me from nesting the ValueConverter within the chart view model (where reference to the ChartId is readily available).

I’m exploring some other options, but they are getting ugly fast, so I figured it’s time to ask for assistance. Is there another way to do this (desirably adhering to MVVM practices)?

Key excerpts of my code are pasted below:

Surface:

<TextBlock x:Name="ChartIdBlock" IsEnabled="False" Text="{Binding ChartId}"/>
<s:SciChartSurface x:Name="ScsControlChart" MinHeight="200" s:ThemeManager.Theme="BlackSteel">
<s:SciChartSurface.RenderableSeries>
    <s:FastLineRenderableSeries x:Name="Data" SeriesColor="White" DataSeries="{Binding Chart, Converter={StaticResource ChartDataToDataSeriesConverter}}" IsSelected="True"/>
   <!-- More data series in same chart -->
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
    <s:DateTimeAxis  VisibleRange="{Binding XRange, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" TickLabelStyle="{StaticResource AxisLabelStyle}" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
    <s:NumericAxis DrawMajorBands="True" VisibleRange="{Binding YRange, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" TickLabelStyle="{StaticResource AxisLabelStyle}"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
    <s:ModifierGroup>
        <s:RolloverModifier x:Name="RolloverModifier" DrawVerticalLine="True" SourceMode="SelectedSeries" TooltipLabelTemplate="{StaticResource RolloverLabelTemplate}"/>
    </s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

RolloverLabelTemplate:

<ControlTemplate x:Key="RolloverLabelTemplate" TargetType="s:TemplatableControl">
    <Border Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Background="#77FFFFFF" BorderBrush="#55000000" BorderThickness="1" Padding="5">
        <ItemsControl ItemsSource="{Binding ElementName=RolloverModifier, Path=SeriesData.SeriesInfo}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                        <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="3,3,20,3">
                            <TextBlock FontSize="13" FontWeight="Bold" Foreground="{Binding SeriesColor, Converter={StaticResource ColorToBrushConverter}}"
                                       Text="{Binding ZValue, Converter={StaticResource IndexToIdConverter}, ConverterParameter={Binding ElementName=ChartIdBlock, Path=Text}}"/>
                        </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Border>

Value Converter:

public sealed class ChartIndexToIdConverter : IValueConverter
{
    private readonly static Dictionary<int, Tuple<int, string[]>> _lookup = new Dictionary<int, Tuple<int, string[]>>();
    private readonly static Random _rnd = new Random();

    public static int Register(IControlChart chart)
    {
        var key = _rnd.Next();
        while (_lookup.ContainsKey(key)) key = _rnd.Next();
        _lookup.Add(key, new Tuple<int, string[]>(chart.First().Index, chart.Select(d => d.Id).ToArray()));
        return key;
    }

    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value == null) throw new ArgumentNullException("value");
        if (parameter == null) throw new ArgumentNullException("parameter");
        var tuple = _lookup[(int)parameter];
        return tuple.Item2[(int)value - tuple.Item1];
    }
}
Showing 1 - 50 of 58 results

Try SciChart Today

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

Start TrialCase Studies