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

CategoryAxis Min and Max range for Date in Line Chart

4 Answers 128 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jerson
Top achievements
Rank 1
Jerson asked on 07 Jul 2017, 05:02 AM

Hi,

How to set minimum and maximum date range in Line Chart categoryAxis?

Please see min and max in sample code:

 

},
                categoryAxis: {                    
                    min: new Date("6/7/17"),
                    max: new Date("7/7/17"),
                    //type: "date",
                    baseUnit: "days",
                    majorGridLines: {
                        visible: true
                    },
                    labels: {
                        rotation: 40,
                        padding: { right: 10 },
                        dateFormats: {
                            days: "M/d/yy"
                        },
                        step: step
                    }
                }
            });

 

I set it to static, but even if i set it thru var dynamically, same error happens. Please see attached file.

 

 

4 Answers, 1 is accepted

Sort by
0
Jerson
Top achievements
Rank 1
answered on 07 Jul 2017, 05:03 AM

Thanks in advance.

0
Jerson
Top achievements
Rank 1
answered on 07 Jul 2017, 05:03 AM
Thanks in advance.
0
Jerson
Top achievements
Rank 1
answered on 07 Jul 2017, 05:04 AM

Hope to hear from you.

 

Thanks in advance.

0
Daniel
Telerik team
answered on 10 Jul 2017, 07:32 AM
Hello,

The configuration looks correct and setting min and max should work for the categoryAxis - example. The error message indicates that the error is thrown during the series binding so could you provide the full chart configuration?

Regards,
Daniel
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Chart
Asked by
Jerson
Top achievements
Rank 1
Answers by
Jerson
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or