|
trackBoxLegend |
Posted by Olya on Nov-11-2021 18:52 |
|
Hello. I am using MultiChart. I need icons from the legend to be displayed in trackBoxLegend, but when using multichart, it is no longer displayed. Why?
I am using winform c#
string legend = "<*block,bgColor=eeeeee,edgeColor=eeeeee,margin=5*><*font,underline=1*>" + s + "<*/font*><*br*>"
+ String.Join("<*br*>", (string[])legendEntries.ToArray(typeof(string))) + "<*/*>";
|
Re: trackBoxLegend |
Posted by Peter Kwan on Nov-12-2021 20:39 |
|
Hi Olya,
In the sample code, the legend icon is obtained using "dataSet.getLegendIcon()". The icon obtained this way is only valid on the chart object (which should be an XYChart) that provides the dataSet. It cannot be used on another chart, including the MultiChart.
Instead of dataSet.getLegendIcon(), may be you can try to use a colored box as the icon, like:
string legendIcon = "<*img=@Square,size=8,color=" + dataSet.getDataColor().ToString("x") + "*>";
You may simply replace dataSet.getLegendIcon() with legendIcon in the code.
Regards
Peter Kwan |
|