User (Legacy) Posted May 18, 2005 Report Share Posted May 18, 2005 Hi there I have a value plotted over a date range. One value for each day of the month. There are no values for the weekends. My problem is that when I set the xvalue to be a datetime, Chart1.AxisX.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.DateTime Chart1.DataType(0) = SoftwareFX.ChartFX.DataType.XValue Chart1.DataType(1) = SoftwareFX.ChartFX.DataType.Value or Chart1.AxisX.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.DateTime Chart1.DataType(0) = SoftwareFX.ChartFX.DataType.Label Chart1.DataType(1) = SoftwareFX.ChartFX.DataType.Value it adds values for the weekends. And when I set it to use labels without SoftwareFX.ChartFX.AxisFormat.DateTime, I cant format the date labels properly. Is there a way to use the date values as the x-axis, but ignore the gaps for the weekends and still be able to format the lables as dates without resorting to things like changing your datasource? many thanks okkie Link to comment Share on other sites More sharing options...
Software FX Posted May 21, 2005 Report Share Posted May 21, 2005 What do you mean by "it adds values for the weekends" ? If you do: Chart1.DataType(0) = SoftwareFX.ChartFX.DataType.XValue You will get X-Values for each of your points, these X-Values will come from your data, if your data has weekends in it then the weekends will be plotted but we will not add anything to your data. The X-Axis will be formatted simply using a range, the range is continuous so the weekends are included in the range however if there is no data for weekends there will be no point for it. This is probably simpler to understand if you make the equivalence to the Y-Axis, the -Axis goes from 0 to 100 for example, however that doesn't mean that there are values for every possible number in this range. If you do: Chart1.DataType(0) = SoftwareFX.ChartFX.DataType.Label The X-Axis will be categorical and the dates from your data will be converted to strings and then displayed. Exactly ONE label for each record in your data. In this case if the data doesn't contain weekends, there is no way a weekend is going to show up as a label. Please check your data (e.g. attach your dataset to a datagrid) you may be passing incorrect data to the chart. -- Francisco Padron www.chartfx.com "okkie" <okkie@itenergy.net> wrote in message news:jo9prD8WFHA.2236@webserver3.softwarefx.com... > Hi there > > I have a value plotted over a date range. One value for each day of the > month. There are no values for the weekends. > > My problem is that when I set the xvalue to be a datetime, > > Chart1.AxisX.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.DateTime > Chart1.DataType(0) = SoftwareFX.ChartFX.DataType.XValue > Chart1.DataType(1) = SoftwareFX.ChartFX.DataType.Value > or > Chart1.AxisX.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.DateTime > Chart1.DataType(0) = SoftwareFX.ChartFX.DataType.Label > Chart1.DataType(1) = SoftwareFX.ChartFX.DataType.Value > > it adds values for the weekends. And when I set it to use labels without > SoftwareFX.ChartFX.AxisFormat.DateTime, I cant format the date labels > properly. > > Is there a way to use the date values as the x-axis, but ignore the gaps > for the weekends and still be able to format the lables as dates without > resorting to things like changing your datasource? > > > many thanks > okkie > > > > > > > ImageHolder.bmp ImageHolder.bmp Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.