How to create Graph without databinding?

4 posts, 0 answers
  1. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 06 Sep Link to this post

    Hi,

    When creating a report programmatically, using the old charts for reporting I could populate the data for the chart directly using eg. series.Items.Add(mydataitem) - this way I could build a chart by simply inserting data items manually without any datasource. I am now using the new Graph object and I cannot figure out how to dot his - is it even possible?

  2. Katia
    Admin
    Katia avatar
    299 posts

    Posted 06 Sep Link to this post

    Hi Al,

    Data items(Graph) are connected to the data via DataSource components. To arrange the data for the Graph, my recommendation is to use one of the available Graph Wizards.

    In case, you need to configure the Graph item programmatically check this kb article - Modifying or Creating a report at Run-Time.


    Regards,
    Katia
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 07 Sep in reply to Katia Link to this post

    Thanks Katia,

    From your reply and the articles you linked it would appear then that it is not possible to manually add items to a graph? (by items I mean data items eg. bars on a bar chart)

  5. Katia
    Admin
    Katia avatar
    299 posts

    Posted 07 Sep Link to this post

    Hello Al,

    Bars will be generated based on the expressions you specify in Graph's settings (for example for SeriesGroup.Grouping and BarSeries.X(Y) properties) and the data records retrieved for the Graph item.

    You can change the Graph's DataSource at run-time, however, adding bars manually will not be possible.

    You can also check the demo reports provided with Telerik Reporting installation ([installtion folder]\Telerik\Reporting [version]\Examples\CSharp(VB)) to see how they are generated in code-behind.


    Regards,
    Katia
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top