Autoscaling date or time on X-Axis of line chart

J

jtertin

I have an OWC v10 line-type chart which is pulling data from a record
set using the following code:

'POPULATE RECORD SET
Dim con As Object
Dim ChartRecordset As New ADODB.Recordset
Dim MaxDate As Date
Set con = Application.CurrentProject.Connection
ChartRecordset.Open "SELECT * from [ChartData]", con, adOpenStatic
Set ChartSpace1.DataSource = ChartRecordset

'SET CHART DATA
ChartSpace1.Charts(0).Type = c.chChartTypeLine
ChartSpace1.PlotAllAggregates = c.chPlotAggregatesSeries
ChartSpace1.SetData c.chDimCategories, c.chDataBound, "dtDateTime"
ChartSpace1.SetData c.chDimValues, c.chDataBound,
Array(ChartRecordset.Fields.Item(2).Name,
ChartRecordset.Fields.Item(3).Name,
ChartRecordset.Fields.Item(4).Name)

There will be logic added later to allow for any sized record set to
be fed to the form (array of columns will be dynamic).

The problem I am having is that this data set has more than a hundred
data points in it. The X-Axis is set to a DateTime column of the data
set. I would like the times displayed on the X-Axis to be scaled so
they do not print on top of eachother, which I would think the control
would be smart enough to do, but it does not. How can I achieve this?

Thanks for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top