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
1004
Legend problem on line chart
posted

i use following example on this page: http://help.infragistics.com/NetAdvantage/ASPNET/2009.1/CLR3.5/

to create line Chart but Legend ist empty. how i can display the legend?

Thanks

Parents
No Data
Reply
  • 2265
    posted

    Not too sure which example your looking at as only partial url.

    Are you binding the chart to a DataTable or creating a custom series?
    Did you add the chart with the Chart Wizard?
    Also, is there any data in the chart? 
    Is the legend drawn but there is no series data in it?

    This should display the legend:

    ultraChartData.Legend.Visible =

    True

    But you may have to add it manually with something like as follows for composite charts:

    Dim

     

    myLegend As New CompositeLegend()

    myLegend.ChartLayers.Add(cla)


    myLegend.Bounds = New
    System.Drawing.Rectangle(1, 83, 25, 17)
    myLegend.BoundsMeasureType = Infragistics.UltraChart.Shared.Styles.MeasureType.Percentage
    myLegend.PE.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient
    myLegend.PE.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal
    myLegend.PE.Fill = System.Drawing.Color.Transparent
    myLegend.PE.FillStopColor = System.Drawing.Color.Transparent

    myLegend.Border.Thickness = 0

     

    Me.UltraChart1.CompositeChart.Legends.Add(myLegend)

    You will need to add each chart layer to the legend manually in the highlighted code.

Children
No Data