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

X axis not displaying correct labels and can spacing be adjusted

8 Answers 446 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Tracy
Top achievements
Rank 1
Tracy asked on 09 Feb 2016, 08:31 PM

I have a report which has a table displaying data correlated by week, which has an issue I can't figure out - i'm guessing i have a setting wrong but nothing I've tried to change has seemed to fix it. Also wondering if spacing can be further adjusted. I've attached a file with examples of the output.

 The default is the previous four weeks of data, which renders fine (image one in attached). I would like wider bars on the graph,but I have the spacing slot count at 1 so if nothing else can be adjusted, we can live with it.

Image two shows only two weeks of data available, this is where I'd really like to see the columns closer, and the bars again a little wider. 

Image three is the real issue I need to solve. In this report, only one week of data is available. The bar renders correctly, but as you can see in the image, there are labels across the entire x axis, when there should be only one label for 2/6/2016. It appears the labels are for a year.

My settings for the x axis are:

Layout:

LabelPlacement - NextToAxis

MaxSize - empty

MinSize - empty

Size - empty

Title Placement - Centered

Misc:

LabelAngle - 45

LabelFormat - {0:d}

MajorTickMarkDisplayType - Cross

MinorTickMarkDisplayType - None

MultiLevelCategoryLabels - False

Scale - DateTime Scale

  BaseUnit - Auto

  CrossAxisPositions (Collection) - none set up

  LabelStep - 7

  LabelUnit - Days

  MajorStep - 7

  MajorUnit - Days

  Maximum - empty

  Minimum - empty

  MinorStep - 0

  MinorUnit - Auto

  PositionMode - OnTicks

  Reversed - False

  SpacingSlotCount - 1

 

Thanks for any help,

Tracy

  

8 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 12 Feb 2016, 04:11 PM
Hello Tracy,

For the scale properties such as BaseUnit, LabelUnit, LabelStep, SpacingSlotCount you can set expression values using bindings. This way the appearance of your graph item can change depending on certain rules.

Please see the demo attached for an example on how you can bind the properties of XAxis scale to expressions. You can set the bindings from Graph -> CoordinateSystems property. 
In this demo, we compare the endDate parameter with some value and based on result change the properties of the graph.

You can also use custom User Functions to calculate the date range the end-user choose (meaning EndDate - StartDate). Having the date range for the graph, you can set more precise rules for the scale properties.
You will also have to Extend the Standalone Designer to be able to use custom functions in it.

We hope this information will help. In case, you need further help please send us test data in the support ticket opened on the same question. This way we can test the specific scenario.

Regards,
Katia
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
Tracy
Top achievements
Rank 1
answered on 19 Feb 2016, 06:32 PM

Katia,

What version of the standalone report designer do I need to open the example? I get the following error:

Cannot read a document with the specified schema: http://schemas.telerik.com/reporting/2012/3.9.

You might be using an older version of the product.

 

I am using Reporting Q3 2015.

 

 

0
Katia
Telerik team
answered on 23 Feb 2016, 11:39 AM
Hello Tracy,

Please find attached the demo that can be opened with version Q3 2015.

Regards,
Katia
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
Tracy
Top achievements
Rank 1
answered on 24 Feb 2016, 08:31 PM

Hello Katia,

I appreciate the demo and I see what you are asking me to try. Unfortunately this doesn't seem to make a difference with the main issue I am having with the report. As I described above, when there is only one date to show, the bar renders correctly yet there are more labels than necessary across the x axis. Your example exhibits the same behavior with the default settings. As soon as you change the end date to include another data point, then it renders properly.  But if there is only one value to graph, there is one label for every month.

I did add the bindings and tried to fiddle with them (I use 7 as my LabelStep to get one label per week), but when I only have one data point, I get labels for the entire year. I only want a label for the one data point, is there any way to limit that? If I have a range, I get a label for each bar, which is what I want.

I'm sorry, but this seems like a bug in the graph to me. If I only have one bar to render, I should only get one label, not a years worth of labels. I'm not even sure how it is deciding the start and ending dates, as no matter which dates I select, my first date label is 7/2/2015 and my last date label is 6/30/2016.

0
Katia
Telerik team
answered on 29 Feb 2016, 09:48 AM
Hello Tracy,

In the demo attached, you can see the new functionality of the Graph item we added in our latest build 10.0.16.229 (download is available from your account -> Products and Subscriptions -> DevCraft Complete -> Download -> Reporting -> Latest internal builds).

Newly added DataPointTicks property allows you to display ticks and labels over the axes only when there is a corresponding data point. You can set this property from Graph settings -> CoordinateSystems -> XAxis/YAxis -> Scale.

Regards,
Katia
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
Tracy
Top achievements
Rank 1
answered on 07 Mar 2016, 03:54 PM

Hi Katia,

Thanks. I upgraded to the version you specified. I tried to look at your demo, but for some reason when I select the graphAxis2, the properties are not showing, it is only showing the GraphDemo properties. When I run the report with the defaults, there is an overflow error. If I change the end date to 1/9/2016, which would show two datapoints, I see there are the two, though I'm a little concerned as the first data point bleeds into the y axis and the second bleeds off the right side. I found this same behavior (both the overflow error and the bleeding of the datapoint next to the y axis) when I changed the DataPointTicks property in my report to True. I've attached a picture of both your report and mine with this behavior. As you can see by my report (PolesByWeekByCrew) the bleeding over the y axis is much more distracting.

0
Katia
Telerik team
answered on 08 Mar 2016, 11:04 AM
Hi Tracy,

It seems like you are still using the version 10.0.16.204 (Feb 5, 2016). The error you described was present in that version and was fixed later in the internal build 10_0_16_229.

Make sure you downloaded this version from latest internal builds and installed it successfully.

Regarding the properties of XAxis, check if clicking on the XAxis or its labels will show the properties in the properties grid. You can also access the properties of XAxis from Graph -> CoordinateSystems -> CartesianCoordinateSystem -> XAxis.

Regards,
Katia
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
Tracy
Top achievements
Rank 1
answered on 08 Mar 2016, 03:38 PM

Katia,

Thanks, I'm sorry I didn't realize I didn't have the correct version. I have now updated my version and don't see the behavior I was with the axis and overflow errors.

Thanks for your help.

Tracy

Tags
Report Designer (standalone)
Asked by
Tracy
Top achievements
Rank 1
Answers by
Katia
Telerik team
Tracy
Top achievements
Rank 1
Share this question
or