jayman18 Posted July 1, 2016 Report Share Posted July 1, 2016 Good morning, (1) for my application I want to change the marker within the legendbox to be a circle instead of a square. the chart c0 here is a pie chart. Unfortunatly my code is not working. Can you give me an advice? var ia = c0.getLegendBox().getItemAttributes(); var ial = ia.getItemList(c0.getSeries()); ial.setMarkerShape(cfx.MarkerShape.Circle); c0.getLegendBox().setVisible(true); (2) Is it possible to style a custom marker? like a triangle... (3) the circle marker should have no border. Is this possible? Quote Link to comment Share on other sites More sharing options...
0 JuanC Posted July 1, 2016 Report Share Posted July 1, 2016 (1) In a pie chart we do not show the collection of series in the legend box, instead we show the points which are represented in the API using the X axis, please change line 2 of your code as follows var ial = ia.getItemList(c0.getAxisX()); (2) This is not possible in the current build, we support templates in most elements (galleries, titles, etc.) so in our next build we will support templates for the markers in the legend box, note that the XML we use is based on XAML but I am afraid is not documented anywhere. In future builds you would use something like this ial.setMarkerShape(cfx.MarkerShape.Template); ial.setMarkerTemplate('<DataTemplate xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:sys="clr-namespace:System;assembly=mscorlib">' + '<DataTemplate.Resources>' + '<sys:Double x:Key="cfxOSW">1</sys:Double>' + '</DataTemplate.Resources>' + '<Viewbox ViewWidth="25" ViewHeight="25">' + '<Path Data="M12,0L24,24L0,24Z" Fill="{Binding Path=Fill}" Stroke="{Binding Path=Stroke}" />' + '</Viewbox>' + '</DataTemplate>'); (3) Same as 2, in future builds ial.setMarkerShape(cfx.MarkerShape.Template); ial.setMarkerTemplate('<DataTemplate>' + '<Ellipse Fill="{Binding Path=Fill}"/>' + '</DataTemplate>'); Regards, JuanC Quote Link to comment Share on other sites More sharing options...
Question
jayman18
Good morning,
(1)
for my application I want to change the marker within the legendbox to be a circle instead of a square. the chart c0 here is a pie chart.
Unfortunatly my code is not working.
Can you give me an advice?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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.