Jump to content
Software FX Community

Saving of scale maximum value


User (Legacy)

Recommended Posts

One of my users created a constant line at say $30 million in charges.

Their current data is only at 8 million right now so she is setting the

scale's maximum property to $35 million and then she is able to see the

constant line. The issue is that the maximum value does not seem to be

saving along with the chart definition because every time the data is

refreshed the maximum is set to the maximum value of the charges. Is there

something that I need to do to save/load the maximum value from the chart

definition?

Thanks

Dan Reber

Link to comment
Share on other sites

> The issue is that the maximum value does not seem to be

> saving along with the chart definition

I'm not sure I understand this. When you say "saving" what do you mean ? are

you saving the chart to a file ?

Setting:

AxisY.AutoScale = false

Will prevent the chart from touching the scale as new data is passed,

however,when you set new data to the chart, unless you do ResetScale, the

Min and Max will only be adjusted UP to fit new points if necessary. They

will never be adjusted down. The only exception to this is when Stacked

charts. Is your chart Stacked ?

--

FP

Software FX

Link to comment
Share on other sites

Here is that code that I use to save a chart definition:

mChart.FileMask = FMASK_ALL

mChart.Export CHART_CFXOLEFILE, sPath

When the user wants to re-run a chart definition with new data I use:

mChart.Import CHART_CFXOLEFILE, sName

to load the chart definition.

I then create an ado recordset and pass it to the chart:

<snip>

CfxData.ResultSet = rsChartData

SetChartFields 'sets up the axies on the chart

mChart.GetExternalData CfxData

mChart.RecalcScale

Since I am using "mChart.RecalcScale" is that why the scale is changing?

Makes sense now that I think about it. How about if I remove that line and

have a button that will recalc the scale whenever the user clicks it. Would

that work?

Thanks

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:g9qw4pyxEHA.3492@webserver3.softwarefx.com...

> > The issue is that the maximum value does not seem to be

> > saving along with the chart definition

>

> I'm not sure I understand this. When you say "saving" what do you mean ?

are

> you saving the chart to a file ?

>

> Setting:

>

> AxisY.AutoScale = false

>

> Will prevent the chart from touching the scale as new data is passed,

> however,when you set new data to the chart, unless you do ResetScale, the

> Min and Max will only be adjusted UP to fit new points if necessary. They

> will never be adjusted down. The only exception to this is when Stacked

> charts. Is your chart Stacked ?

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

ok, thanks.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:yrrpGa1xEHA.1120@webserver3.softwarefx.com...

> Ok. Now I understand.

>

> By default, GetExternalData will Reset the chart scale. To prevent this

and

> keep the scale read from the file do:

>

> chart.DataStyle = chart.DataStyle or CHART_DS_NOMINMAX;

>

> PRIOR to calling GetExternalData.

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...