Jump to content
Software FX Community

Saving Formats


User (Legacy)

Recommended Posts

I have web pages that are used as "dashboards". I would like users to be 

able to change formatting on one of the charts and be able to apply those

colors and other chart formats to the rest of the charts on the page. I

would also like to be able to save these formats to a database or something

so that I can automatically apply these settings the next time they visit

the site. How can I save this data? I do not mind forcing the user to

manually invoke the save, but I still do not know how to accomplish this

with your webforms.

-Dan

Link to comment
Share on other sites

Check out the personalization feature in Chart FX. There are many options 

that you can use.

Personalization can be managed client-side or server side though the

Personalize event. When doing it server-side you have control of where the

chart template is stored (your own DB, file, etc.).

You can also implement this using your own UI and the Export and Import

methods.

--

FP

Software FX, Inc.

"Dan Miller" <danmiller78@hotmail.com> wrote in message

news:NmPHyiG5EHA.1580@webserver3.softwarefx.com...

>I have web pages that are used as "dashboards". I would like users to be

>able to change formatting on one of the charts and be able to apply those

>colors and other chart formats to the rest of the charts on the page. I

>would also like to be able to save these formats to a database or something

>so that I can automatically apply these settings the next time they visit

>the site. How can I save this data? I do not mind forcing the user to

>manually invoke the save, but I still do not know how to accomplish this

>with your webforms.

>

>

>

> -Dan

>

>

Link to comment
Share on other sites

Can you give some examples here or show me where this is documented. I tried 

a few things and could not get anything to work.

-Dan

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

news:eMdIRuf5EHA.1580@webserver3.softwarefx.com...

> Check out the personalization feature in Chart FX. There are many options

> that you can use.

>

> Personalization can be managed client-side or server side though the

> Personalize event. When doing it server-side you have control of where the

> chart template is stored (your own DB, file, etc.).

>

> You can also implement this using your own UI and the Export and Import

> methods.

>

> --

> FP

> Software FX, Inc.

> "Dan Miller" <danmiller78@hotmail.com> wrote in message

> news:NmPHyiG5EHA.1580@webserver3.softwarefx.com...

>>I have web pages that are used as "dashboards". I would like users to be

>>able to change formatting on one of the charts and be able to apply those

>>colors and other chart formats to the rest of the charts on the page. I

>>would also like to be able to save these formats to a database or

>>something so that I can automatically apply these settings the next time

>>they visit the site. How can I save this data? I do not mind forcing the

>>user to manually invoke the save, but I still do not know how to

>>accomplish this with your webforms.

>>

>>

>>

>> -Dan

>>

>>

>

>

Link to comment
Share on other sites

1) This is the chartfx.net.webforms newsgroup, so isn't that the only one 

that I could be asking about? Let me know if I am missunderstanding

something here.

2) Preferably my own since I may want to handle multiple charts at a time,

but using the toolbar would be OK if there is no other way.

3) They are not all exactly the same. Some formats such as backgrounds,

fonts, series colors will be the same for uniformity, but I have some bar

charts, some line graphs and a radar chart. Hopefully I will be able to

parse these settings and apply the formats that I decide should be

distributed to the other charts.

-Dan

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

news:x17V0z25EHA.1580@webserver3.softwarefx.com...

> 1) I assume you are using the .NET Client Component, right ?

>

>

> 2) What UI do you want to use to save your chart ? Do you want to use the

> Chart FX toolbar or your own UI ?

>

> 3) Do all the chat look the same or can each chart be customized

> differently ?

>

> --

> FP

> Software FX

>

Link to comment
Share on other sites

> 1) This is the chartfx.net.webforms newsgroup, so isn't that the only one

> that I could be asking about? Let me know if I am missunderstanding

> something here.

I didn't ask whether or not you were using the WebForms (Server-Side)

component was referring to the .NET Client part. The server component can

generate images (PNG, JPEG) or it can generate Active Chart using the .NET

Client component.

> 2) Preferably my own since I may want to handle multiple charts at a time,

> but using the toolbar would be OK if there is no other way.

Using Chart FX's UI is pretty simple:

1) Capture the Personalized event (Server-side) this event will be fired

whenever the user selects Save or Load from the personalization menu.

The Code in the event can be something like this:

private void Chart1_Personalized(object sender,

SoftwareFX.ChartFX.Internet.Server.PersonalizedEventArgs e)

{

switch (e.Action) {

case PersonalizedAction.Save:

Chart1.Import(e.Stream);

e.Stream.Position = 0;

// Save stream to DB or file (In this example I'm saving to a file)

System.IO.FileStream file =

System.IO.File.Create(@"d:\web\webapplication3\mychart.cfx");

byte [] data = new byte [e.Stream.Length];

e.Stream.Read(data,0,data.Length);

file.Write(data,0,data.Length);

file.Close();

break;

case PersonalizedAction.Load:

// Load Chart from File or DB using Import

Chart1.Import(FileFormat.Binary,@"d:\web\webapplication3\mychart.cfx");

break;

}

}

You can implement your own UI but it going to require some rather

complicated client-side scripting that will Export the chart (to an Xml is

probably the way to go here), send the contents back to the server and then

do something similar to what I did in the Personalized event.

3) You can use TemplateMask to control what gets saved in this file, check

out the docs for details.

--

FP

Software FX

post-2107-13922366079293_thumb.jpg

post-2107-13922377262561_thumb.jpg

Link to comment
Share on other sites

1) I am sorry for the confusion. I had said in my original post that the 

user would be customizing formats. If they were standard images then I would

have to write the code for every change that is made and therefore know the

formats and would have no need for an export. In short, I am using the .NET

client.

2) I had been working with your phone support as well and the issue with the

personalization event was that I needed full trust. That works OK now except

that I need to save each chart individually, which I am trying to avoid.

I was told that the export feature was not available on the client side, so

how would I export your charts to XML?

3) I will give that a shot.

--Thanks for your help

-Dan

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

news:cKMh2zQ6EHA.1580@webserver3.softwarefx.com...

>> 1) This is the chartfx.net.webforms newsgroup, so isn't that the only one

>> that I could be asking about? Let me know if I am missunderstanding

>> something here.

>

> I didn't ask whether or not you were using the WebForms (Server-Side)

> component was referring to the .NET Client part. The server component can

> generate images (PNG, JPEG) or it can generate Active Chart using the .NET

> Client component.

>

>> 2) Preferably my own since I may want to handle multiple charts at a

>> time,

>> but using the toolbar would be OK if there is no other way.

>

> Using Chart FX's UI is pretty simple:

>

> 1) Capture the Personalized event (Server-side) this event will be fired

> whenever the user selects Save or Load from the personalization menu.

>

> The Code in the event can be something like this:

>

> private void Chart1_Personalized(object sender,

> SoftwareFX.ChartFX.Internet.Server.PersonalizedEventArgs e)

>

> {

>

> switch (e.Action) {

>

> case PersonalizedAction.Save:

>

> Chart1.Import(e.Stream);

>

> e.Stream.Position = 0;

>

> // Save stream to DB or file (In this example I'm saving to a file)

>

> System.IO.FileStream file =

> System.IO.File.Create(@"d:\web\webapplication3\mychart.cfx");

>

> byte [] data = new byte [e.Stream.Length];

>

> e.Stream.Read(data,0,data.Length);

>

> file.Write(data,0,data.Length);

>

> file.Close();

>

> break;

>

> case PersonalizedAction.Load:

>

> // Load Chart from File or DB using Import

>

>

> Chart1.Import(FileFormat.Binary,@"d:\web\webapplication3\mychart.cfx");

>

> break;

>

> }

>

> }

>

> You can implement your own UI but it going to require some rather

> complicated client-side scripting that will Export the chart (to an Xml is

> probably the way to go here), send the contents back to the server and

> then do something similar to what I did in the Personalized event.

>

> 3) You can use TemplateMask to control what gets saved in this file, check

> out the docs for details.

>

>

>

> --

> FP

> Software FX

>

>

>

>

Link to comment
Share on other sites

> I was told that the export feature was not available on the client side, 

> so how would I export your charts to XML?

The Export/Import feature is available in the Client component, there is

however a glitch:

IE interacts with .NET Controls through COM and COM doesn't support method

overloading. the Export method has 4 overloads, to call them from COM you

have to use the following syntax:

chart.Export(...);

or

chart.Export_2(...);

or

chart.Export_3(...);

or

chart.Export_4(...);

Export_2 corresponds to Export(<FileFormat>,<FileName>);

--

FP

Software FX

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...