Completed
Last Updated: 12 Feb 2020 11:52 by ADMIN
Eva
Created on: 04 Dec 2018 16:36
Category: Chart
Type: Bug Report
0
Scatter chart with Date axis not applying culture to weeks and days labels

Hello,

 

I noticed that the date format from my current kendo culture (fr-FR) is not applied properly for Weeks and Days units on xAxis labels of a chart with date axis.

 

I had to set the property DateFormats for Weeks and Days of my XAxis Labels to force the format (other units work fine) :

@(Html.Kendo.Chart(Of Models.DataViewModel).
        Name("chart").
        Title(typeMesure.GetDescription()).
        DataSource(Sub(dataSource)
                       dataSource.Read(Sub(read)
                                           read.Type(HttpVerbs.Get).Action("GetData","Data"))
                                       End Sub).
                                       Sort(Sub(sort) sort.Add(Function(m) m.Dt).Ascending())
                   End Sub).
                            Series(Sub(series) series.
                                        ScatterLine(Function(m) m.Dt, Function(m) m.Value).
                                        Markers(False).
                                        MissingValues(ChartScatterLineMissingValues.Gap).
                                        Color("#cb1d39").
                                        Tooltip(Sub(tooltip)
                                                    tooltip.Visible(True).
                                                    Template("Date : #= kendo.toString(value.x, 'dd/MM/yyyy HH:mm') # <br/>Valeur : #= kendo.toString(value.y, 'n3') #")
                                                End Sub)).
                            XAxis(Sub(xAxis) xAxis.Date().
                                        Min(Model.DateDebut).
                                        Max(Model.DateFin).
                                        Labels(Sub(labels) labels.DateFormats(Sub(dateFormats) dateFormats.Weeks("dd/MM").Days("dd/MM")))).
                            Panes(Sub(panes) panes.Add().Clip(False)).
                            Pannable(True).
                            Zoomable(Sub(zoomable)
                                         zoomable.Mousewheel(Sub(mousewheel) mousewheel.Lock(ChartAxisLock.Y)).
                                         Selection(Sub(selection) selection.Lock(ChartAxisLock.Y))
                                     End Sub))

 

Could you please fix this issue in a future version ?

Thanks and regards.

1 comment
ADMIN
Stamo Gochev
Posted on: 11 Dec 2018 08:59
Hi,

I tried to reproduce the issue using the provided code snippet but to no avail, so can you send me a fully runable project, which demonstrates it? Is the culture script loaded after all other scripts and before the chart is initialized?

Setting the "weeks" format option:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/xaxis.labels#xAxis.labels.dateFormats.weeks

in the following Dojo example:

https://dojo.telerik.com/uzImUgAb/4

also works as expected, so you can modify it, if that is easier for you.

Regards,
Stamo Gochev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.