Jump to content
Software FX Community

XValue in XML?


User (Legacy)

Recommended Posts

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

post-2107-13922366092361_thumb.png

post-2107-13922377278401_thumb.png

Link to comment
Share on other sites

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...