Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
410
Setting the X-Axis Min/Max Range for Date/Time Data
posted

Hi,

I am trying to specify that my X-Axis have a data type of Time. I also want to set the Min/Max ranges of the line series that are added to the chart. However, it appear that even though I specify the AxisDataType for the X-Axis, that the expected Min/Max range data type is double:

        AxisItem axisX = new AxisItem();

        axisX.OrientationType = AxisNumber.X_Axis;

        axisX.DataType = AxisDataType.Time;

        axisX.Labels.SeriesLabels.Visible = true;

        axisX.Labels.SeriesLabels.Orientation = TextOrientation.Horizontal;

        axisX.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.None;

        axisX.TickmarkStyle = AxisTickStyle.Smart;

       axisX.RangeMin = minXRange;

       axisX.RangeMax = maxXRange;

        axisX.RangeType = AxisRangeType.Custom;

 

Returns the ERROR: "Cannot implicity convert type 'System.DateTime' to 'double'

Any help is greatly appreciated. Ruben.

Parents
No Data
Reply Children