SciChartĀ® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

1 vote
26 views

I managed to spearate the legend from the SciChartSurface, however the way I did it is very hackish. I couldn’t find any documentation on how it is supposed to be done correctly.

The way I did it (Kotlin code):

val legend = SciChartLegend(context)
legendModifier = LegendModifier(legend)
legendModifier.setOrientation(Orientation.VERTICAL)
legendModifier.setLegendPosition(Gravity.START or Gravity.TOP, 0)
legendModifier.setSourceMode(SourceMode.AllVisibleSeries)
legendModifier.setShowSeriesMarkers(true)
legendModifier.setShowCheckboxes(true)


val modifierGroup = chartBuilder.newModifierGroup().build()
modifierGroup.childModifiers.add(legendModifier)
chartSurface.chartModifiers.add(modifierGroup)

if(legend.parent != null)
{
    (legend.parent as ViewGroup).removeView(legend)
}

val linearLayout = LinearLayout(context)
linearLayout.orientation = LinearLayout.VERTICAL
linearLayout.addView(legend)
linearLayout.addView(chartSurface)

I was surprised that passing the legend to LegendModifier constructor also adds it to it’s layout. So I had to manually remove it and add it to my LinearLayout. It does work, but as I said, it is a hackish way of doing it. My question is, how is it done correctly?

0 votes
24 views

Hi,

the handlers I’ve attached to my viewmodels (FastLineRenderableSeriesForMvvm) used in a chart do not trigger when I change the Stroke or IsVisible properties via bound controls.

Any ideas?

Thanks,

Stefan

0 votes
23 views

Is there any kind of a modifier that allows the pinch-equivalent of:

new YAxisDragModifier() { DragMode = SciChart.Charting.AxisDragModes.Scale }

Thanks,
Kevin

0 votes
25 views

Hi,

How can I disable wheel + Ctrl pan behavior on Y Axis?
now the user can move the Chart up and down on the Y Axis, I want to disable this..

Thanks.

  • Lio Ols asked 1 week ago
  • last active 5 days ago
0 votes
0 answers
24 views

Hello,

I am using SciStockChart , when i haven’t specified below code in it, candle which is updating at runtime has annotation of his price on
Y Axis.
But with below code its not showing.

         <s:SciStockChart.ChartModifier >
                                        <s:ModifierGroup>

How can i add have both?

0 votes
23 views

If I set AutoRange = “Always” myHorizontalLineAnnotation draws fine. When I set it to “Never” – which I want – my HorizontalLineAnnotation won’t draw. How do I do this? ty

  <s:SciChartSurface.YAxis>
        <s:NumericAxis AutoRange="Never"
                       VisibleRange="{Binding ElementName=this, Path=YMinMax}"

        <s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
                                    Y1="{Binding ElementName=this, Path=CurrentHigh}"
                                    Stroke="{Binding ElementName=this, Path=ToleranceColor}"
                                    StrokeThickness="1" />
0 votes
28 views

Hi,

I attached two images of what I need to do (easier than explaining it), I’m interested in the blue polygon, It could resemble the use of columns with the polar chart, but not quite, is there a simple way to do this or could someone point me to the right direction?

Thank you

Alex

0 votes
21 views

hi,
I serialize my xaxis and i see that XVisibleRangeLimit not serialized.
please help.

0 votes
27 views

hi,
Chart is not cleared even if RenderrableSeries is cleared.

I see that chart series are still plotted, but SeriesViewModel count for data context is 0.

Useful info : I see that legend SeriesInfo still has series data even after clearing.

Thanks.

0 votes
0 answers
53 views

Hi,
Been following this doc to color FastLineRenderableSeries datapoints but my series won’t show. Here is my OverrideStrokeColor after implementing the Interface

public Color? OverrideStrokeColor(IRenderableSeries rSeries, int index, IPointMetadata metadata)
    {
        ColorMetadata colorMetadata = metadata as ColorMetadata;
        if(colorMetadata == null) 
            return null;

        switch (colorMetadata.Color.ToLower().Trim())
        {
            case: blah blah
                       return Colors.blahblah

            default:
                return null;
        }
    }

And the metadata class

public class ColorMetadata : IPointMetadata
{
    public string  Color    {get; set;    }

    public ColorMetadata(string color)
    {
        Color = color;
    }

    public bool IsSelected { get; set; }

    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
}

And the series

<s:FastLineRenderableSeries Stroke="Green"  
                                        StrokeThickness="1" 
                                        PaletteProvider="{StaticResource pointColorProvider}"
                                        DataSeries="{Binding Source}">

Without forgetting (in UserControl.Resources)

 <pointColorProvider:ColorPaletteProvider x:Key="pointColorProvider"/>

and appending each point with its metadata
like dataSeries.Append(Date, data, new ColorMetadata(“green”));
All works great (without paletteProvider) except when I introduce PaletteProvider=”{StaticResource pointColorProvider}”. Tried with breakpoints in my PaletteProvider class, only OnBeginSeriesDraw gets hit, OverrideStrokeColor is never hit. Please help.

0 votes
40 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
31 views

Hello!

Is there way to create surfaces in different threads (on the same WPF Window) and then synchronize them via groups – methods SciChartGroup.SetVerticalChartGroup() and MouseManager.SetMouseEventGroup() ? Now i catch threads access error šŸ™

Thanks!

0 votes
36 views

Hello,

I need help in adding multiple Horizontal Line Annotations to my chart.

My chart has multiple data series and hence the need for multiple annotations. I have the following code but it does not seem to work.

Not even one Annotation gets displayed.

Please help !

<s:SciChartSurface RenderableSeries="{Binding ChartRenderableSeries}" Annotations="{Binding ThresholdCollection}" >
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis  AxisTitle="Time" VisibleRange="{Binding Settings.XVisibleRange, Mode=TwoWay}" />
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="Values" VisibleRange="-30,30" AutoRange="Always"/>
            </s:SciChartSurface.YAxis>



public ObservableCollection<HorizontalLineAnnotation> ThresholdCollection { get; set; }

Every time user adds a Threshold, the following code gets executed.

var threshholdObj = new HorizontalLineAnnotation
            {
                Name="Threshold" ,
                Y1 = 2,
                Stroke= System.Windows.Media.Brushes.Blue
            };
            ThresholdCollection.Add(threshholdObj);
0 votes
58 views

Hi, I would like to ask how can I draw Renko and 3 Line Break Chart using SciChart API ? thanks.

  • Ray Hung asked 3 weeks ago
  • last active 3 weeks ago
0 votes
0 answers
37 views

Update: Please remove my previous question, I did not input the code correctly

I have a collection of line charts that use FastLineRenderableSeries, and they all share the same View.xaml. I’m trying to change the font size for the Y-axis tick labels in the view but for some reason it gets ignored.

This is the view for the container for all the charts:

<UserControl x:Class="....SciCharts.MainView"
<DockPanel >
    <Grid>
            <ItemsControl ItemsSource="{Binding ComponentCharts}" Grid.IsSharedSizeScope="True">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <UniformGrid Rows="2"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <ContentControl Content="{Binding}"/>
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
    </Grid>
</DockPanel>

And this is the view for each individual line chart:

<UserControl x:Class="SciCharts.LineChartView"
<UserControl.Resources>
    <converters:BooleanToCollapsedVisibilityConverter x:Key="VisibilityConverter"/>
    <converters:ReverseBooleanToCollapsedConverter x:Key="ReverseVisibilityConverter"/>
    <Style x:Key="AxisLabelStyle" TargetType="s:DefaultTickLabel">
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="FontSize" Value="2.0"/>
        <Setter Property="HorizontalAnchorPoint" Value="Left"/>
    </Style>
</UserControl.Resources>
<DockPanel>
    <s:SciChartSurface RenderableSeries="{Binding LineChart.SeriesCollection}">
        <s:SciChartSurface.XAxes>
            <s:CategoryNumericAxis AxisTitle="Time" DrawMajorBands="False" AutoRange="Always" DrawLabels="True" />
        </s:SciChartSurface.XAxes>
        <s:SciChartSurface.YAxes>
            <s:NumericAxis DrawMajorBands="False" AxisAlignment="Left" AxisTitle="Rate" AutoTicks="True" AutoRange="Always" TickLabelStyle="{StaticResource AxisLabelStyle}"/>
        </s:SciChartSurface.YAxes>
    </s:SciChartSurface>
</DockPanel>

I’m able to change the color and the anchor point using the code above, but the font size is ignored completely. Tried setting it under NumericAxis but same result. Please let me know what can I do to achieve this.
Thanks,

0 votes
0 answers
43 views

I have a collection of line charts that use FastLineRenderableSeries, and they all share the same View.xaml. I’m trying to change the font size for the Y-axis tick labels in the view but for some reason it gets ignored.

This is the view for the container for all the charts:

<UserControl x:Class="….SciCharts.MainView"
…..

<ItemsControl.ItemsPanel>

</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>

</ItemsControl.ItemTemplate>

And this is the view for each individual line chart:

<UserControl x:Class="SciCharts.LineChartView"

</UserControl.Resources>


<s:SciChartSurface.XAxes>

</s:SciChartSurface.XAxes>
<s:SciChartSurface.YAxes>

</s:SciChartSurface.YAxes>

I’m able to change the color and the anchor point using the code above, but the font size is ignored completely. Tried setting it under NumericAxis but same result. Please let me know what can I do to achieve this.
Thanks,

0 votes
0 answers
42 views

Hi,

I have a chart with lot of annotations, for performance concern I used a custom renderable serie and custom point maker to display vertical line with text instead of using vertical annotations.

The text is displayed with context.DrawText in a custom point marker

The result is great, however I would like my text to be vertical.

Any idea on how to achieve this ?

Regards

0 votes
0 answers
38 views

I have a Chart with two Y-Axes, one on the left and one on the right for a SeriesvalueModifier.
i need to bind the VisibleRange to a Property in the ViewModel. Everything works fine, except for if i zoom via the MouseWheelZoomModifier.
It looks like the Chart gets “stretched” in Y direction. I guess the modifier zooms on both axes, so the property they are both bound to gets two updates, one for each axis.
When i bind the VisibleRange of Axis[A] to theVisibleRange of Axis[B] which is bound to the property also won’t work.
Do you have any idea how this could be fixed ?

what i want to achieve is this behavior:

https://www.scichart.com/questions/question/faq-how-to-have-two-yaxis-on-left-and-right-with-the-same-visiblerange-mirrored-yaxis

 Axis[A]
            <s:NumericAxis
                x:Name="NumericAxis_Mass"
                x:Key="NumericAxis_Mass"
                Id="NumericAxis_Mass"
                AxisTitle="{ext:Localization Chart_Axis_PartialPressure}"
                GrowBy="0.1,0.1"
                VisibleRange="{Binding YVisibleRange,
                                Mode=TwoWay,
                                UpdateSourceTrigger=PropertyChanged,
                                NotifyOnSourceUpdated=True,
                                NotifyOnTargetUpdated=True}" 
                AutoRange="{Binding AnalysesAutoRange_y,
                           Mode=TwoWay,
                           UpdateSourceTrigger=PropertyChanged,
                           NotifyOnSourceUpdated=True,
                           NotifyOnTargetUpdated=True}"
                AxisAlignment="Left"
                Style="{StaticResource Chart.NumericAxis.Style}" />

Axis[B]
                <s:NumericAxis
                x:Key="NumericAxis_Mass_Empty"
                x:Name="NumericAxis_Mass_Empty"
                GrowBy="0.1,0.1"
                TextFormatting="0.00E+00"
                VisibleRange="{Binding YVisibleRange,
                                Mode=TwoWay,
                                UpdateSourceTrigger=PropertyChanged,
                                NotifyOnSourceUpdated=True,
                                NotifyOnTargetUpdated=True}"            
                AutoRange="{Binding AnalysesAutoRange_y,
                           Mode=TwoWay,
                           UpdateSourceTrigger=PropertyChanged,
                           NotifyOnSourceUpdated=True,
                           NotifyOnTargetUpdated=True}"
                AxisAlignment="Right"
                Style="{StaticResource Chart.NumericAxis.Style}"
                DrawLabels="False"
                DrawMajorBands="False"
                DrawMajorGridLines="False"
                DrawMajorTicks="False"
                DrawMinorGridLines="False"
                DrawMinorTicks="False"
                Margin="35,0,0,0"
                Width="auto" />
  • Dirk Heyne asked 3 weeks ago
  • last active 3 weeks ago
0 votes
37 views

Hi,

I’m trying to colorize my Column Chart according to my Candle Chart (red / green).
I’ve tried to create a Palette provider, but I don’t know how to get the corresponding item from my Candle Data.

How can I do this?

0 votes
53 views

When Im trying to remove an annotation, I’m receiving an error:

java.lang.NullPointerException: Attempt to invoke interface method
‘void
com.scichart.charting.visuals.annotations.IAnnotationPlacementStrategy.drawAdorner(android.graphics.Canvas)’
on a null object reference
at
com.scichart.charting.visuals.annotations.AnnotationBase.onDrawAdorner(SourceFile:889)
at
com.scichart.charting.visuals.annotations.AdornerLayer.onDraw(SourceFile:144)
at android.view.View.draw(View.java:17071)
at android.view.View.updateDisplayListIfDirty(View.java:16053)

I’ve tried many ways, like:

UpdateSuspender.using(priceChart, new Runnable() {
    @Override
    public void run() {
        priceChart.getAnnotations().clear();
    }
});

and

UpdateSuspender.using(priceChart, new Runnable() {
    @Override
    public void run() {
        priceChart.getAnnotations().remove(myAnnotation);
    }
});
0 votes
0 answers
51 views

I use VerticallStackedAxes of SciChart component and add 7 AxisMarkerAnnotation to each NumericAxis but AxisMarkerAnnotations not draggable except first of them.

this is the part of my UserControl code:

<s:SciChartSurface.YAxes>








</s:SciChartSurface.YAxes>

        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:RubberBandXyZoomModifier IsXAxisOnly="True"/>
                <s:ZoomExtentsModifier/>
                <s:CursorModifier ShowAxisLabels="False" ShowTooltip="False"/>
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

        <s:SciChartSurface.Annotations>

            <!-- Draws Bands behind each axis -->
            <s:BoxAnnotation YAxisId="Ch0" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch0}" Y2="{Binding VisibleRange.Max, ElementName=Ch0}" Background="#11000000" AnnotationCanvas="BelowChart"/>
            <s:BoxAnnotation YAxisId="Ch1" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch1}" Y2="{Binding VisibleRange.Max, ElementName=Ch1}" Background="#44B0C4DE" AnnotationCanvas="BelowChart"/>
            <s:BoxAnnotation YAxisId="Ch2" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch2}" Y2="{Binding VisibleRange.Max, ElementName=Ch2}" Background="#11000000" AnnotationCanvas="BelowChart"/>
            <s:BoxAnnotation YAxisId="Ch3" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch3}" Y2="{Binding VisibleRange.Max, ElementName=Ch3}" Background="#44B0C4DE" AnnotationCanvas="BelowChart"/>
            <s:BoxAnnotation YAxisId="Ch4" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch4}" Y2="{Binding VisibleRange.Max, ElementName=Ch4}" Background="#11000000" AnnotationCanvas="BelowChart"/>
            <s:BoxAnnotation YAxisId="Ch5" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch5}" Y2="{Binding VisibleRange.Max, ElementName=Ch5}" Background="#44B0C4DE" AnnotationCanvas="BelowChart"/>
            <s:BoxAnnotation YAxisId="Ch6" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch6}" Y2="{Binding VisibleRange.Max, ElementName=Ch6}" Background="#11000000" AnnotationCanvas="BelowChart"/>
            <s:BoxAnnotation YAxisId="Ch7" CoordinateMode="RelativeX" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch7}" Y2="{Binding VisibleRange.Max, ElementName=Ch7}" Background="#44B0C4DE" AnnotationCanvas="BelowChart"/>

            <s:AxisMarkerAnnotation X1="0.0" 
                                    Y1="0.0"
                                    YAxisId="Ch0"
                                    IsEditable="True"
                                    LabelTemplate="{StaticResource AxisMarkerTemplate}"
                                    PointerTemplate="{StaticResource DefaultAxisPointerTemplate}"/>

            <s:AxisMarkerAnnotation X1="0.0" 
                                    Y1="0.0"
                                    YAxisId="Ch1"
                                    IsEditable="True"
                                    LabelTemplate="{StaticResource AxisMarkerTemplate}"
                                    PointerTemplate="{StaticResource DefaultAxisPointerTemplate}"/>
        </s:SciChartSurface.Annotations>

You can find source code Here
thanks

0 votes
57 views

Hi ,

I am trying to change background color of scichart surface and also need to change color of grid bands and grid lines.

So far I am able change background color of scichart surface using scichartSurface.setBackgroundcolor API

But I am not able to find api can customize/ remove grid bands and grid lines.

Please find images attached for more details.

0 votes
65 views

I use a scatter series that contains around 200,000 data points and I noticed that in the DirectX assisted rendering mode (not sure it also applies to the normal non DirectX mode) scatter points are sampled, meaning, not all scatter points are visible on the chart surface.

How can I turn that off to display all data points even if that may affect performance? I chart financial time series and the chart often shows discrete jumps when there are actually many data points in between when zooming in.

Thanks

  • bbmat asked 1 month ago
  • last active 4 weeks ago
0 votes
58 views

It seems that if the axis is collapsed, all associated annotation labels are not visible (but their annotation line is visible).
Is there property or the like that will allow labels to be shown which are associated with a collapsed axis?

0 votes
74 views

I have introduced a real time chart in my WPF Application. The chart starts plotting points from the left of the chart ( close to Y-Axis).

I would like it to start plotting from the right of the chart ( Away from Y-Axis) and as when points start adding up, I would like the points to slide to the left ( Towards Y-Axis).

Similar to how performance tab in Task Manager displays the CPU utilization.

0 votes
0 answers
66 views

Hi
I have a chart with a strange behavior, does anyone know why it happens?
here is a GIF: https://ibb.co/i3NPLQ

  • Lio Ols asked 1 month ago
  • last active 1 month ago
0 votes
90 views

Hi SciCharters,
I would like to create a color coded 2D scatter plot.
My approach is the IPointMarkerPaletteProvider interface. It works, but I have experienced a huge performance difference when I individually colored every datapoint of my 2D chart and using a static color.
When I use the same provider but only a single color there is no performance issue at all.

Here is the relevant code of my PointMarkerPaletteProvider interface:

 public PointPaletteInfo? OverridePointMarker(IRenderableSeries rSeries, int index, IPointMetadata metadata)
    {
            var myMetaData= metadata as MyRecordMetadata;
            var colorBarPosition = GetColorBarPosition(myMetaData.PlotValue);

            _pointMarkerColorOverrides.Fill = _ColorBar[colorMapPosition];
            _pointMarkerColorOverrides.Stroke = _ColorBar[colorMapPosition];
             return _pointMarkerColorOverrides;
    }

The _ColorBar contains only 256 values and the Color is selected according to the myMetaData.PlotValue in GetColorBarPosition().
The series is plotted as expected, but it takes “ages”(seconds for 4000 data points) for rendering it on the chart.
If I replace the assignments of _pointMarkerColorOverrides.Stroke and _pointMarkerColorOverrides.Fill with one static color, there’s no performance issue at all.

I was just curious if that is the expected behaviour? Would it be better (in terms of performance) to switch to another chart type (e.g. heatmap chart) to plot color coded values?

  • Tim asked 1 month ago
  • last active 3 weeks ago
0 votes
128 views

I see there is a Polar chart type for WPF charts and that one is “coming soon” to Android. Is it known when we can expect it to be available on Android?

Thank you in advance.

0 votes
83 views

In our view model, the data range is expanded to include data outside of the X-Axis range. This is done to preserve the spline curve which is defined by previous points– doing this prevents the spline curve from changing drastically by including X number of points outside the range.

When the Draw function is called, the point context that was bound in is filtered to the X Axis range which leads to the spline curve changing as you pan (especially noticeable if it affects a peak).

How can I change this behavior to preserve the spline line?

Updated — Setting ResampleMode = None does not give me all the points.

0 votes
75 views

Hi
Here’s my XAML:

                <s:SciChartDonutSurface ChartTitle="Times Distribution" ItemsSource="{Binding TimeGroups}">
                    <s:SciChartDonutSurface.ItemTemplate>
                        <DataTemplate DataType="s">
                            <s:DonutSegment SegmentValue="{Binding Path=Duration}" Text="{Binding Path=Name}"/>
                        </DataTemplate>
                    </s:SciChartDonutSurface.ItemTemplate>
                </s:SciChartDonutSurface>

And I have correctly created ObservableItems named TimeGroups, with properties Duration and Name.

I’m not seeing a thing…

What am I doing wrong?

Thnanks

0 votes
76 views

Hello, I hope you can help me! please
How could you reach this special design with androidchar.
it’s possible?
Please I need to know if it is feasible, with this I could start to carry out my project.
Thanks in advance.

0 votes
0 answers
63 views

I have a chart that uses datapoint selection on an XyScatterRenderableSeries. This series is defined as follows:

             <s:XyScatterRenderableSeries DataSeries="{Binding ChartData.SinglePointUnavailableResources}" 
                                    Stroke="CornflowerBlue" 
                                    StrokeThickness="4"
                                    modifiers:FilteringLegendModifier.IncludeSeries="False">
                <s:XyScatterRenderableSeries.PointMarker>
                   <s:EllipsePointMarker Fill="CornflowerBlue" Width="4" Height="4"/>
                </s:XyScatterRenderableSeries.PointMarker>
                <s:XyScatterRenderableSeries.SelectedPointMarker>
                   <s:EllipsePointMarker Fill="Yellow" Width="13" Height="13"/>
                </s:XyScatterRenderableSeries.SelectedPointMarker>
             </s:XyScatterRenderableSeries>

This works as expected, however I am getting broken binding warnings in my debug output window as follows:

System.Windows.Data Warning: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries’, AncestorLevel=’1”. BindingExpression:Path=Opacity; DataItem=null; target element is ‘EllipsePointMarker’ (Name=”); target property is ‘Opacity’ (type ‘Double’)
System.Windows.Data Warning: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries’, AncestorLevel=’1”. BindingExpression:Path=Stroke; DataItem=null; target element is ‘EllipsePointMarker’ (Name=”); target property is ‘Fill’ (type ‘Color’)
System.Windows.Data Warning: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries’, AncestorLevel=’1”. BindingExpression:Path=Stroke; DataItem=null; target element is ‘EllipsePointMarker’ (Name=”); target property is ‘Stroke’ (type ‘Color’)
System.Windows.Data Warning: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries’, AncestorLevel=’1”. BindingExpression:Path=AntiAliasing; DataItem=null; target element is ‘EllipsePointMarker’ (Name=”); target property is ‘AntiAliasing’ (type ‘Boolean’)

You get the same warnings in your “PointMarkers Selection” sample.

They seem to be internal to scichart. I realise this doesn’t effect the functionality, but we generally try and avoid these in our codebase if possible, so ones that do occur are easily spotted and any potential bugs can be identified early.

Is there any way to prevent these warnings coming from scichart?

thanks

Bill

3 votes
0 answers
90 views

Hi there!
I successfully build trader chart from nice example “2D Charts -> Create Stock Charts -> Using SciStockChart”.
Then I had to draw line on the chart with candles, but the problem was, that the line didn’t have data on some dates (there is data for lots of candles, but for the red line there is only 4 points: A,B,C,D), and result i want in shown here (solved):
Result i want image

Axes:
XAxis: CategoryDateTimeAxis (Dates)
YAxis: NumericAxis (Prices)

Series:
Candles: FastCandlestickRenderableSeries (OhlcDataSeries<DateTime, double>)
Red Line: FastLineRenderableSeries (XyDataSeries<DateTime, double>)

Problem:
CategoryDateTimeAxis type ignores the XAxis values for computation of x-coordinate, and choosing only the index of the value instead. CategoryDateTimeAxis vs DateTimeAxis. I have N-number of candles and only 4 values for red line. How to receive line with no gaps, with points on their places (dates on X-axis) ? I can’t use simple DateTimeAxis, because candles don’t draws.

Solution:
1) Use double.NaN for each date (x-axis value) if no data for the red-line on date given.
2) In FastLineRenderableSeries set DrawNaNAs = LineDrawMode.ClosedLines (if don’t use this flag, you will receive something like this: WPF Chart Gaps (Nulls) in Series

Thanks a million to Julia Skorobogata from SciChart!

0 votes
68 views

Hello!

I am building an iOS framework that sits on top of SciChart for app developers within our company. I’d like to provide my own default SCIThemeColorProvider object for charts in my framework. Easiest way to do that is to include my own theme plist in my framework’s bundle, but I cannot currently do that (as of 2.0.0.1643) because the SCIThemeColorProvider initializer assumes it’s either in the “Charting.SciChart” bundle or the main bundle.

I’d like to propose modifying SCIThemeColorProvider to add another initializer that takes a bundle ID, like this:

/**
 * Creates theme provider based on specified style
 *
 * @param themeKey The key of style which should be used as base for this theme provider
 *
 * @param bundleIdentifier The identifier of the bundle containing the theme plist identified by 
 *                         themeKey; if nil, the main bundle is used.
 */
- (nullable instancetype)initWithThemeKey:(nonnull NSString*)themeKey bundleIdentifier:(nullable NSString*)bundleIdentifier;

The existing -initWithThemeKey: initializer would call through to this initializer with a nil bundle ID.

I have attached a patch file with this proposed change. Could this be added to an upcoming build?

0 votes
85 views

I can’t seem to find any easy way to find all my questions.

0 votes
103 views

Hi, guys

My x axis is SCICategoryDateTimeAxis and i’m want to draw grid line with custom period. Let’s say every four hours for data with a period of thirty minutes. What is the best way for that?

Can i redifined axis’s tickCoordinatesProvider?
Can you provide some example?
Or it only possible with axes annotations ?

Best regards,
Sushynski Andrei

0 votes
69 views

I’m currently trying to adapt an example to post here as an example repro– But in the meantime I figured I’d post and see if there are any fundamental problems with trying to do this.

The exception message states:

Additional information: Cannot get data-value from coordinate as the associated Axis is null
0 votes
69 views

Looking at the documentation I’ve figured out how to style the content of the tooltip. But I can’t seem to figure out how to style the container.

You can see in the attached image the automatic blue background that matches the series. I would like to style it with our own style which is the dark background and then BorderBrush that matches the series color.

<DataTemplate x:Key="DigitalToolTipTemplate" DataType="s:XySeriesInfo">
                    <Border Style="{StaticResource BorderStyle}" BorderBrush="{Binding Stroke}">
                        <TextBlock Text="{Binding SeriesName, StringFormat='{}{0}'}" />
                    </Border>
                </DataTemplate>

This seems to style only the inner contents of the tooltip but not the whole tooltip.

Also note the BorderBrush binding (not sure if this is correct to get the series color).

Update
Now using the following code (which is working) — Now the only thing I need to figure out is what to bind for the stroke to get the series color as the border stroke.

<Style x:Key="DigitalToolTipStyle" TargetType="s:TooltipControl">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="s:TooltipControl">
                                <Border Style="{StaticResource BorderStyle}" BorderBrush="{Binding Stroke}">
                                    <ContentPresenter Content="{TemplateBinding DataContext}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
0 votes
85 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
0 answers
72 views

Hi there,

I am having a few issue with an application using the SeriesBinding and IRenderableSeriesViewModel.

As a small back ground, I have an application which has a number of tabs, two of which have independent charts (one tab has 4 charts in it, the other just 1).

When I am focused on first (main) tab, and update the DataSeries, the chart in the other tab (secondary) is not updated. After this point it doesnt seem to matter if I focus on the secondary tab again, the data just wont refresh.

I was using 4.2.4.10343, but rolled back to 4.2.3.10206 (just a random step backwards) which seem to fix this issue, so maybe there is a bug that’s crept in in the last few releases? If so, it seems to be that the loss of focus / lack of visibility of the chart being updated means that the SeriesBinding is no longer valid?

Also, in my main chart (see below) I am using a CustomAnnotationChartModifier similar to that described here, and although the rollback to 4.2.3.10206 fixes the issue of the plots not redrawing, it is the case that the custom annotations are not automatically positioned when the control has no focus (more likely because it is not visible). This is the same going back to at least version 4.2.2.9381.

For info the SimulationResultViewModel.RenderViewModels object is an ObservableCollection of IRenderableSeriesViewModels populated with LineRenderableSeriesViewModels with simple XyDataSeries.

<SciChart:SciChartSurface Name="chart" Grid.Row="0" Grid.Column="0"
                              GridLinesPanelStyle="{StaticResource GridLinesPanelStyle}" SciChart:ThemeManager.Theme="BrightSpark"
                              RenderableSeries="{SciChart:SeriesBinding SimulationResultViewModel.RenderViewModels}"
                              viewModels:Injector.PassSurfaceToViewModel="True"
                              PreviewMouseDown="chart_MouseDown"
                              PreviewMouseUp="chart_MouseUp">

        <SciChart:SciChartSurface.XAxis >

            <SciChart:NumericAxis x:Name="xAxis" AxisTitle="Lap Number" DrawMajorBands="False" LabelProvider="{StaticResource CustomXAxisLabelFormatter}" GrowBy="0.02, 0.02" AutoRange="Once" VisibleRange="{Binding SimulationResultViewModel.XAxisVisibleRange, Mode=TwoWay}"/>
        </SciChart:SciChartSurface.XAxis>
        <SciChart:SciChartSurface.YAxis>
            <SciChart:NumericAxis x:Name="yAxis" AxisTitle="Time" DrawMajorBands="False"  AxisAlignment="Left" LabelProvider="{StaticResource CustomYAxisLabelFormatter}"  GrowBy="0.05, 0.05" AutoRange="Once" VisibleRange="{Binding SimulationResultViewModel.YAxisVisibleRange, Mode=TwoWay}"/>
        </SciChart:SciChartSurface.YAxis>


        <SciChart:SciChartSurface.ChartModifier>
            <SciChart:ModifierGroup>

                <viewModels:CustomAnnotationChartModifier x:Name="customAnnotations" LabelsSource="{Binding SimulationResultViewModel.ChartLabels}"/>

                <SciChart:RolloverModifier Name="rollover" SourceMode="AllSeries" DrawVerticalLine="True" ShowTooltipOn="{Binding SettingsManager.ShowToolTipOptions}"/>

                <SciChart:ZoomPanModifier ReceiveHandledEvents="True" ClipModeX="None"/>
                <SciChart:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier"/>
                <SciChart:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True" IsXAxisOnly="False" ZoomExtentsY="False" IsAnimated="True" ExecuteOn="MouseRightButton"/>
                <SciChart:ZoomExtentsModifier x:Name="zoomExtentsModifier" ExecuteOn="MouseDoubleClick"/>

                <SciChart:TooltipModifier Name="tooltip" IsEnabled="True" UseInterpolation="False" TooltipLabelDataContextSelector="{Binding TooltipDataContext}" ShowTooltipOn="{Binding SettingsManager.ShowRollOver}" />


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


    </SciChart:SciChartSurface>
0 votes
0 answers
94 views

Hi, guys

Is there possibility to show CursorModifier by simply changing switch state?

According to custom tooltip behaviour it is possible for SCITooltipModifier. And it’s work at v 2.0.0.xxxx

So can you provide a code with redefinitions of private Api methods for this situation?

UDP: What is the best practice to customize tooltip’s data view?

Best regards,
Sushynski Andrei

0 votes
91 views

Hi All,

Are there any examples of a 3D column chart where the Axis are prevented from overlapping the data? Also want to add a cursor and be able to select a column. I’m using NumericAxis3d and LogarithmicNumericAxis3D.

Thanks
Mark.

0 votes
96 views

Hi,

I have an application where I can potentially create, plot and export (as png) hundreds of graphs. It all runs smoothly but the “ExportToFile” method of the SciChartSurface. It seems to never de-allocate the memory it uses even after disposing the SciChartSurface itself. After a few hundred graphs, the application ends up using 70Gb+ of ram but if I just comment out the ExportToFile line, the application never uses more than 2Gb of ram (as expected).

I’ve tried putting:
GC.Collect();
GC.WaitForPendingFinalizers();
…both after the ExportToFile and after disposing the graphs, but it makes no difference.

Has anyone experienced this issue? Is there anything else that I can try?

Thanks
/Daniel

0 votes
86 views

I’m looking to either extend the RubberBandXyZoomModifier to provide this size growing behavior when the mouse has left the chart area (shown in the attached image) or build one from scratch (having to rebuild the normal box-zoom components (the box etc).

I assume from reading around the the latter option will be the only option.

Thanks!

0 votes
101 views

I have two charts (separate SciChartSurface via SciChartGroup) stacked on top of each other. Each chart has its own X-Axis and both charts’ mouse interaction are linked via MouseGroupId. All fine so far.

I then generate a lineseries ‘series1’ on the first surface, 1000 datapoints, time stamps are 1 minute apart. I also generate a second line series ‘series2′ on the second surface, but this series’ first time timestamp start 2 hours later than the first series.

Expected behavior is that the series2 will be shifted by 2 hours and not start at the same position as series1 but rather extend by 2 hours. That is, however, not the case on my chart.

What is wrong here and is this a potential bug?

I need both XAxes to be perfectly aligned, meaning the cross hair label on each XAxis displays the exact same time stamp. Please note that I customized the LabelProvider to display milliseconds also, but I use the same Label Provider for both charts, so no difference here.

Can someone please chime in what is going on?

Please see attached charts to illustrate what I have been describing (screenshot1 shows intended behavior but on the same chart, I want this behavior to occur on separate panes/charts). Screenshot 2 describes the problem I am having.

Thanks

  • bbmat asked 2 months ago
  • last active 1 month ago
1 vote
96 views

I have multiple series on a chart surface, each with their own y-axis. I do not want to display all y-axes as this would take up half the chart surface.

Is there a way to make the matching y-axis only visible when the mouse cursor hovers over a series (hit-test)? How would I go about that?

Thanks
Matt

  • bbmat asked 2 months ago
  • last active 1 month ago
0 votes
98 views

Hi, guys

Is there something similar like

  • (void)bringSubviewToFront:(UIView *)view;
  • (void)sendSubviewToBack:(UIView *)view;

from UIView but for chart Annotations?

Best regards,
Sushynski Andrei

0 votes
97 views

I’ve got a few questions about plotting Lat/Long coordinates in real time.

Situation
I’ve got two data series – (Timestamp, Latitude) & (Timestamp, Longitude) being updated 10 times/second. My goal is to graph car position in real time with a ScatterRenderableSeries and color each point according to other channels of data (temp, brake pressure, yaw rate, etc..).

How to best associate metadata?
In order to color the plotted points I need to be able to associate them with their respective timestamps. Do you have any advice on how best to do so? It seems the most obvious solution is using the PointMetaData API, but I’m curious if there would be a more efficient solution (like say somehow using an Xyz/Xyy DataSeries).

Dealing with the unsorted nature of the data?
I’m aware that SciChart performs much better when only inserting sorted data into a XyDataSeries. Seeing as I only receive GPS data 10 times/sec, I’m wondering if you think the lost performance will still pose a problem?

I’d appreciate any advice you could give!

0 votes
130 views

Hi I currently do need to get two things for which I currently have no clue how to get it.

I’m using FastLineRenderableSeries and XyDataSeries<double,double> in SciChart 2D.

1st: The absolute min and max values from an curve.

What I found is that I can get the YMax/YMin and XMax/XMin, but that is not what I need.

-> I need to get the “Point” (x, and y value) where the maximum/minimum is.

2nd: I Need the X-value of an Y-Value (or the list of x-values if the y-value does exist more than once).
Lets say I have the y-Value “5” and want to know at which x-value this is.

Is there a fast and elegant way to get this information from existing RenderableSeries via the SciChart API, or Do I need to get this information from my data source before appending the curves?

Thanks,
Ben

  • Bernd Held asked 2 months ago
  • last active 1 month ago
1 vote
105 views

Hi – I have a scrolling sine wave and would like to put a numeric value at the high point of each peak. Is this possible? I’ve attached a pic of what I need. ty

Showing 1 - 50 of 2k results