Jump to content
Software FX Community

Clear/Reset All Properties


User (Legacy)
 Share

Recommended Posts

Hi

I am currently creating ChartFX object using Session variable which close

whenever a Session ends. However, the properties that are set for the

initial chart keep residing in regardless of setting the .ClearData,

.ClearLegend, .ClearLabels properties whenever a new or subsequent chart is

plot. Is there anyway to rectify this problem?

Thanks & Regards,

Dillon

Link to comment
Share on other sites

The problem here is "What is a Default Chart". Is it the chart that you had

at design time ? is it the chart that resulted after running your

initialization code ? Is it a Default Chart like the one you obtain right

after doing new Chart ?

Because of these ambiguities, there is no function that will restore the

chart to a "Default" state.

If you want to start with a brand new chart, you should simply crate a new

one (chart = new Chart()), if you want to go back to a "Default" state, what

you need to do is to save that state into a file or memory stream and

retrieve it later on.

Use the Export and Import methods to save and restore a previously saved

chart.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Hi,

I think there is some misunderstanding here. I never mention anything

about a Default Chart. What I meant was the use of ASP Session variable to

create ChartFX object instead of using local declared variable, somehow hold

on to some chart's properties. For example, I have a chart which is my first

chart that requires two Axies (Primary/Secondary) to display. Thus, I set my

first series to primary axis and second series to secondary axis. It turns

out well. However, for my second chart which only requires one Axis

(Primary) to display. It displays two Axes instead. (Please note that I am

using Session Variable to create ChartFX object and closes or set to nothing

only when Session ends. In other words, the Session Variable are shared

among all charts.)

Thanks & Regards,

Dillon

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

news:SCm9LmDtDHA.3512@WEBSERVER1...

> The problem here is "What is a Default Chart". Is it the chart that you

had

> at design time ? is it the chart that resulted after running your

> initialization code ? Is it a Default Chart like the one you obtain right

> after doing new Chart ?

>

> Because of these ambiguities, there is no function that will restore the

> chart to a "Default" state.

>

> If you want to start with a brand new chart, you should simply crate a new

> one (chart = new Chart()), if you want to go back to a "Default" state,

what

> you need to do is to save that state into a file or memory stream and

> retrieve it later on.

>

> Use the Export and Import methods to save and restore a previously saved

> chart.

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Dear Dillon,

I don't think I'm clear yet on this situation. Here is what I got:

You have TWO separate session variables containing a chart object and you

are saying that properties are migrating from one to the other ?

Session variables are handled by IIS not by us, it is impossible that we are

copying properties from one chart to the other, there is simply no code in

Chart FX that would do that.

I think you might be using the SAME variable and therefore you are getting

all these properties carried over.

Anyway, if this is not the case, please provide with a sample ASP(s) page

that reproduces the problem so that we can understand what's going on.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Hi,

Thanks for your reply. Firstly, I will like to apologise for some

misunderstanding cause from my past posting. Secondly, I will like to

highlight again that only ONE Session Variable is used for creating ChartFX

object across all charts. In this way, I understand that the properties will

be carried over. However, by closing the Session Object and re-create it for

each and every chart will solve the problem. But what really concern me is

to RESET all properties using a SINGLE Session Object before actually

working on each specified chart and close the Session object whenever a

Session ends.

Thanks & Regards,

Dillon

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

news:0p$HWJCuDHA.3512@WEBSERVER1...

> Dear Dillon,

>

> I don't think I'm clear yet on this situation. Here is what I got:

>

> You have TWO separate session variables containing a chart object and you

> are saying that properties are migrating from one to the other ?

>

> Session variables are handled by IIS not by us, it is impossible that we

are

> copying properties from one chart to the other, there is simply no code in

> Chart FX that would do that.

>

> I think you might be using the SAME variable and therefore you are getting

> all these properties carried over.

>

> Anyway, if this is not the case, please provide with a sample ASP(s) page

> that reproduces the problem so that we can understand what's going on.

>

> --

> FP

> Software FX, Inc.

>

>

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...