We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Date axis + StackingColumn type

Hi I want a chart with a datetime x-axis and ChartDateTimeIntervalType.Hours and with ChartSeriesType.StackingColumn 1. i want range from ''01/01/2006 00:00'' to ''01/02/2006 01:00'' i used this myChart.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(new DateTime(2006,1,1,0,0,0), new DateTime(2006,1,2,1,0,0), 1, ChartDateTimeIntervalType.Hours); I have points in hours from 01/01/2006 01:00 to 01/02/2006 00:00. I set range and then i see chart with last value (x axis) 01/02/2006 00:00 and i want last value 01/02/2006 01:00 (picture rangeX) When i set range with end value 01/02/2006 02:00 then range is correct what is wrong? 2. When i have XAxis DateTime type and series style = StackingColumn then series don''t paint correct (picture stackCol) When I set series style = StackingArea then series paint correct. I don''t understand why please help me thanks g.

range_colX.zip

2 Replies

GA garbika March 24, 2006 02:20 PM UTC

Hi i hope that I solved my problem with series style = StackingColumn; this code i used in my solution myChart.ColumnWidthMode = ChartColumnWidthMode.FixedWidthMode ; if (type == TypeInterval.Date) myChart.ColumnFixedWidth = 30; else myChart.ColumnFixedWidth = 1; is it ok??? But now I have two new problems 1. When you look at the chart you can see that the blue line (series measured) is not correct. It seems to me it connects the last value with the first. 2. when i have type = month (my enum) then last label of the x axis is not shown, but I know that it is set and when I''m zooming, the values on the right (last values) are not peinted correct is it because i changed the column width?? attached please find a file with codes, you know my application:) please don''t forget my question about range from my first message please help me thanks g.

Chart5.zip


GM Geetha M Syncfusion Team March 27, 2006 11:36 AM UTC

Hi, 1. To adjust the range please try resetting the maximum range in the cbMonth_CheckedChanged event as 02/01/2006. Previously, the maximum range was 01/31/2006 which is applied to the X Axis. So changing this will resolve the issue with ranges. 2. By replacing the condition (ifacDate)&&(facX<=0.25) and so column width of 5 will be applied only if both the conditions are satisfied. This problem can be solved when this condition is changed as (facX>facDate)||(facx<=0.25). Please find attached the sample with the above mentioned modifications. I hope this helps you. Chart.zip Thanks for your continued support to Syncfusion products. Regards, Geetha.

Loader.
Live Chat Icon For mobile
Up arrow icon