Hi Saravana
Pandian,Thanks for the video, it actually demonstrates the issue - please take
a look to the code especially to DataModel.cs file you will see that the first
point has date value - 2/1/2010 and the last point has - 6/1/2010 but in the
Video demonstration the first point has date value - 4/1/2010 and last point
has 8/1/2010. So chart displays DateTime for two days ahead. If you remove
LabelCreated event handler you will notice that it works correctly and as
expected - first point starts as 2/1/2010 and the last as 6/1/2010.
Regarding TimeZone issue - in order to see it you need to change DataPoint collection so that it should have Time value too. Currently it contains only Date and time as 00:00:00. You can replace your DataPoint collection with this code:
Data.Add(new ChartDataPoint(new DateTime(2010, 1, 02, 16, 10, 5), 25));
Data.Add(new
ChartDataPoint(new DateTime(2010, 1, 02, 16, 15, 6), 55));
Data.Add(new
ChartDataPoint(new DateTime(2010, 1, 02, 16, 20, 48), 30));
Data.Add(new
ChartDataPoint(new DateTime(2010, 1, 02, 16, 25, 12), 55));
Data.Add(new
ChartDataPoint(new DateTime(2010, 1, 02, 16, 30, 4), 40));
In the
above DataPoint collection the first point has DateTime value 2/1/2010 4:10:5
PM and the last point has DateTime value 2/1/2010 4:30:4. Now if you run with
code above you will get the following:
1) For
Kolkata(India) time zone - first data point's DateTime value will be displayed
as 4/1/2010 4:10:35 PM(2 days and 30 sec ahead)
2) For
Karachi(Pakistan) time zone - first data point's DateTime value will be
displayed as 4/1/2010 4:10:47 PM(2 days and 42 sec ahead)
3) For
London(UK) time zone - first data point's DateTime value will be displayed as
4/1/2010 4:11:03 PM(2 days and 58 sec ahead)
Note that
date still is for two days ahead but doesn't change when you change Time Zone
but time changes.
Thanks in
advance
Khasan
Any suggestions on how to implement this feature in Blazor? There doesn't seem to be a " LabelCreated " event.