Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
How can I get the Label value for the Legends in AXChart_ChartDrawItem?
posted
Hi, I have a ColumnLineChart where the colorModel is Custom. Also the chart have a legnd AXChart.ColorModel.ModelStyle = ColorModels.CustomSkin; // determines what area of data to associate the legend with AXChart.Legend.DataAssociation = Infragistics.UltraChart.Shared.Styles.ChartTypeData.ScatterData; AXChart.Legend.BorderStyle = LineDrawStyle.Solid; // sets the margins for the edges of the legend AXChart.Legend.Margins.Top = 2; AXChart.Legend.Margins.Bottom = 200; AXChart.Legend.Margins.Left = 20; AXChart.Legend.Margins.Right = 70; // sets the location of the legend AXChart.Legend.Location = Infragistics.UltraChart.Shared.Styles.LegendLocation.Right; // sets the percentage of the chart control the legend will occupy AXChart.Legend.SpanPercentage = 25; After giving the ScatterData now I am getting the legends of both the column and line in one box(which is good). But the legend text is displayed as Row#01, Row#02 and Row#03. So I want to have my own title. So please let me know how I can overrite the tile. I am using the ChartDrawItem for changing the colors of the chart. Thanks in Advance.
  • 28496
    Offline posted

     The chart is using row labels in the legend, and it appears there are none present in the data.  try adding a string column to your data source.