User (Legacy) Posted May 13, 2005 Report Share Posted May 13, 2005 I am supplying data to my chart using the XmlDataProvider. I would like to use "data driven labels", but the examples all do this by setting the XValue property via the API. Is there a way to specify an XValue in XML, or some other way to make data driven labels work with the XmlDataProvider? Thanks, Dennis Link to comment Share on other sites More sharing options...
Software FX Posted May 13, 2005 Report Share Posted May 13, 2005 Yes. Use the DataType property prior to doing Data-Binding to tell Chart FX which column is to be used for X-Values. For example, if the X-Values come in the first column you must do: chart.DataType[0] = DataType.XValue; -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted May 16, 2005 Author Report Share Posted May 16, 2005 Francisco, That worked, with one problem. Every item in the series (i.e. every ROW element in the XML) now has a label, except for the first and last. What do I need to do to get labels on the first and last rows in the series (using WebForms)? Thanks, Dennis "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:ederuV8VFHA.2236@webserver3.softwarefx.com... > Yes. Use the DataType property prior to doing Data-Binding to tell Chart > FX which column is to be used for X-Values. For example, if the X-Values > come in the first column you must do: > > chart.DataType[0] = DataType.XValue; > > -- > Francisco Padron > www.chartfx.com > Link to comment Share on other sites More sharing options...
Software FX Posted May 18, 2005 Report Share Posted May 18, 2005 The labels are drawn at certain interval depending on the available space and the range. The labels will also start, by default, at a "nice" position. For example, if you have a label every 7 days, the labels will appear every Sunday, so if your first point is a Monday, you will get the label a little after that. You can turn off this behavior by doing: chart.AxisX.Style &= AxisStyle.AutoFirstLabel; Also, the last label will only be drawn (in the sample above) on a Sunday. To force the last label to show regardless of the other labels: chart.AxisX.Style |= AxisStyle.ShowEnds; -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.