SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & 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!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

Hi,

I’ve noticed that when I use a custom pointmaker on a renderable series, the preview of the color of that series is missing from the legend of the graph. How can I make it show there? Do I need to update some private property with the “Fill/Stroke” color of the pointmaker?

Version
4.0
Images
  • You must to post comments
0
0

Hi Daniel,

Thanks for your question. There is the PointMarkerTemplate property. It is used to show a preview in a Legend. You have to set it to a ControlTemplate containing the desired preview.

Hope this helps!

Best regards,
Yuriy

  • You must to post comments
0
0

Hi,

Sounds great! How/Where do I find the default PointMarkerTemplates of SciChart? I’d like to just reuse the default one of the EllipsePointMarker.

  • You must to post comments
0
0

Hi Daniel,

They are pretty simple – just an appropriate shape or a Path. For example, this is the default style for the TrianglePointMarker:

    <Style BasedOn="{StaticResource DefaultPointMarker}" TargetType="pointMarkers:TrianglePointMarker">
    <Setter Property="PointMarkerTemplate">
        <Setter.Value>
            <ControlTemplate>
                <Grid>
                    <Polygon Width="{Binding DataContext.PointMarker.Width, RelativeSource={RelativeSource TemplatedParent}}"
                             Height="{Binding DataContext.PointMarker.Height, RelativeSource={RelativeSource TemplatedParent}}"
                             Fill="{Binding DataContext.PointMarker.Fill, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToBrushConverter}}"
                             Points="0,1 1,1 0.5,0 0,1"
                             Stretch="Uniform"
                             Stroke="{Binding DataContext.PointMarker.Stroke, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorToBrushConverter}}"
                             StrokeThickness="{Binding DataContext.PointMarker.StrokeThickness, RelativeSource={RelativeSource TemplatedParent}}" />
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

So you can do something like this on your side.

Best regards,
Yuriy

  • You must to post comments
0
0

Hi,

Ok thanks. I’ll try that. I was just wondering if there was a way to just use the exact same one as one of the default pointmarkers instead of having to create one myself.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.