User (Legacy) Posted July 2, 2004 Report Share Posted July 2, 2004 Is there *any* way of making a chart reformat x axis date labels of an x/y line chart? I know they are dumb strings and the CustomFormat property should be set before loading the data, but... Link to comment Share on other sites More sharing options...
Software FX Posted July 2, 2004 Report Share Posted July 2, 2004 If the chart is an X/Y chart, you don't pass the dates as labels, you pass them as X-Values this way they will remain a date, as opposed to a "dumb string" and as such can be re-formatted. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted July 2, 2004 Author Report Share Posted July 2, 2004 > If the chart is an X/Y chart, you don't pass the dates as labels, you pass > them as X-Values this way they will remain a date, as opposed to a "dumb > string" and as such can be re-formatted. Could you show me how to do this in the case where data is being passed in like this: Chart.DataStyle |= DataStyle.DatesAsLabels; Chart.DataSource = table; where "table" is a DataTable object whose first column has the type DateTime. The first line seems to be necessary - if I remove it the x-axis appears to revert to some kind of default setting. thanks Rob Link to comment Share on other sites More sharing options...
Software FX Posted July 3, 2004 Report Share Posted July 3, 2004 You need to take out that line (Chart.DataStyle |= DataStyle.DatesAsLabels) that's precisely what you don't want. Instead, simply set the X-Axis format to date. You should get a chart with dates in the x-axis. If you don't please attach a screenshot of what you get along with a chart binary file that produced it. To save the chart to a binary file use the Export method. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.