Pre loader

Forums

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

I would like to synchronise the alignment/zooming of a proprietary control displaying a schematic with a SciChartSurface axis range. What events/properties should I be looking at?
My attempt so far involves determining the visible range of the SciChart axis and its limits in pixels. I’ve seen there are events for AxisAlignmentChanged, SizedChanged, VisibleRangeChanged but these do not help if, for example, a legend is made visible to the right of the chart. I’m guessing I need an event for a change in the ModifierSurface size/position.

0 votes
0 answers
6k views

Hello, I’m a SciChart user. Version 3.1.0.4759.

I want to know current selected series.
I was tested code below.
But selectedSeries is a previous series.
How can i find a current selected series?

private void FastLineRenderableSeries_SelectionChanged(object sender, EventArgs e)
{

     var selectedSeries = this.sciChartSurface.SelectedRenderableSeries.FirstOrDefault();
     if (selectedSeries != null)
    {
            FastLineRenderableSeries series = (FastLineRenderableSeries)selectedSeries;
            ...
    }
}
0 votes
10k views

When i am in Zoom in my X axis values are repeated (See attached image) i think the problem with autoticks the xaml code for x axis is


<s:SciChartSurface.XAxis>

</s:SciChartSurface.XAxis>

how can i fix this?

  • Raghupathy asked 9 years ago
  • last active 9 years ago
0 votes
12k views

Is there a way to force to show first and last labels for major tick on X axis ?

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

I have written my first SciChart WPF application using the latest free trial version (4.0.5.8246). It is a simple evaluation application that draws one or more lines with each line defined to have 100 or more points. I am using the following SciChart types from the n4.5 DLLs:

SciChartSurface
NumericAxis
FastLineRenderableSeries
XyDataSeries<double,double>

Also, I have my project platform target set to x64 and Debug. I have verified I have DirectX installed (SDK, June 2010, 9.29.1962.0).

How can I be sure that DirectX is being used for rendering and not software rendering?

I have attached the code for this fairly simple application.

Thanks,
Dave

  • Dave Leach asked 8 years ago
  • last active 4 years ago
0 votes
13k views

I’ve implemented the following ContextMenu:

  <s:SciChartSurface.ContextMenu>
            <ContextMenu>
                <MenuItem x:Name ="header1" Header="Einfügen" Command="{Binding InsertItem}" IsEnabled="{Binding SelectedElementsCount,Converter={StaticResource BoolToOppositeBoolConverter}}" />
                <MenuItem Header="Entfernen" Command="{Binding RemoveItem}" />
                <MenuItem x:Name ="header2" Header="Ändern" Command="{Binding ChangeItem}" IsEnabled="{Binding SelectedElementsCount,Converter={StaticResource BoolToOppositeBoolConverter}}" />
                <MenuItem x:Name ="header3" Header="Verschieben" Command="{Binding ChangeItem}" IsEnabled="{Binding SelectedElementsCount}" />
            </ContextMenu>
        </s:SciChartSurface.ContextMenu>

This still worked, but I have changed the AnnotationsCanvas from the Annotations to AboveChart and the Context Menu doesn’t show if I press the right mouse button:

<s:SciChartSurface.Annotations>

            <!-- Draws Bands behind each axis -->
            <s:BoxAnnotation YAxisId="Ch0" Style="{StaticResource BoxAnnotationStyle0}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch0}" Y2="{Binding VisibleRange.Max, ElementName=Ch0}" AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch1" Style="{StaticResource BoxAnnotationStyle1}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch1}" Y2="{Binding VisibleRange.Max, ElementName=Ch1}" AnnotationCanvas="AboveChart"   PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch2" Style="{StaticResource BoxAnnotationStyle0}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch2}" Y2="{Binding VisibleRange.Max, ElementName=Ch2}" AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch3" Style="{StaticResource BoxAnnotationStyle1}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch3}" Y2="{Binding VisibleRange.Max, ElementName=Ch3}" AnnotationCanvas="AboveChart" PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />

            <s:BoxAnnotation YAxisId="Ch1" Name="boxAnnotationCh1" Style="{StaticResource ScichartBoxAnnotationColor_Geometry}" BorderThickness="1" CornerRadius="0"
                             X1="{Binding Coord_CH1.X1,Mode=TwoWay}"  X2="{Binding Coord_CH1.X2,Mode=TwoWay}"  Y1="{Binding Coord_CH1.Y1,Mode=TwoWay}"  Y2="{Binding Coord_CH1.Y2,Mode=TwoWay}"
                             AnnotationCanvas="AboveChart"   PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch2" Name="boxAnnotationCh2"  Style="{StaticResource ScichartBoxAnnotationColor_Geometry}" BorderThickness="1" CornerRadius="3"
                             X1="{Binding Coord_CH2.X1}"  X2="{Binding Coord_CH2.X2}"  Y1="{Binding Coord_CH2.Y1}"  Y2="{Binding Coord_CH2.Y2}"
                             PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown"
                             AnnotationCanvas="AboveChart" />
            <s:BoxAnnotation YAxisId="Ch3" Name="boxAnnotationCh3"  Style="{StaticResource ScichartBoxAnnotationColor_Geometry}" BorderThickness="1" CornerRadius="3"
                             X1="{Binding Coord_CH3.X1}"  X2="{Binding Coord_CH3.X2}"  Y1="{Binding Coord_CH3.Y1}"  Y2="{Binding Coord_CH3.Y2}"
                             PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />

            <!-- Draws a Header line into each chart -->
            <s:TextAnnotation Text="{lex:Loc NominalGeometryInput:Resources:AxisDirection}" YAxisId="Ch1"  X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch1}" Y2="{Binding VisibleRange.Max, ElementName=Ch1}" Style="{StaticResource ScichartChartHeaderStyle}"  AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:TextAnnotation Text="{lex:Loc NominalGeometryInput:Resources:AxisSuperelevation}" YAxisId="Ch2"  X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch2}" Y2="{Binding VisibleRange.Max, ElementName=Ch2}" Style="{StaticResource ScichartChartHeaderStyle}"  AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:TextAnnotation Text="{lex:Loc NominalGeometryInput:Resources:AxisElevation}" YAxisId="Ch3"  X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch3}" Y2="{Binding VisibleRange.Max, ElementName=Ch3}" Style="{StaticResource ScichartChartHeaderStyle}"  AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
        </s:SciChartSurface.Annotations>
1 vote
13k views

I am adding charts with 10 million points.

With 40 million points the chart throws an OutOfMemoryException

In SciChart is there a limit on the number of points ? Or should I configure something?

  • I added 3 XyDataSeries<double, double> each with 10 million points. I get 7-8 FPS at the start, and 111-130 FPS when I zoom in.
  • I added 3 XyDataSeries<DateTime,Double> each with 10 million points: I get 2-3 FPS at the start, but when you zoom in the chart freezes.

Why such a difference if X data type is DateTime?

  • Nicholas asked 10 years ago
  • last active 10 years ago
0 votes
19k views

Hi,
I’ve created a custom annotation and have set it’s .IsEditable property in code so the user can reposition it. I have two issues:
1.I want the user to be able to resize the “PPZLine” in the X direction, but I can’t figure out how to get the anchor points to appear.

  1. I want to be able to see the chart data that the annotation is covering. I tried setting AnnotationCanvas = BelowChart, but then I couldn’t move the annotation or get any annotation mouse handlers to trigger.

Here’s the annoation’s xaml:

<s:CustomAnnotation x:Class="CinchV2DemoWPF.Views.SciChart.PPZView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:CinchV2="clr-namespace:Cinch;assembly=Cinch.WPF"
             xmlns:meffed="clr-namespace:MEFedMVVM.ViewModelLocator;assembly=MEFedMVVM.WPF"
             xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:s="clr-namespace:Abt.Controls.SciChart;assembly=Abt.Controls.SciChart.Wpf" 
             meffed:ViewModelLocator.ViewModel="PPZViewModel"

             X1="{Binding X1}"
             Y1="{Binding Y1}"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

    <!-- price line must use margin 0,0 or obj will not be visible-->
        <s:BoxAnnotation Name="LongEntryMarker" Grid.Row="0"
                       Width="20"    Height="10"  Background="DarkViolet" Margin="0,0"  VerticalAlignment="Top" 
                         HorizontalAlignment="Right"
                         >
        </s:BoxAnnotation>

        <!-- long marker line MouseRightButtonDown="LongEntryMarker_OnMouseRightButtonDown"-->
        <s:BoxAnnotation Name="PPZLine" Grid.Row="1"
                       Width="150"    Height="5"  Background="red" Margin="0,0"  VerticalAlignment="Top" 
                         >
        </s:BoxAnnotation>
</Grid>
</s:CustomAnnotation>
  • tecman234 asked 11 years ago
  • last active 9 years ago
0 votes
7k views

HI,
I’m new in scichart. I would like to ask you if it’s possible to build a graph with custom candles.
I want to build a footprint graph, something like this:

http://footprintchart.com/wp-content/uploads/2011/06/Shade_Dominant_Side.png

could you tell me if It’s possible to build this kind of graph and suggest me some links with documentation?

Thank you

  • lorenzo522 asked 8 years ago
  • last active 8 years ago
1 vote
9k views

Guys I m trying to minimize all child pane in multi-pane charts by default i am not able to do that please help me
i want same like in image attached below.
please reply as soon as possible.

0 votes
11k views

Hello!
Is there an easy way to change the Z-Order or drawing order of series?
For example, I want this cloud to be behind the candles:

0 votes
0 answers
9k views

We are pleased to announce SciChart v1.6.0 Build 2281 has been released. This is an important maintenance update which includes many fixes for bugs reported on our forums in February 2013 and March 2013.

As of today, you will be able to download v1.6.0.2281 on our Downloads page. If you are a source code customer you will receive an email with updated package detail shortly.

SciChart v1.6.0.2281 Release What’s New (10th Apr 2013)

Change Log

  • Added compilation output for x86, x64, AnyCPU for .NET4.0, 4.5 so you can now use SciChart in mixed managed/native applications without recompiling from source
  • Added SciChart DLLs now discoverable from Visual Studio Add-References Dialog without browsing to install directory
  • Added SciChartSurface RenderPriority.Manual option, where you can call SciChartSurface.InvalidateElement() manually to redraw after data-append
  • Added ZoomPanModifier.ZoomExtentsY property to enable/disable Y-Axis autorange when panning in X
  • Added ZoomExtentsModifier.XYDirection property
  • Added ClipMode.ClipAtMax for ZoomPanModifier to prevent panning past the end of the dataset
  • Added FastColumnRenderableSeries.UniformWidth property to assist with issue of column widths on variably spaced data
  • Added DataSeries.InsertRange() method
  • Added DataSeries.RemoveRange() method
  • Exposed SciChartOverview.BackgroundChartSurface property to access the inner SciChartSurface
  • Added Abt.Controls.SciChart.Wpf.dll and Abt.Controls.SciChart.SL.dll to the registry so it appears in Visual Studio Add References dialog
  • Fixed Numeric Precision issue where NumericAxis.VisibleRange was small, chart became blank (rendered no ticks)
  • Fixed FastBandRenderableSeries.IsDigitalLine band fill drawing anomaly
  • Added default Rollover Template for FastImpulseRenderableSeries
  • Fixed an issue databinding to DateTimeAxis.MinorDelta and MajorDelta
  • Fixed a Y=Const ZoomExtents issue
  • Fixed a ZoomExtents bug with DataSeries.RemoveAt()
  • Fixed AnnotationLabels don’t react on LabelPlacement changes
  • Fixed Call to Annotation.Hide() hides an annotaiton but labels become visible after invalidating
  • Fixed VerticalLineAnnotation LabelPlacement issues
  • Fixed discrepancy between Rollover Line Marker in Line & Scatter Chart
  • Fixed Surface parts Selection through Navigation Keys
  • Fixed incorrect XMinPositive value on DataSeries after append range of elements
  • Fixed a bug in ModifyAxisProperties example where calendar update resulted in a crash
  • Fixed a memory leak when adding/removing/re-adding annotations
  • Fixed a NullReferenceException when Y=Const and we use RubberBandXyZoomModifier
  • Fixed Designer showing Your Trial has Expired even if a valid key is present
0 votes
11k views

When chart title is longer than available space, title string is cut from both the sides. Is it possible to set it to left aligned and/or wrap when title is longer that available space?

Please check the attached image.

In Image “Mass Calibration Check…” is displayed as “ss Calibration check…”

1 vote
6k views

I am trying to implement a peak detection functionality in wpf. I have a DateTime axis as X and double as Y. When I add the second series (containing the peaks) to the chart it renders the points by their index, not by their date. (picture second chart red dots)

Is there any way I can plot two series with different sampling in a way that the sample points are aligned according to their dateTime values?

I attached some of my codes below.

3 votes
16k views

I was trying to figure out why I couldn’t get minor tick marks to appear on my axes and then I realized it’s because of the theme I was using (BrightSpark). Just a heads up to anyone else who may run into this.

IMO themes should not hide chart features such as tick marks.

0 votes
9k views

When I move my RolloverMarker near to the left or right side of the chart then RolloverAxisLabel go out from the screen. Is any way to fix it?

0 votes
9k views

Hi there,

we’re using SciChart with up to 4 y-axes per chart.

The y-axes take up quite a bit of horizontal space so we were wondering if there was any way to reduce the amount of space taken by e.g. displaying two axes on one vertical line.

What we mean is that axis A will have its tickmarks and numbers on the left side of the vertical line and axis B will have its tickmarks and numbers on the right side of the line.

Is such a thing possible at all with the current version of SciChart or do you have any other idea how one could reduce the amount of horizontal space taken up by the y-axes?

Best regards,
Joerg

1 vote
13k views

I am trying to change the background color to match the background of the SciChartSurface but it just doesn’t want to change colors. I have a property bound to enable and disable the legend and that works fine. I tried doing the same for the “Background” property for SciChartLegend but nothing works. Even hard coding a brush doesn’t work. What am I missing?

I am using SciChart v3.42.0.6778

SciChartSurface instantiation in XAML. I am using the BrightSpark default theme.

<s:SciChartSurface Name="SciChartSurface"
Grid.Row="0"
Background="{Binding BackgroundColor, Converter={StaticResource ColorToSolidColorBrushConverter}}"
ChartTitle="{Binding GraphTitle}"
SeriesSource="{Binding GraphRenderModels}"
s:ThemeManager.Theme="BrightSpark">

Modifiers

<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
    <s:RubberBandXyZoomModifier IsAnimated="True"
                                IsEnabled="True"
                                IsXAxisOnly="False"
                                RubberBandFill="#99AAAAAA"
                                ZoomExtentsY="False" />
    <s:ZoomPanModifier ExecuteOn="MouseMiddleButton" IsEnabled="True" />
    <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"
                           IsEnabled="True"
                           XyDirection="XDirection" />
    <s:MouseWheelZoomModifier IsEnabled="True" XyDirection="YDirection" />
    <s:YAxisDragModifier AxisId="LeftAxis" />
    <s:YAxisDragModifier AxisId="RightAxis" />
    <s:XAxisDragModifier ClipModeX="None" />
    <s:CursorModifier Name="CursorModifier" IsEnabled="{Binding ShowCursors, Mode=TwoWay}">
        <s:CursorModifier.LineOverlayStyle>
            <Style TargetType="Line">
                <Setter Property="Stroke" Value="LightGray" />
            </Style>
        </s:CursorModifier.LineOverlayStyle>
    </s:CursorModifier>
    <s:LegendModifier Margin="6"
                      GetLegendDataFor="AllSeries"
                      LegendPlacement="Inside"
                      Orientation="Horizontal"
                      ShowLegend="{Binding ShowLegend}"
                      ShowVisibilityCheckboxes="False" />
</s:ModifierGroup>

</s:SciChartSurface.ChartModifier>

When I attempt to change the background, I use the following:

<s:LegendModifier Margin="6"
GetLegendDataFor="AllSeries"
LegendPlacement="Inside"
Orientation="Horizontal"
    Background="{Binding BackgroundColor, Converter={StaticResource ColorToSolidColorBrushConverter}}"
ShowLegend="{Binding ShowLegend}"
ShowVisibilityCheckboxes="False" />

Which doesn’t work, though other color bindings in XAML work fine. If I change the color directly, say Background=”Red” or Background=”#FF0000″ It does not change either.

  • Alex Helms asked 9 years ago
  • last active 9 years ago
1 vote
15k views

Depending on the Size of my control which has the scichart on it, I want to change the FontSize of the Axis-Tick-Labels.

In XAML I defined a style

 <Style x:Key="XAxisLabelStyle" TargetType="s:DefaultTickLabel">
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="FontSize" Value="{Binding AxisFontSize}"/>
        <!-- Align labels to the left side by using the AnchorPoint (docking point) on the right -->
        <Setter Property="HorizontalAnchorPoint" Value="Left"/>
 </Style>

and use it for the chart axis:

<s:SciChartSurface.XAxis>
            <s:NumericAxis Name="XAxis" AxisTitle="m/z" TitleStyle="{StaticResource AxisLabelStyle}" TickLabelStyle="{StaticResource XAxisLabelStyle}">
                <s:NumericAxis.VisibleRange>
                    <s:DoubleRange Min="0" Max="20000" />
                </s:NumericAxis.VisibleRange>
            </s:NumericAxis>
 </s:SciChartSurface.XAxis>

I have a binding to a property (AxisFontSize) which I can set from outside the control. For the axis label it works fine. But the TickLabels don’t change the FontSize. What have I to do?

3 votes
27k views

Hey guys,

I’m looking at changing the Numeric Axes on the Right and Left axes of my Chart, to right-align the Text within the Axis Labels.

I noticed this topic where Yuriy hinted that in 2.0 this would be a supported feature, but can’t seem to see what it would be:
http://http://www.scichart.com/questions/question/x-and-y-axis-formatting/
The “work around” featured in that topic doens’t seem to change anything in my situation.

I have tried setting FlowDirection to “RightToLeft”, which does the job, but has some ugly placement side-effects.

Is there something I’ve overlooked?

Thanks,
Miles

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

Hi,
How can i have axis labels and annotations to be shown on the chart all the time, even if there is no datapoint on the chart?

1 vote
0 answers
10k views

Hi,

I made a chart with paired vertical axes showing 2 pairs of signals in parallel (see the first screenshot). I used an approach similar to the ‘vertically stacked axes’ example in the demo gallery. Then, I added two horizontal line annotations and assigned them to the different Y-axis via the YAxisId property. The first annotation at the top part is shown properly and can be dragged. The second annotation (with identical properties, save for the YAxisId) is shown in the correct Y position, but its label is missed and the line can not be dragged. Actually, the label is present too, but far below, with the offset equal to the half of the chart (see the second screenshot).

Is it a bug, or I miss some setting that can fix this problem? I use the version 3.1.0.4759.

Thank you in advance!
Ilia

  • corvex asked 9 years ago
  • last active 9 years ago
0 votes
0 answers
0 views
1 vote
10k views

Firstly we have an issue at the moment using the high speed renderer. We have a window containing a tab control with several tabs. One of the tabs has several charts and the other tabs contain grid controls with 100’s to 1000’s of rows. The issue seems to be when re-sizing the window with the chart tab visible.
The charts hang on redrawing. When the tabs with grids are selected re-sizing is normal and fast. Only when switching to the tab with charts does it hang.

It also seems that separate charts in different windows also become affected when re-sizing them too. Seems they all share the same renderer instance?

I’ve profiled the re-sizing in visual studio and attached a screenshot of the method calls. Seems a lot of time is taken in RenderSurfaceSizeChanged and it’s children

When I don’t populate the grids, the re-sizing is better but there is still a bit of a hang.
Here is the xaml I’m using for each chart control

   <s:SciChartSurface x:Name="Chart"
                           ChartTitle="{Binding ChartTitle}" 
                           FontSize="14"
                           FontWeight="Bold"
                           RenderPriority="Normal"
                           Background="WhiteSmoke"

                           s:ThemeManager.Theme="ExpressionDark">

            <s:SciChartSurface.RenderableSeries>
                <s:FastColumnRenderableSeries x:Name="ChartDataSeries" 
                                             >
                </s:FastColumnRenderableSeries>
            </s:SciChartSurface.RenderableSeries>
            <s:SciChartSurface.XAxis>
                <s:CategoryDateTimeAxis Style="{StaticResource AxisStyle}" DrawMinorTicks="False" DrawMajorTicks="False" DrawMinorGridLines="False"></s:CategoryDateTimeAxis>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis Style="{StaticResource AxisStyle}" LabelProvider="{StaticResource QuantityLabelProvider}"  DrawMinorGridLines="False" DrawMajorTicks="False" DrawMinorTicks="False"  />
            </s:SciChartSurface.YAxis>
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RolloverModifier ReceiveHandledEvents="True"/>
                    <s:CursorModifier ReceiveHandledEvents="True" ShowAxisLabels="False" ShowTooltip="False" />
                    <s:RubberBandXyZoomModifier ReceiveHandledEvents="True" IsEnabled="True" ExecuteOn="MouseLeftButton" IsXAxisOnly="True"/>
                    <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
                    <s:ZoomPanModifier ReceiveHandledEvents="True" x:Name="ZoomPanModifier" IsEnabled="True" ExecuteOn="MouseMiddleButton"/>
                    <s:MouseWheelZoomModifier ReceiveHandledEvents="True" ActionType="Zoom" XyDirection="XYDirection"></s:MouseWheelZoomModifier>
                    <s:YAxisDragModifier IsEnabled="True" />
                    <s:XAxisDragModifier IsEnabled="True" />
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
        </s:SciChartSurface>

We tried using the DX10 surface and this fixed the issue above, but it seems it’s not working for at least candlestick charts and column charts – the very charts we need. This can be seen by using the wpf samples.

Update:

After more time profiling the application, I think I’ve found the issue. My app loads in about 1-2gb of data into memory, deserializing into a collection. Normally not a problem but when resizing the chart the app hangs for several seconds. It seems the charts create a WritableBitmap which in turn calls MS.Internal.MemoryPressure.ProcessAdd().
Here it forces a garbage collection, and given I have several gigabytes it takes too long.
This connect bug outlines the issue with a possible workaround https://connect.microsoft.com/VisualStudio/feedback/details/687605/gc-is-forced-when-working-with-small-writeablebitmap

Trouble is I don’t have the chart source to implement this.
I’ve attache a screenshot of the call tree in my profiling, highlighting the MemoryPressure.ProcessAdd() call. Here it take 7 seconds to complete.

  • J Jakupi asked 10 years ago
  • last active 10 years ago
0 votes
10k views

Hi,

I’m in the process of evaluating SciChart and had a couple of questions. I’m using SciChart to display realtime OHLC values for a trading application. I’m using the CategoryDateTimeAxis for the X Axis.

My questions are
1. The XAxisDragModifier doesn’t seem to work with the CategoryDateTimeAxis. It does seem to work with the DateTime Axis. Is there something different I need to do for it work with the CategoryDateTimeAxis ?

  1. Is it possible to anchor a newly added point to the same area of the chart ie..the chart would scroll to the left after each data point is added so that the new data point is still located in the same area of the screen.

Please let me know.
Thanks,
Deepak

  • deepakb1 asked 11 years ago
  • last active 4 months ago
0 votes
0 answers
6k views

Hi,

I like to display a chart with time series values in Y (Pa) and distance series in X (mm). The Y values comes from a microphone and the X values comes from a hall sensor counter module. Both signals has the same samlesrate. Normaly you display the time in X with delta t. But in this use case I like to use the distance series in X.
The problem is I guess that the distance series looks like this [0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,…]. If we use delta t to calculate the X values than the values looks like this [0,0.1,0.2,0.3,0.4,0.5,0.6,…]

If I display the microphone data as time series it looks like:
See SciChart2.png

If I display the hall sensor counter data as time signal it looks like:
See SciChart3.png

I like to display the sinus values form the microphone in Y but the hall sensor counter data in X as distance. But the sinus is damaged:
See SchiChart1.png

Is there any option to display the real Y values (the sinus)? Or should I change the X data to a evenly rising signal, or what?

regards,
Tobias Goll

0 votes
10k views

Hi,

Was hoping you could point me in the right direction. I’m trying to create horizontal line annotations on demand using MVVM but have become stuck. I’ve have them working in MVVM when the chart loads but not when a button is clicked although I have achieved this using code behind.

I’ve tried using an observable collection of AnnotationCollection type but am struggling to add the horizontal lines annotations to it as they are of a different type.

Any pointers in the right direction would be much appreciated!

Thanks,
Tim

Example of MVVM

TradeAnnotations = CreateHorizontalAnnotations();

private AnnotationCollection _annotations;

    public AnnotationCollection TradeAnnotations
    {
        get { return _annotations; }
        set
        {
            _annotations = value;
            OnPropertyChanged("TradeAnnotations");
        }
    }

    private static AnnotationCollection CreateHorizontalAnnotations()
    {
        //var annotations = new AnnotationCollection();

        var annotations = new AnnotationCollection();

        Color strokeColor = (Color)ColorConverter.ConvertFromString("#008B45");
        Brush strokeBrush = new SolidColorBrush(strokeColor);

        HorizontalLineAnnotation annotation = new HorizontalLineAnnotation();

        annotation.ShowLabel = true;
        annotation.LabelPlacement = LabelPlacement.Axis;
        annotation.HorizontalAlignment = HorizontalAlignment.Stretch;
        annotation.IsEditable = true;
        annotation.SnapsToDevicePixels = true;
        annotation.Stroke = strokeBrush;

        annotation.X1 = DateTime.Now;
        annotation.Y1 = 129;

        annotations.Add(annotation);

        return annotations;          
    }

Example of code behind

        private void CreateHorizontalAnnotations(object sender, System.Windows.RoutedEventArgs e)
    {
        //var annotations = new AnnotationCollection();

        var annotationCollection = new AnnotationCollection();

        Color strokeColor = (Color)ColorConverter.ConvertFromString("#008B45");
        Brush strokeBrush = new SolidColorBrush(strokeColor);

        HorizontalLineAnnotation annotation = new HorizontalLineAnnotation();

        annotation.ShowLabel = true;
        annotation.LabelPlacement = LabelPlacement.Axis;
        annotation.HorizontalAlignment = HorizontalAlignment.Stretch;
        annotation.IsEditable = true;
        annotation.SnapsToDevicePixels = true;
        annotation.Stroke = strokeBrush;

        annotation.X1 = DateTime.Now;
        annotation.Y1 = 129;

        this.priceChart.Annotations.Add(annotation);
    }
0 votes
0 answers
9k views

hi i m new to scichart . I just want to know how to bind sci line chart series x and y if i have a dataset of table named customer and i want to bind data series x and y to this table colomns..

plz heplp me out asap
thanks
swati

3 votes
0 answers
12k views

Zoom History

Ok, so as I had not had a reply,I have managed to slog this out and I have created a customRubberBandXyZoomModifier.

In this I keep a copy of all the VisibleRanges on the mouse down and on the mouse up ( if it was dragging) I copy these ranges into a list of ranges in my ViewModel (parent) see below.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Abt.Controls.SciChart;
using AVR_HMI.ViewModels;

namespace AVR_HMI.Charting
{
    public class customRubberBandXyZoomModifier : RubberBandXyZoomModifier
    {
        AnalogueChartViewModel _parent;

        IRange _tempOldXRange;

        List<IRange> _tempOldYRange = new List<IRange>();

        public customRubberBandXyZoomModifier(AnalogueChartViewModel parent)
        {
            _parent = parent;
        }

        public override void OnModifierMouseDown(ModifierMouseArgs e)
        {
            _tempOldXRange = XAxis.VisibleRange;

            _tempOldYRange.Clear();
            foreach (NumericAxis na in YAxes)
            {
                _tempOldYRange.Add(na.VisibleRange);
            }
            base.OnModifierMouseDown(e);
        }


        public override void OnModifierMouseUp(ModifierMouseArgs e)
        {
            if (IsDragging)
            {
                if (_tempOldXRange != null)
                {
                    _parent.OldXRange = _tempOldXRange;
                    _parent.XRangeHistory.Add(_tempOldXRange);
                    _tempOldXRange = null;
                }

                if (_tempOldYRange.Count != 0)
                {
                    int n = 0;
                    foreach (IRange ra in _tempOldYRange)
                    {
                        if (_parent.YRangeHistories[n] != null)
                        {
                            _parent.YRangeHistories[n].RangeHistory.Add(_tempOldYRange[n]);
                        }
                        else
                        {
                            break;
                        }
                        n++;
                    }
                }
                _parent.ZoomBack.RaiseCanExecuteChanged();
                _parent.AutoRangeEnable = false;
            }
            base.OnModifierMouseUp(e);
        }
    }
}

Then in the view model, I have an unzoom button which takes the last set of Ranges off the list and restores these ranges as below

       List<IRange> _xRangeHistory = new List<IRange>();

        public List<IRange> XRangeHistory
        {
            get { return _xRangeHistory; }
            set { _xRangeHistory = value; }
        }

        List<YRangeHistory> _yRangeHistories = new List<YRangeHistory>();

        public List<YRangeHistory> YRangeHistories
        {
            get { return _yRangeHistories; }
            set { _yRangeHistories = value; }
        }


        DelegateCommand _zoomBack;
        public DelegateCommand ZoomBack
        {
            get
            {
                if (_zoomBack == null)
                {
                    _zoomBack = new DelegateCommand(
                        this.OnZoomBackCommandExecute,
                        this.OnZoomBackChangedCommandCanExecute);
                }

                return _zoomBack;
            }
        }

        private bool OnZoomBackChangedCommandCanExecute(object obj)
        {
            if (YRangeHistories.Count == 0 || YRangeHistories[0].RangeHistory.Count == 0)
            {
               return false;
            }
            return true;
        }

        private void OnZoomBackCommandExecute(object obj)
        {
            if (XRangeHistory.Count != 0)
            {
                XAxis.VisibleRange = XRangeHistory[XRangeHistory.Count-1];
                XRangeHistory.Remove(XAxis.VisibleRange);
            }

            if (YRangeHistories.Count != 0)
            {
                int n=0;
                foreach (NumericAxis na in YAxes)
                {
                    int offset =  YRangeHistories[n].RangeHistory.Count;
                    if(offset > 0)
                    {
                        na.VisibleRange = YRangeHistories[n].RangeHistory[offset - 1];
                        YRangeHistories[n].RangeHistory.Remove(na.VisibleRange);
                    }
                    n++;
                }
 
            }
            if (YRangeHistories.Count == 0 || YRangeHistories[0].RangeHistory.Count == 0)
            {
                AutoRangeEnable = true;
            }
            ZoomBack.RaiseCanExecuteChanged();

            VPManager.InvalidateParentSurface(RangeMode.None);
        }

On adding a new YAxis, I add a new YRangeHistory


                       YAxes.Add(numericAxis);
                       YRangeHistories.Add(new YRangeHistory());

YRangeHistory Class


using System.Collections.Generic;
using System.Linq;
using System.Text;
using Abt.Controls.SciChart;

namespace AVR_HMI.Charting
{
    public class YRangeHistory
    {
        List<IRange> _RangeHistory;

        public List<IRange> RangeHistory
        {
            get { return _RangeHistory; }
            set { _RangeHistory = value; }
        }

        public YRangeHistory()
        {
             _RangeHistory = new List<IRange>();
        }
    }
}

Hope this helps others, and if there is a better/easier way of doing this, please get back to me, I know I am on the demo version of SciChart at the moment, but we are intending to buy it and I worry about the lack of good documentation/support. I don't want to start looking elsewhere.

  • wilx asked 11 years ago
0 votes
10k views

Hi,

is it possible to keep the Y axis unchanged with ZoomPanModifier (XyDirection=”XDirection”) and ZoomExtentsModifier?

The RubberBandXyZoomModifier allows this by setting ZoomExtentsY to “False”, but i don’t know how to do this for ZoomPanModifier and ZoomExtentsModifier.

Thanks,
Robin

0 votes
7k views

I am trying to use SciChartGroupPane and ChildPanes for my application, and
want to collapse a pane , so that the remaining space is filled with the remaining graphs.

I tried binding the Visibility property to the charts itemcontainer style, but it only partially helped.
I got all the panes collapsing except for the first one. I attached a sample project, where I try to collapse all panes but the last one.

I asked the question here
https://www.scichart.com/questions/question/collapse-pane-in-grouppane-charts
but got no answer since then. The project could probably not be uploaded beacuse of the size.
I uploaded it here:
https://drive.google.com/file/d/0B19IHNOVxrKCYlUzQjRnOF9ZRnc/view?usp=sharing

Is this behaviour normal? Is it a bug? Please help.

Kristóf

0 votes
10k views

Hi there,

I created a simple map application. The map itself is displayed as a custom annotation (image) below the chart. The problem is, I can’t zoom into the custom annotation (map). The map will keep it’s original dimensions when zoomed. Is there a way to zoom in/out a custom annotation?

Tim

  • Tim asked 9 years ago
  • last active 9 years ago
0 votes
11k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • dwaldo asked 12 years ago
  • last active 2 years ago
1 vote
8k views
<s:SciChartGroup Grid.Row="1" Name="charts" 
                     ItemsSource="{Binding ChartPaneViewModels}" 
                     s:ThemeManager.Theme="{Binding ElementName=ThemeCombo, Path=SelectedItem}"
                     ItemContainerStyle="{StaticResource ChartPaneStyle}">
        <s:SciChartGroup.ItemTemplate>
            <DataTemplate x:Name="template">
                <s:SciStockChart Padding="0" 
                                 BorderThickness="0,0,1,1" *** Annotations="{Binding TradeAnnotations}"<--How to binding this to first chart? ***
                                 IsXAxisVisible="{Binding IsFirstChartPane}" 
                                 IsPanEnabled="{Binding ParentViewModel.IsPanEnabled}"
                                 IsRubberBandZoomEnabled="{Binding ParentViewModel.IsZoomEnabled}" 
                                 VerticalChartGroupId="{Binding ParentViewModel.VerticalChartGroupId}"    
                                 ViewportManager="{Binding ParentViewModel.ViewportManager}" IsRolloverEnabled="True" 
                                 SeriesSource="{Binding ChartSeriesViewModels}">
                    <s:SciStockChart.XAxis>
                        <s:CategoryDateTimeAxis Name="xAxis" 
                                                TextFormatting="MM-dd HH:mm:ss" 
                                                VisibleRange="{Binding ParentViewModel.XVisibleRange, Mode=TwoWay}"
                                                DrawMajorBands="False"
                                                DrawMinorGridLines="True"
                                                GrowBy="0,0.05"/>
                    </s:SciStockChart.XAxis>
                    <s:SciStockChart.XAxisStyle>
                        <Style TargetType="s:CategoryDateTimeAxis">
                            <Setter Property="DrawMajorBands" Value="True"/>
                            <Setter Property="DrawMinorGridLines" Value="False"/>
                            <Setter Property="VisibleRange" Value="{Binding ParentViewModel.XVisibleRange, Mode=TwoWay}"/>
                            <Setter Property="GrowBy" Value="0, 0.05"/>
                        </Style>
                    </s:SciStockChart.XAxisStyle>
                    <s:SciStockChart.YAxes>
                        <s:NumericAxis AutoRange="Always"
                            Id="Y2"/>
                    </s:SciStockChart.YAxes>
                    <s:SciStockChart.YAxisStyle>
                        <Style TargetType="s:NumericAxis">
                            <Setter Property="AutoRange" Value="Always"></Setter>
                            <Setter Property="TextFormatting" Value="{Binding YAxisTextFormatting}"/>
                            <Setter Property="MinorsPerMajor" Value="{Binding IsFirstChartPane, Converter={StaticResource MinorsPerMajorConverter}}"/>
                            <Setter Property="MaxAutoTicks" Value="{Binding IsFirstChartPane, Converter={StaticResource MaxAutoTicksConverter}}"/>
                            <Setter Property="GrowBy" Value="{Binding IsFirstChartPane, Converter={StaticResource GrowByConverter}}"/>
                        </Style>
                    </s:SciStockChart.YAxisStyle>
                </s:SciStockChart>
            </DataTemplate>
        </s:SciChartGroup.ItemTemplate>
    </s:SciChartGroup>
  • Hwa Fun asked 9 years ago
  • last active 9 years ago
0 votes
10k views

I only want to move the RolloverModifier if the left mouse button is pressed and with Left and Right Keys?

0 votes
12k views

Hi!
I’ve recently updated to version 2 and I’m trying to sync a rollover modifier between multiple graphs.
I’m aware of the SciTrader demo, but I think that my situation is a bit different. My graphs are created dynamically by the user (imagine a “New Graph” button). That means that they are instantiated in code behind. So far only Graph B is in sync with graph A (not vis versa). However there seem to be an issue. In my use case, Graph A and Graph B can be of different width. The Rollover modifier seems to not scale properly (see attached screenshot). It seems to be dependent on the size of Graph A instead of the position in the series.

Is this a bug or am I doing something wrong?

Thank you!

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

Does scichart support smith charts? If not, it is possible to build a smith chart based on polar chart?

Thanks!
Manuel

3 votes
16k views

Request for enhancement to polar charts to allow for rotation of the X axis. I want to use this chart type with compass directions. Therefore a range of 0-360 with 0 at the top of the chart.

I was able to use the workaround for rotation here:
https://www.scichart.com/questions/question/polar-chart-x-axis-starting-point-and-direction

However as the OP on that question noted there are several drawbacks to simply rotating the entire chart surface.
Also I found that at run-time rotating the chart surface is inaccurate as in this example:

Polar chart example

As you can see the 100 degree mark is not in the correct location. Directly right should be 90.

In the designer the chart axis looks as it should:

enter image description here

  • wawr asked 9 years ago
  • last active 5 years ago
1 vote
9k views

I have a 1000 point array , however when displaying i see steppy waveform. I would have expected the waveforms to display smoothly.. as there are a lot of data points.. but looks like there is some aliasing happening.. played with the aliasing feature and that did not affect the results.

Is there a way scichart draws a line between two points instead of a sample and hold between the points it does not have values for ?

Played wit resamplingmode as well but couldn’t get ti right.

0 votes
8k views

I am using the FastBoxPlotRenderableSeries that is new in 2.0 and I have been able to get a basic box / whisker chart working.

Are there any additional ways to customize this type of chart beyond setting the .SeriesColor and .BodyBrush properties that I see in the demo code?

Specifically, I have 40 datapoints along the X-Axis, and even though the chart spans my screen, the width of each box-portion is still thin. This makes it hard to see the median-marker-line or any type of gradient brush I might want to apply to the box portions of the box/whisker. There is plenty of room in my chart to widen those boxes without intruding into the other X-Axis datapoints, I just don’t know how.

Thanks.

0 votes
0 answers
10k views

Hi,

Is there any way to get the corresponding color value of Array2D from Heatmap2DArrayDataSeries? I try to create a histogram based on Heatmap.

Thanks,
Mark

1 vote
8k views

Hi,
Just wanted to know how to implement 3D graphics and charts in the Sci chart if possible.

1 vote
10k views

Hi,

I have problem with MouseLeftButtonUp event fire on SciChartSurface. MouseLeftButtonUp event only fire on double click, not on single click. I saw this behavior perfectly working in hit data test demo.

Can someone guide me what I am doing wrong with my code. I have attached my sample code for your reference.

I have added

  <SciChart:SciChartSurface Name="ColumnChart" SeriesSource="{Binding GroupSeries}"
                                          MouseLeftButtonUp="ColumnChart_MouseLeftButtonUp">

Please put a break point “ColumnChart_MouseLeftButtonUp” event on code behind and run the sample. I expect Mouse Left button up on SciChartSurface should fire this event,however event will be fired only on double click.

Let me know if you need anymore details.

Thanks.

0 votes
15k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support-dev.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

1 vote
13k views

Does SciChart support null values in series data?

I want to do something like:

var dataSet = new DataSeriesSet<DateTime, double?>();
var dataSeries = dataSet.AddSeries<OhlcDataSeries<DateTime, double?>>

More specifically, sometimes I want to ignore values, and sometimes the data itself is missing.

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

Hi!

It does compile, and run as expected, still I get the following error in xaml code.
When I delete the Vertical slice modifier the error disappears.

Have you got any idea what is causing this?

Kristóf

0 votes
0 answers
11k views

I took a look at the following example :

http://support.scichart.com/index.php?/Knowledgebase/Article/View/17244/39/tutorial—custom-legend-with-color-picker-and-custom-point-markers

and

http://support.scichart.com/index.php?/Knowledgebase/Article/View/17183/28/pointmarker-color-bindings


I noticed that I can change the stroke thickness and color of the line of the renderable series but not those of the pointmarkers . How can I achieve this in this specific example?

I need a style or templated solution because I have multiple renderable series on several charts on separate panes.

I tried the following but even setting the fill/stroke to specific values within a style-template does not work :

<Style TargetType="{x:Type s:BaseRenderableSeries}">
        <Setter Property="PointMarkerTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <s:EllipsePointMarker Fill="white" Stroke="white" Width="5" Height="5"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

When I create a FastLineRenderableSeries without PointMarkers then only a line is shown on the chart without point markers despite the style in my UserForm.Resources. Anything I am doing wrong?

P.S.: I should have mentioned that I add RenderableSeries via ViewModel and add to ChartSeriesViewModel. But whether the RenderableSeries is created in the viewmodel and not in xaml should not make a difference right?

Thanks

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

Hi,

I’m using SciChartGroup with SciChartSurface to create a chart with multiple panes, each pane has a set of cursors including the CursorModifier with ShowAxisLabels=”True”. When mouse is over the panel where no any series I get an error:

Object reference not set to an instance of an object.

at Abt.Controls.SciChart.Visuals.Axes.TradeChartAxisLabelFormatter.c94f1c4a8b3176ab34988be02ae5c9853(IComparable cd9eb4abc8062a13034d7e1a95015cf34, Boolean c202464bb46bef74e568ab9e85eabcfae)
at Abt.Controls.SciChart.Visuals.Axes.TradeChartAxisLabelFormatter.FormatLabel(IComparable dataValue)
at Abt.Controls.SciChart.Visuals.Axes.AxisBase.FormatText(IComparable value, String format)
at Abt.Controls.SciChart.Visuals.Axes.AxisBase.HitTest(Point atPoint)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase.HitTestAxis(IAxis axis, Point atPoint)
at Abt.Controls.SciChart.ChartModifiers.CursorModifier.c987c837b119aed1f35c1f0ac2cd58b4b.cf244cc494090613db790079d45f87bd9(IAxis c9602bd29fd5d7a98bc0428c28ceb8250)
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable
1 source)
at Abt.Controls.SciChart.ChartModifiers.CursorModifier.GetAxesData(Point mousePoint)
at Abt.Controls.SciChart.ChartModifiers.CursorModifier.HandleMasterMouseMove(Point mousePoint)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase.cf02abbb1e36d2956f3f92f4d796607cf(Point cfe7da3d2fb2c1ba75ba1814199d02354)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase.HandleMouseEvent(Point mousePoint, Boolean isMaster)
at Abt.Controls.SciChart.ChartModifiers.InspectSeriesModifierBase.OnModifierMouseMove(ModifierMouseArgs e)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.c07d1dcb1c7ba461bbcbf5a1dd47c58a5(IChartModifier c6b1effd112e5355cd5f051dd91cd4f67, ModifierMouseArgs cbb39038dde40bfc3fdcfa70f4bbf8778)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.c9e8960a6a8527c20ac9e46e162c72b22(Action2 c4bd4ab823835cf92d221476b6fb65a17, ModifierMouseArgs c4c23d80d4d060e409c3479ef17d6c65e)
at Abt.Controls.SciChart.ChartModifiers.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.c19dd4d74f6373c95c517d29624d76e4b.cacf72b657252e3e73860afb89d70cb9f[c13c28af86f0b14202b9c7ef43b1bd11a](IEnumerable
1 c40a30a1bb6416cd164565919fdef15a9, Action`1 c885aac61bc9832561b7ff07903c88d5e)
at Abt.Controls.SciChart.Utility.Mouse.MouseManager.cf88844ca415efe316ebbc6460c4d5477.c6b7aec04ebfc28e092adf0e569761d15(Object cae49ecc8585f35e8dd5ce624f7fb7ab5, MouseEventArgs c4c23d80d4d060e409c3479ef17d6c65e)
at A.cd43732d305fa7b65b611005fdcef35d8.c769264f2530d8b47196e47cbbe58cb89(MouseEventArgs cbb39038dde40bfc3fdcfa70f4bbf8778)
at A.cd43732d305fa7b65b611005fdcef35d8.cbe8969038b3b47585f72b9c703cd47da(Object c5e18ac7ef25e3e9c51dc36756b25ed1e, MouseEventArgs c4c23d80d4d060e409c3479ef17d6c65e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.Input.InputManager.ProcessStagingArea()
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.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at SciTest.App.Main() in d:\Projects\Test\SciChart\SciTest – копия\SciTest\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
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()

I attached a sample project.

0 votes
11k views

Hello

Im doing mutual crosshair, like this

static class ModifierFactory
{
    public static ModifierGroup Crosshair () 
    {
        SeriesSelectionModifier SelSerMod = new SeriesSelectionModifier() { SelectedSeriesStyle = new Style(typeof(BaseRenderableSeries)) { }, ExecuteOn = ExecuteOn.MouseRightButton };
        LegendModifier LegendModifier = new LegendModifier() { GetLegendDataFor = GetLegendDataFor.SelectedSeries, };

        MouseWheelZoomModifier MouseWheelZoomModifier = new MouseWheelZoomModifier() { ReceiveHandledEvents = true };
        ZoomPanModifier ZoomPanModifier = new ZoomPanModifier() { ReceiveHandledEvents = true };
        ZoomExtentsModifier ZoomExtensModifier = new ZoomExtentsModifier() { ReceiveHandledEvents = true, ExecuteOn = ExecuteOn.MouseDoubleClick };
        CursorModifier CursorModifier = new CursorModifier() { ReceiveHandledEvents = true };
        RolloverModifier RolloverModifier = new RolloverModifier() { ReceiveHandledEvents = true };

        return  new ModifierGroup(CursorModifier, MouseWheelZoomModifier, ZoomPanModifier, ZoomExtensModifier) {  MouseEventGroup = &quot;MyGroup&quot; };
    }

    public static ModifierGroup Rollover ()
    {
        SeriesSelectionModifier SelSerMod = new SeriesSelectionModifier() { SelectedSeriesStyle = new Style(typeof(BaseRenderableSeries)) { }, ExecuteOn = ExecuteOn.MouseRightButton };
        LegendModifier LegendModifier = new LegendModifier() { GetLegendDataFor = GetLegendDataFor.SelectedSeries, };

        MouseWheelZoomModifier MouseWheelZoomModifier = new MouseWheelZoomModifier() { ReceiveHandledEvents = true };
        ZoomPanModifier ZoomPanModifier = new ZoomPanModifier() { ReceiveHandledEvents = true };
        ZoomExtentsModifier ZoomExtensModifier = new ZoomExtentsModifier() { ReceiveHandledEvents = true, ExecuteOn = ExecuteOn.MouseDoubleClick };
        CursorModifier CursorModifier = new CursorModifier() { ReceiveHandledEvents = true };
        RolloverModifier RolloverModifier = new RolloverModifier() { ReceiveHandledEvents = true };

        return new ModifierGroup(RolloverModifier, ZoomPanModifier, MouseWheelZoomModifier, ZoomExtensModifier) { MouseEventGroup = &quot;MyGroup&quot; };
    }

    public static ModifierGroup SimpleModifier() 
    {
        SeriesSelectionModifier SelSerMod = new SeriesSelectionModifier() { SelectedSeriesStyle = new Style(typeof(BaseRenderableSeries)) { }, ExecuteOn = ExecuteOn.MouseRightButton };
        LegendModifier LegendModifier = new LegendModifier() { GetLegendDataFor = GetLegendDataFor.SelectedSeries, };

        MouseWheelZoomModifier MouseWheelZoomModifier = new MouseWheelZoomModifier() { ReceiveHandledEvents = true };
        ZoomPanModifier ZoomPanModifier = new ZoomPanModifier() { ReceiveHandledEvents = true };
        ZoomExtentsModifier ZoomExtensModifier = new ZoomExtentsModifier() { ReceiveHandledEvents = true, ExecuteOn = ExecuteOn.MouseDoubleClick };
        CursorModifier CursorModifier = new CursorModifier() { ReceiveHandledEvents = true };
        RolloverModifier RolloverModifier = new RolloverModifier() { ReceiveHandledEvents = true };

        return new ModifierGroup(ZoomPanModifier, MouseWheelZoomModifier, ZoomExtensModifier) { MouseEventGroup = &quot;MyGroup&quot; }; 
    }
}



SciChartSurface FirstChart;
SciChartSurface SecondChart;
...
...
FirstChart.ChartModifier = ModifierFactory.Crosshair ();
SecondChart.ChartModifier = ModifierFactory.Crosshair ();

But it is not mutual, every chart get single crosshair
Mb its because i got winForms project, which load wpf dll and open a wpf window ?

  • VRueda asked 11 years ago
  • last active 10 years ago
2 votes
14k views

Hi

Has anyone implemented or has any thoughts on how to implement keyboard shortcuts to zoom and pan? Something like key up/down/right/left to pan and shift+up/down/right/left to zoom?

Showing 1 - 50 of 4k results

Try SciChart Today

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

Start TrialCase Studies