in

C1 Community

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

Help in generating Line Graph guys....

Last post 01-14-2008 2:06 PM by C1_GregL. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-07-2008 12:35 AM

    • ryan15
    • Not Ranked
    • Joined on 12-28-2007
    • Posts 5

    Help in generating Line Graph guys....

    Please help me guys in generating the line graph codes, i need a monthly sales report in 3 years. thanks in advance.

  • 01-07-2008 1:23 AM In reply to

    Re: Help in generating Line Graph guys....

    You can refer to the code below to create the line chart in code:
     
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim xp() As String = {"RX1", "RX2", "RX3", "RX4", "RX5"}

    Dim yp() As Single = {0, 1, 2, 3, 4}

    Dim Y1p() As Single = {2, 4, 6, 8, 10}

    Dim y2p() As Single = {1, 3, 5, 7, 9}

    With Me.C1WebChart1.ChartGroups.ChartGroupsCollection(0).ChartData.SeriesList(0)

    .X.CopyDataIn(xp)

    .Y.CopyDataIn(yp)

    End With

    With Me.C1WebChart1.ChartGroups.ChartGroupsCollection(0).ChartData.SeriesList(1)

    .X.CopyDataIn(xp)

    .Y.CopyDataIn(Y1p)

    End With

    With Me.C1WebChart1.ChartGroups.ChartGroupsCollection(0).ChartData.SeriesList(2)

    .X.CopyDataIn(xp)

    .Y.CopyDataIn(y2p)

    End With

    End Sub

    End Class

    Regards,

    Patrick

    <ryan15> wrote in message news:200868@10.0.1.98...

    Please help me guys in generating the line graph codes, i need a monthly sales report in 3 years. thanks in advance.



    http://helpcentral.componentone.com/cs/forums/p/73950/200868.aspx#200868

  • 01-07-2008 3:29 AM In reply to

    • ryan15
    • Not Ranked
    • Joined on 12-28-2007
    • Posts 5

    Re: Help in generating Line Graph guys....

    how can i define the legend? coz i wanna display the legend by year?

  • 01-14-2008 2:06 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 394

    Re: Help in generating Line Graph guys....

    >> how can i define the legend? coz i wanna display the legend by year?

    The easiest way to add a legend is through the design Wizard  (select "Wizard..." below the properties window).  From there you simply click Next, and check the box that says Legend.  Enter the legend title into the text box.  Then you click Next again and you can set the labels of each data series to display in the legend. 
    In code you can access the legend and more properties through C1WebChart1.Legend.

    Hope that helps,
    Greg L

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