We have created a Custom Series and we now need to create a Custom Legend.
We would like to be able to define a Template to allow customizing it in different ways. But I am don't know how to accomplish this.
We want to put our own control inside the legend. How can we do it?
Hello Dzyann,
Are you looking to change the entire legend or just customize the individual legend items?
Here is an example of using the LegendItemTempalte to customize individual legend items:http://es.infragistics.com/samples/wpf/data-chart/legend-item-template
Let me know if you have any questions.
Hi Michael,
What we are trying to do is to create a Legend similar to the Scale Legend for our Custom Series. We just want to customize the Legend for that kind of series, we would like to be able to use the normal/defualt legends for the other kind of series.
Our Custom Series is similar to a HighDensity Series, basically has lots of points, but with different colors on a (HSV) interpolated scale, we want to show that scale.
The LegendItemTemplate doesn't seem to be the way to go.
Can you give us any advice?
Dzyann,
It would be helpful if you could please provide and attach a mock up of your requirement here to this thread.
1. By default, custom series does not appear in the legend because the LegendItemTemplate is null by default.
2. Scale Legends are currently supported by Bubble Series only.
Let me know if you have any additional questions or concerns.
I think the code snippet is missing?
Kind regards,
Dzy
Thanks! Yes that is what I wanted to know, we the second point I was just trying to validate that the whole Legend visualization was up to me and not influenced by the Infragistics Legend logic at all.
That will do.
1. "I checked your solution and what I infer is that there is no way in Infragistics to achieve what I need, am I correct?"
A. Yes you are correct. This sample demonstrates the best possible approach to use a scale legend with a custom series since the only supported series to use the legend internally is Bubble Series.
2. The sample isn't using a XamDock, which isn't required, and you only require to set the Horizontal/Vertical alignment properties on the controls accordingly to position the legend on the window. The Legend is a UserControl and should be capable of docking as expected.
Please clarify your requirements or issues your having if you need further assistance. Otherwise let me know if you have any additional questions.
Sorry I didn't answer before but we were handling another issue. Thanks for taking the time to build the example.
I checked your solution and what I infer is that there is no way in Infragistics to achieve what I need, am I correct?
I saw you created a CustomLegend control, but it has nothing to do with the internal classes of Infragistics, and in your example shows over the Chart, because of the way you have the <Grid>, but I you can't use the XamDock attached properties to set the legend postion, like: ig:XamDock.Edge="OutsideLeft" ig:XamDock.VerticalDockAlignment="Center" ig:XamDock.HorizontalDockAlignment="Center". Am I Correct?
I attached a new sample based on that of our Custom Series sample which has a fully customizable scale-based legend. Please review it and if you require any additional clarification or have any questions please let me know.
Sadly, I can not give you our Custom Series, because of Copyright restrictions.
But, maybe we can use the example provided by Infragistics. If you check out the Infragistics Sample solution you will find a Custom Series the ContuourAreaSeries.
They use it to draw some area stuff, with different colors. I think those colors represent height/depeth, like in a map. Lets say there were way more colors. Something similar to this: https://www.bigelow.org/virtual/hi_lo_topo.jpg
There different colors represent different height and depth.
So, how could I create a legend, similar to the scale legend, that went from the minimum depth represented in my graph, to the maximum height, so the person looking at the chart could use it as a reference.
Similar to this: https://themappingnetwork.files.wordpress.com/2011/05/3d-lake-map1.jpg
And to this: http://www-udc.ig.utexas.edu/people/staff/lisa/scripts/bathy/bathy.jpg
As you can see in one graph there are discrete values and in the other is a continues gradient.
We want to achieve something similar to that, how would you do it? (You dont have to tell us how to create the color gradient, we can create that, we just dont how to put it inside an Infragistics Legend)
Thanks!