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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

Hello SciChart team, good day for all

I have a strange situation happening, that I have noticed before, but only now the customer complained about 🙂

In the FastMountainRenderableSeries where IsDigitalLine=”True”, sometimes its rendered a middle horizontal line that runs across the whole chart. Sometimes it doesnt happen. And it can happen or not after I just cloned the chart. Or vice-versa, I create a chart, this line is not rendered, and if I clone it its rendered. Some times they are displayed all the time. Well you get the picture, seems very random.
The data is displayed correctly all the times, but if the line is rendered, then only above part of the chart is populated.

here is 2 photos of what I mean, they are both of exactly the same data.

each one of this charts is defined of the following way:

    <SciChart:SciChartSurface x:Name="chartState1"
                              Grid.Row="2"
                              Grid.Column="1"
                              Margin="0,0,0,3"
                              ChartTitle=""
                              GridLinesPanelStyle="{StaticResource SimpleGridLinesPanelStyle}"
                              Padding="0"
                              SciChart:SciChartGroup.VerticalChartGroup="MyVerticalChartGroup"
                              SciChart:ThemeManager.Theme="Chrome"
                              Style="{StaticResource SimpleSciChartSurfaceStyle}">

        <SciChart:SciChartSurface.RenderableSeries>
            <SciChart:FastMountainRenderableSeries DataSeriesIndex="0"
                                                   IsDigitalLine="True"
                                                   SelectedSeriesStyle="{StaticResource SimpleLineSeriesStyle}"
                                                   Style="{StaticResource SimpleFastMountainRenderableSeriesStyle}" />
        </SciChart:SciChartSurface.RenderableSeries>
        <SciChart:SciChartSurface.XAxis>
            <SciChart:NumericAxis Height="0"
                                  FlipCoordinates="True"
                                  MinorsPerMajor="2"
                                  Style="{StaticResource SimpleAxisStyle}"
                                  Visibility="Hidden"
                                  VisibleRange="{Binding SharedXVisibleRange,
                                                         Mode=TwoWay}" />

        </SciChart:SciChartSurface.XAxis>
        <SciChart:SciChartSurface.YAxes>
            <SciChart:NumericAxis x:Name="numericAxis1"
                                  AutoRange="False"
                                  AxisAlignment="Left"
                                  DrawLabels="False"
                                  DrawMajorGridLines="False"
                                  DrawMajorTicks="False"
                                  DrawMinorGridLines="False"
                                  DrawMinorTicks="False"
                                  IsPrimaryAxis="True"
                                  MinorsPerMajor="2" />
            <SciChart:NumericAxis x:Name="xtraAxis1"
                                  AxisTitle="    "
                                  DrawMajorGridLines="False"
                                  DrawMajorTicks="False"
                                  DrawMinorGridLines="False"
                                  DrawMinorTicks="False"
                                  Id="xtraAxis1"
                                  Visibility="Collapsed" />
        </SciChart:SciChartSurface.YAxes>
        <SciChart:SciChartSurface.ChartModifier>
            <SciChart:ModifierGroup SciChart:MouseManager.MouseEventGroup="mouseGroup">
                <Utils:CursorModifierEx x:Name="cursorModifier1" ReceiveHandledEvents="True" />
            </SciChart:ModifierGroup>
        </SciChart:SciChartSurface.ChartModifier>
    </SciChart:SciChartSurface>

and the styles in this example are:

<Style x:Key="SimpleGridLinesPanelStyle" TargetType="SciChart:GridLinesPanel">
    <Setter Property="Background" Value="White" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Black" />
    <Setter Property="Foreground" Value="Black" />
</Style>

<Style x:Key="SimpleSciChartSurfaceStyle" TargetType="SciChart:SciChartSurface">
    <Setter Property="Background" Value="White" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="Foreground" Value="Black" />
</Style>

<Style x:Key="SimpleLineSeriesStyle" TargetType="SciChart:FastLineRenderableSeries">
    <Setter Property="SeriesColor" Value="Black" />
    <Setter Property="StrokeThickness" Value="1" />
    <Setter Property="AntiAliasing" Value="False" />
</Style>

<Style x:Key="SimpleFastMountainRenderableSeriesStyle" TargetType="SciChart:FastMountainRenderableSeries">
    <Setter Property="SeriesColor" Value="Black" />
    <Setter Property="AreaColor" Value="Black" />
</Style>

<Style x:Key="SimpleAxisStyle" TargetType="SciChart:AxisBase">
    <Setter Property="FontSize" Value="14" />
    <Setter Property="FontWeight" Value="Normal" />
    <Setter Property="TitleFontSize" Value="14" />
    <Setter Property="TitleFontWeight" Value="Bold" />

    <Setter Property="TickTextBrush" Value="Black" />
    <Setter Property="MajorTickLineStyle">
        <Setter.Value>
            <Style TargetType="Line">
                <Setter Property="Stroke" Value="Black" />
                <Setter Property="StrokeThickness" Value="1" />
                <Setter Property="X2" Value="8" />
                <Setter Property="Y2" Value="8" />
            </Style>
        </Setter.Value>
    </Setter>
    <Setter Property="MajorGridLineStyle">
        <Setter.Value>
            <Style TargetType="Line">
                <Setter Property="Stroke" Value="Black"/>
                <Setter Property="StrokeThickness" Value="0.4"/>
            </Style>
        </Setter.Value>
    </Setter>
    <Setter Property="MinorGridLineStyle">
        <Setter.Value>
            <Style TargetType="Line">
                <Setter Property="Stroke" Value="Black"/>
                <Setter Property="StrokeThickness" Value="0.2"/>
            </Style>
        </Setter.Value>
    </Setter>
</Style>

Could you please please try to understand at least where this problem might be located, as its dificult for me to create a test project for this situation.

Im very thankful with your help and attention

Best Regards
Marcel

Images
  • You must to post comments
0
0

Hi Marcel,

Thank you for reporting, also for screenshots and observation, that helps a lot! We’ve created a task for investigation.

Could you try out this workaround – when there is no data in the set, set AutoRange to False and VisibleRange to 0..1.

This should help, please, let us know,

Best regards,
Yuriy

  • Marcel
    Hello Yuriy,thank you for the workaround, havent thought of that, I had done an ugly one (appending a fake value)have a great day
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.