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

[Graph] Adding a default x0 value

6 Answers 129 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 16 Sep 2019, 02:10 PM

I would like to add a gap in the graph based on my first series.

My data are in DateTime Scale so if my first series x0 value is e.g. 30.11.2019 next label steps are 30.12.2019, 30.01.2020 etc.

I want to set the x0 value to 01.11.2019 when my first series x0 value is 30.11.2019, 01.12.2019 when my first series of data is 11.12.2019 etc.

I notice there are 'maximum' and 'minimum' fields in label's properties but I can only enter there static date like 01.01.2010...

I would like to add there an expression: ' = "01/"+First(Fields.StartDate.Month)+"/"+First(Fields.StartDate.Year) ' but in response I show warning "Propery value is not valid".

Is there any way to solve my problem?

 

6 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 16 Sep 2019, 02:11 PM
I'm attaching an example of this.
0
Mark
Top achievements
Rank 1
answered on 16 Sep 2019, 02:14 PM
I would like to correct my first post. I don't want to change x0 value, just x0 LABEL.
0
Neli
Telerik team
answered on 19 Sep 2019, 11:12 AM

Hello Grzegorz,

If I understood correctly, you want to display always the first day of the month on the  Date Time Scale axis (e.g. 01.01.2010 instead of 30.01.2010). You can set the Date Time Scale axis -> Scale -> BaseUnit property to Months. It will define the interval between the points on the axis based on the first day of the month. You may also want to set PossitionMode property to OnTicks. Check the attached report where the approach is demonstrated. 

Setting 'maximum' and 'minimum' values of the graph properties can be achieved through Bindings of the Coordinate system. For additional information, visit How to: Use Bindings to Control the Coordinate System Properties article.

Regards,
Neli
Progress 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
Mark
Top achievements
Rank 1
answered on 26 Sep 2019, 08:29 AM

That's not my case. 

I have 10 projects with start date and end date. When start date of first project is 26.09.2019 the graph's x axis start exactly in this day.

When Base Unit is set to Days and Label and Major Steps are Months, next steps are like 26.10.2019, 26.11.2019.

I want to change the x0 of the graph based on the earlier start date of the projects. For example one of my project starts 26.09.2019 and other later, I want to set x0 of the graph to 01.09.2019 (x0 data point is still 26.09.2019) and next label and major steps to months (01.10.2019, 01.11.2019). How to achieve this?

I was looking for binding for this but unfortunately I didn't find 'Maximum' or 'Minimum' property path in the edit bindings window.

Sorry for my vague description of the problem in the first post.

0
Mark
Top achievements
Rank 1
answered on 26 Sep 2019, 08:33 AM

Oh my fault, I was searching bindings in Data of the graph not Coordinate Systems.

I see now there is XAxis.Scale.Minimum binding. I will try achieve this with selected binding.

0
Mark
Top achievements
Rank 1
answered on 26 Sep 2019, 09:01 AM

Ok I solved my problem. I'm sharing the solution if anyone would have the same issue.

1. Order the data source query by StartDate ASC.

2. Add the 'XAxis.Scale.Minimum' binding in CoordinateSystems properties: '= Fields.StartDate.Month+"/01/"+Fields.StartDate.Year'

3. Set the Base Unit to Days and Major and Label Units to Months. (XAxis->Scale)

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