I have a chart that is pulling data from a web service. That data has Dates in it, and if I use that date object as a label, the chart think's it's in GMT time and then changes the hours to match the local time. In my case, I'm in Central Time Zone, so it's 6 hours off from GMT, so it subtracts 6 hours from the ReadingDate and displays it as 6 hours off. Is there any way to stop the label formatting from changing the datetime?
$("#ChartContents").kendoChart({
theme: $(document).data("kendoSkin") || "default",
dataSource: App.ChartDataSource,
title: { text: "Energy Usage In Days", visible: false },
seriesDefaults: { type: "line" },
series:
[
{ type: "line", field: "kWh", name: App.CurrentDeviceName, axis: "WattAxis", color: "#FF9900" },
{ type: "line", field: "kWh2", name: App.CurrentDeviceName2, axis: "WattAxis", color: "#339900" },
],
categoryAxis: {
labels: { rotation: -90, dateFormats: { minutes: "HH:mm", hours: "HH:mm", days: "ddd, MMM d", months: "MMM yyyy", years: "yyyy" } },
type: "Date",
field: "ReadingDate",
baseUnit: App.DayChartBaseUnit,
majorGridLines: { visible: false }
},
valueAxis: [{ name: "WattAxis", title: { text: "kWh" }, min: 0, color: "#FF9900" }],
tooltip: { visible: true, format: "{0:N0}", template: "Date: #= dataItem.DisplayDate # <br />kWh 1: #= dataItem.kWh # <br />kWh 2: #= dataItem.kWh2 #" },
legend: { position: "bottom" }
});