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

0
0

Dear all,

if you look at the attached picture from your samples, we can see that the Y axis values a from 6 to – 6.

My customer feature request is asking to provide 2 text box field on the chart menu button to control the Min an max value .

For exemple if the user define as Max value of 4 and Min value of – 4, then when the user validate those entry :

Q1 : How to scale the Max and Min of the graph to those define value automatically ?

Q2 : Where and how to place those Min and max field in the chart button control ?

(see attached pictures)

Version
4
Images
  • You must to post comments
0
0

If you want to update the chart VisibleRange, you simply have to bind to YAxis.VisibleRange, or set the VisibleRange properties.

For example, in our Modify Axis Example we have the following code which binds two TextBoxes to a chart VisibleRange, so you can update the range by typing.

<TextBlock Text="VisibleRange.Min" />

<TextBox x:Name="minValueTb"
         Margin="3"
         LostFocus="OnMinYAxesChanged"
         Style="{StaticResource TextBoxStyle}"
         Text="{Binding ElementName=yAxis, Path=VisibleRange.Min, Mode=OneWay}" />

<ext:FlyoutSeparator />

<TextBlock Text="VisibleRange.Max" />

<TextBox x:Name="maxValueTb"
         Margin="3"
         LostFocus="OnMaxYAxesChanged"
         Style="{StaticResource TextBoxStyle}"
         Text="{Binding ElementName=yAxis, Path=VisibleRange.Max, Mode=OneWay}" />


....

 <s:SciChartSurface x:Name="sciChart" Grid.Column="1">

    <s:SciChartSurface.XAxis>
        <s:DateTimeAxis x:Name="xAxis" />
    </s:SciChartSurface.XAxis>

    <s:SciChartSurface.YAxis>
        <s:NumericAxis x:Name="yAxis" />
    </s:SciChartSurface.YAxis>


</s:SciChartSurface>

You can see the full source code the example on Github: View, Code Behind.

Best regards,
Andrew

  • You must to post comments
0
0

Dear andrew

I have downloaded the github exemple project and try to build it (either v5 or v4 of sample), but it fails with lot of errors regarding nugets package version and directx, types not found, etc….

Any idea what should I update ?

  • sc sc
    in VS2015 I cqn see for instance error as follow : Severity Code Description Project File Line Suppression State Error NuGet Package restore failed for project SciChart.Examples.ExternalDependencies: Unable to find version ‘4.2.6.10873’ of package ‘SciChart.DirectX’. C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Package ‘SciChart.DirectX.4.2.6.10873’ is not found on source ‘C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\’. https://api.nuget.org/v3/index.json: Package ‘SciChart.DirectX.4.2.6.10873’ is not found on source ‘https://api.nuget.org/v3/index.json’. . 0
  • Andrew
    Hi there, instructions are found in the readme at https://github.com/ABTSoftware/SciChart.WPF.Examples “NuGet feed setup”. Best regards, Andrew
  • sc sc
    thanks andrew
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.