This is a migrated thread and some comments may be shown as answers.

Telerik Graph space between "X" axis

7 Answers 335 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Benjamin
Top achievements
Rank 1
Benjamin asked on 04 Apr 2016, 02:06 AM

Hi telerik.

I have a trouble i want to set dinamyc the space between vertical line,  the "X" axis it´s category scale , "Y" axis Numeric ,  

cin you help me with a little code ?

i want to use a binding, it´s possible?

7 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 04 Apr 2016, 02:55 PM
Hello Benjamin,

In general, the graph item does not grow in width, it is the Plot area that is updated automatically based on the number of slots that will be visualized. In result, the size of a slot depends on the number of CategoryGroups (elements on the X axis), which can be changed by:
  1. Changing the width of the Graph item.
    This can be done via binding to the item's Width property as well. Please note that the Graph item's data is not available to base the binding to a field, but you can use the container's data object if it has the information what should be the size of the item (How to use the ReportItem.DataObject property in expressions).
  2. Controlling the number of slots by filtering the CategoryGroups>grouping>Filters.
  3. By combining the visualized data, which can be achieved by adding ToggleVisibilityAction on CategoryGroups - How to: Add Drilldown action to the Graph item.


I hope the provided information is helpful.

Regards,
Stef
Telerik
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
0
Benjamin
Top achievements
Rank 1
answered on 04 Apr 2016, 10:47 PM
ok thank you for the information , i can get it with scale logartitmyc ´in x axis?? , my graph is line chart , but i cant get the result , any example telerik team ?? =)
0
Stef
Telerik team
answered on 07 Apr 2016, 03:44 PM
Hello Benjamin,

The type of scale should be considered with the used data for the Graph item. If you have a numerical value for the Graph item's CategoryGroups grouping, you can set the corresponding axis' Scale to be a LogarithmicScale - How to: Change the Axis Scale. More axes settings can be found in Axis.


A step by step tutorial how to create a Line chart is available in How to: Create Line Chart.

Regards,
Stef
Telerik
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
0
Benjamin
Top achievements
Rank 1
answered on 15 Apr 2016, 07:31 AM

HI Telerik i have a problem I print the graph (attachment)  but i don now how can i do to custom the label , the values for x axis it´s

  var l_Escala = new Dictionary<string, decimal>();
            l_Escala.Add("3\"", 75);
            l_Escala.Add("2\"", 50);
            l_Escala.Add("1 1/2\"", 37.5m);
            l_Escala.Add("1\"", 35);
            l_Escala.Add("3/4\"", 19);
            l_Escala.Add("3/8\"", 9.5m);
            l_Escala.Add("No. 4", 4.75m);
            l_Escala.Add("No. 10", 2);
            l_Escala.Add("No. 20", 0.85m);
            l_Escala.Add("No. 40", 0.425m);
            l_Escala.Add("No. 60", 0.250m);
            l_Escala.Add("No. 100", 0.150m);
            l_Escala.Add("No. 200", 0.075m);

 

ths x value iits the value and i wnat to print in the x axis then value dictionary how can i get it??

0
Stef
Telerik team
answered on 15 Apr 2016, 01:52 PM
Hello,

With a LogarithmicScale you can provide format for the displayed values through the Graph>CoordinateSystems>XAxis>LabelFormat, where labels will be treated as numbers.

If you want to display the custom labels, you can add another LineSeries with Y value set to zero, and then:
  • Make the data point labels visible - Graph>Series>DataPointLabelStyle>Visible.
  • Set value to be displayed by data point labels - Graph>Series>DataPointLabel.
  • Hide the line - Graph>Series>LineStyle>Visible property.
  • The legend item can be hidden through the Graph>Series>LegendItem>Style>Visible property.

More formatting settings can be found in the Formatting a Graph help section.

The attached TRDX file can be previewed with the Standalone Report Designer of Telerik Reporting Q1 2016, where the report illustrates the above suggestions.

Regards,
Stef
Telerik
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
0
Benjamin
Top achievements
Rank 1
answered on 15 Apr 2016, 09:15 PM

It´s work for me but i have 3 problems can you helpe i  attacj the image 

 

1.- I need ti put the label x axis bellow the x axis 

2.- I need the vertical line separator 

3.- I need remove the seprator of the axis "X"

0
Stef
Telerik team
answered on 20 Apr 2016, 04:14 PM
Hello Benjamin,

In the latest Telerik Reporting Q1 2016 Sp1 internal build v10.0.16.325, there is a new feature of numerical scales - Datapoint Ticks, that will let you add ticks and gridlines on the desired locations.


In previous versions.

Gridlines are rendered per point on the axes. In this case points are calculated automatically based on the LogarithmicScale settings like Step, Minimum and Maximum. If you want to hide the gridlines, please check Formatting a Graph: Gridlines.

The ticks on the X axis are the calculated points on the axis, based on the LogarithmicScale settings like Step, Minimum and Maximum. The axis MajorTickMarkDisplayType determines how and if ticks will be added on the axis.

The data point labels belong to the line series covering the x axis (Y=0). To let the Graph item render them below the axis, set the YAxis>Scale>Minimum to -200 for example. This will cause the plot area to expand below the X axis. Then set the LineSeries>DataPointLabelAlignment to Below.


The modified report in the attachment can be checked in the Standalone Report Designer of v10.0.16.325.

Regards,
Stef
Telerik
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
Tags
General Discussions
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Stef
Telerik team
Benjamin
Top achievements
Rank 1
Share this question
or