Jump to content
Software FX Community

Saving of scale maximum value


User (Legacy)
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...