The problem with displaying Bar chart (Graph)

2 posts, 0 answers
  1. Anton
    Anton avatar
    1 posts
    Member since:
    Feb 2008

    Posted 22 Dec 2014 Link to this post

    I need to the Report Graph object displayed correctly at any data.
    If a lot of data that establish the minimum size for each bar or auto change the size of the graph depending how much data. If the text can not fit you crop or change the angle of the text. Now I can not even develop it because classes like a Telerik.Reporting.Processing.Grpah is internal.

    In your examples, each graph receives static settings. I attached screenshot and my test code https://dl.dropboxusercontent.com/u/15543358/WindowsFormsApplication1.zip


    Help me pls.
  2. Ivan Hristov
    Admin
    Ivan Hristov avatar
    204 posts

    Posted 23 Dec 2014 Link to this post

    Hello Anton,

    We examined the code you've provided and found that your report is not displayed because the field values you want to show on your Y axis (Duration) have a constant value of 0. Once you provide some other values for the Duration field, the graph will display the bar series.

    Also we noticed that you have set the Minimum and Maximum of the Y axis scale to 1 and 2 respectively, which implies that the shown value should be of a floating point type, but in your TimeEntries class you have declared the Duration field as integer. This might be intentional, but the resulting bar chart will have only two types of bars, which doesn't seem very useful.

    We're not sure that rotating or cropping the axis labels would be the best solution when there is not enough space to be displayed, although some charting engines use such an approach. We've provided couple of options to help you in such scenarios, like LabelAngle, MajorStep, LabelStep and others, that can be adjusted prior to processing the graph, if needed.

    The Telerik.Reporting.Processing.Graph class is internal because it is not intended to be modified during processing. All the needed modifications should be performed on the Telerik.Reporting.Graph instance, which represents the item definition.

    Please find attached your example with the above fixes applied and see if it suits your needs.

    Regards,
    Ivan Hristov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top