in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

How to put a chartlabel inside the chartData column for specific series

Last post 04-24-2008 4:58 PM by C1_DaveT. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-16-2008 1:10 AM

    How to put a chartlabel inside the chartData column for specific series

    for example, I have a stacked bar chart with 4 series in it. I need to add a number chartlabel inside each chartdata column for each series.

    which property of chartlabel should I set?

    Help!!

  • 04-17-2008 2:10 PM In reply to

    Re: How to put a chartlabel inside the chartData column for specific series

    Hi
     
    Following code (Sample attached) shows how to add ChartLabels to each point of all the series in a chartgroup. I suppose this is what you are looking for.
     

    Dim Point As Integer

    Dim Series As Integer

    For Point = 0 To 4

        For Series = 0 To 3

             With Me.C1Chart1.ChartLabels.LabelsCollection.AddNewLabel()

               .Text = "This is a label"

               ..Style.ForeColor = Color.Black

                ..AttachMethod = C1.Win.C1Chart.AttachMethodEnum.DataIndex

                ..AttachMethodData.GroupIndex = 0

                ..AttachMethodData.SeriesIndex = Series

               ..AttachMethodData.PointIndex = Point

                .Offset = 10

               .Connected = True

                .Visible = True

                .Compass = C1.Win.C1Chart.LabelCompassEnum.North

            End With

        Next

    Next

    Regards

    Dave

     
     
    <NZbeny99> wrote in message news:203920@10.0.1.98...

    for example, I have a stacked bar chart with 4 series in it. I need to add a number chartlabel inside each chartdata column for each series.

    which property of chartlabel should I set?

    Help!!



    http://helpcentral.componentone.com/cs/forums/p/74972/203920.aspx#203920

  • 04-17-2008 10:44 PM In reply to

    Re: How to put a chartlabel inside the chartData column for specific series

    I have attached a picture of my stack bar chart. And the position I want to place the label is the the "center" of each ChartData column, so that the customer knows how much orders for that specific series on specific period.

    But right now I only use offset -1, so the label is right aligned.

    Is there easy way other than calculate the center point of the column?

    Many Thanks,

    Ben

  • 04-24-2008 4:58 PM In reply to

    Re: How to put a chartlabel inside the chartData column for specific series

    Hi Ben
     
    It seems calulating the center point will be required but, you may try setting the ChartLabel's Compass property to C1.Win.C1Chart.LabelCompassEnum.West (although it will be same as setting Offset to -1). Else use the Location property.
     
    Regards
    Dave
    <NZbeny99> wrote in message news:204022@10.0.1.98...

    I have attached a picture of my stack bar chart. And the position I want to place the label is the the "center" of each ChartData column, so that the customer knows how much orders for that specific series on specific period.

    But right now I only use offset -1, so the label is right aligned.

    Is there easy way other than calculate the center point of the column?

    Many Thanks,

    Ben



    http://helpcentral.componentone.com/cs/forums/p/74972/204022.aspx#204022

Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.