Jump to content
Software FX Community

Legend Marker size not matching Series Marker size

Darin Daubert

Recommended Posts

Hello,I'm setting the marker's size property in XAML and while the marker changes in the plot area, it is not changing in the Legend box.  Is there a custom template that I have to write or something to get the Legend marker size to match what I specified in the series?

 Series marker XAML:   <cfx:SeriesAttributes ItemsSource="{Binding Series}" Gallery="Line" BindingPath="LabResult" BindingPathX="ObservationDate">   <cfx:SeriesAttributes.Marker>   <cfx:MarkerAttributes Shape="Circle" Size="6" />   </cfx:SeriesAttributes.Marker>   </cfx:SeriesAttributes>LegendBox XAML:   <cfx:Chart.LegendBox>   <cfx:LegendBox Visibility="Hidden" DockPanel.Dock="Bottom" Background="#F0F0F0" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" FontSize="9">   </cfx:LegendBox>   </cfx:Chart.LegendBox>

I've attached an export of the graph to show what I mean.  Notice that the series circle marker is smaller than the one shown in the legend.  I'd like the legend to be smaller as well.

Thank-you in advance!Darin

Link to comment
Share on other sites

Our default behavior is only to use the marker size in the legend if there are more than 2 series using different marker sizes. You can customize the marker size used in the legend with this code

chart1.LegendBox.ItemAttributes[chart1.Series].MarkerSize =

new Size(6, 6);

Note that currently there is no way to accomplish this in XAML, we expect to support this in future builds.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...