I’m migrating from v3.1, and it seems that in a later version you’ve changed the default appearance of the rollover modifier tooltip container, to be a green rectangle with a dark drop shadow (which looks awful sorry!). I’ve created an “empty” container style to remove this, but it looks like I have to apply this to every renderable series, using “s:RolloverModifier.TooltipContainerStyle=…”.
I look after a large application with dozens of charting controls, not only in XAML but also created programmatically, so this approach to applying the container style is making life fairly difficult! Is there any way to globally apply this container style to all renderable series types? I’ve tried applying it to BaseRenderableSeries but it doesn’t work:
<Style TargetType="{x:Type s:BaseRenderableSeries}">
<Setter Property="s:RolloverModifier.TooltipContainerStyle"
Value="{StaticResource RolloverTooltipContainerStyle}" />
</Style>
(It does work if I use a concrete TargetType such as FastLineRenderableSeries, but this would mean creating a style for every type of renderable series used across the application).
Similarly, the rollover “point marker” now has a drop shadow. Is there a way to globally remove the drop shadow, but ensure that the ellipse continues to be coloured to match the series stroke colour?
- Andrew Stephens asked 2 years ago
- You must login to post comments
This is the best I’ve been able to come up with in App.xaml, although it does mean adding a style for each concrete renderable series that I use in the application:
<Style x:Key="RenderableSeriesBaseStyle"
TargetType="{x:Type s:BaseRenderableSeries}">
<Setter Property="s:RolloverModifier.TooltipTemplate"
Value="{StaticResource MyRolloverTooltipTemplate}" />
<Setter Property="s:RolloverModifier.TooltipContainerStyle"
Value="{StaticResource MyRolloverTooltipContainerStyle}" />
<Setter Property="RolloverMarkerTemplate">
<Setter.Value>
<ControlTemplate>
<Ellipse Width="8"
Height="8"
Fill="{Binding Stroke, Converter={StaticResource colorToBrushConv}}"
StrokeThickness="0" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type s:FastLineRenderableSeries}"
BasedOn="{StaticResource RenderableSeriesBaseStyle}">
</Style>
<Style TargetType="{x:Type s:FastBandRenderableSeries}"
BasedOn="{StaticResource RenderableSeriesBaseStyle}">
</Style>
Hopefully you might have some other suggestions…
- Andrew Stephens answered 2 years ago
- You must login to post comments
Please login first to submit.