I am working with the OilAndGasExample solution from the customer examples. I want to take all the charts in the vertical chart section and display them horizontally. I am having a problem with the legends, which must be displayed on their side. As an example, I have added a RenderTransform to the resistivity legend, which provides the proper orientation. My problem is that the width and height no longer match the space allotted next to the chart. I assume I have to reverse how the width and height are bound. How do I do that?
<Grid x:Key="ResistivityChartAxisLegend" Style="{StaticResource AxisLegendGridStyle}" RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<RotateTransform Angle="-90"/>
</Grid.RenderTransform>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Line Grid.Row="1" Grid.ColumnSpan="2" Stroke="OrangeRed" X1="0" X2="1" Stretch="Fill" StrokeThickness="1" StrokeDashArray="5,5"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="0" HorizontalAlignment="Left" Style="{StaticResource AxisLegendTextBlockStyle}"/>
<TextBlock Grid.Row="2" Grid.ColumnSpan="2" Text="AVRG 40" HorizontalAlignment="Center" Style="{StaticResource AxisLegendTextBlockStyle}"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="1" HorizontalAlignment="Right" Style="{StaticResource AxisLegendTextBlockStyle}"/>
<Line Grid.Row="3" Grid.ColumnSpan="2" Stroke="DeepSkyBlue" X1="0" X2="1" Stretch="Fill" StrokeThickness="2"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="0" HorizontalAlignment="Left" Style="{StaticResource AxisLegendTextBlockStyle}"/>
<TextBlock Grid.Row="4" Grid.ColumnSpan="2" Text="RESISTIVITY" HorizontalAlignment="Center" Style="{StaticResource AxisLegendTextBlockStyle}"/>
<TextBlock Grid.Row="4" Grid.Column="1" Text="1" HorizontalAlignment="Right" Style="{StaticResource AxisLegendTextBlockStyle}"/>
</Grid>
- Stephen Painchaud asked 8 months ago
- last edited 8 months ago
- You must login to post comments
Hi Stephen,
Thank you for your inquiry.
Please accept my apologies for such a delayed response.
We reviewed the provided details, and it appears to be a purely WPF question. You need to change the layout to achieve the desired appearance.
Unfortunately, as this doesn’t directly involve customizing SciChart controls, your inquiry falls outside our support scope.
Thank you for your understanding.
Kind regards,
Lex S., MSEE
SciChart Technical Support Engineer
- Lex answered 7 months ago
- You must login to post comments
Please login first to submit.

