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

0 votes
69 views

Hi, guys

Please take look at:
http://prntscr.com/gmmib5

So my question is

Is there a way to highlight a line of a gridlines to which the label belong? It can be a color changed or something similar that can be easily perceived by the user.

Best regards,
Sushynski Andrei

0 votes
0 answers
115 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
120 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,

1 vote
5k views

Hi There!

I created a UserControl that contains amongst other stuff a SciChartSurface. That control can be resized by the user to any size and is together with a lot of other stuff in a grid. The user can create a PDF of the whole whole grid using RenderTargetBitmap.

For the PDF the grid is resized by a factor x to get a higher resolution. All children of that grid are repostioned and so on and it all works. The Chart looking really good in the PDF, but the TickLabels are not resizing when changing the FontSize of their axis.

I tried to bind the FontSize in the TickLabelStyle to the Axis FontSize in XAML and tried to set the binding in code behind but I can’t get it to work.

Anyone got an idea how to set TickLabelStyle.FontSize the same as its axis FontSize?

UPDATE: Manged to set a binding in the TickLabelStyle to the upper NumericAxis, but now I have the tick labels font size changing itself between the new and old font size all the time until I it change back to the old font size.

Thanks for any help!

Showing 4 results
This template supports the sidebar's widgets. Add one or use Full Width layout.