Jump to content
Software FX Community

Dynamically creating ChartFX in pure C#.Net


Aps.com

Recommended Posts

It is possible to dynamically create the chartfx object and use it outside of a aspx page with c#.net?  In our environment we are not using ASP.NET to produce ASPX pages we are using C#.NET producing dlls that generate webcontent and pass it along to a content manage called Eprise.

 

any help would be greatly appreciated.

 

Link to comment
Share on other sites

In order for us to provide you with useful information you need to take the time to explain exactly what you need. These one line generic questions do not have enough information for us to act on them.

"A sample for creating and rendering a chart" says nothing.I can only come up with equally generic answers that are obvious, for example:

Creating a chart:

Chart chart = new Chart();

Rendering a chart: to what? Image? HTML?

chart.RenderContents(....)

or

chart.Export(...)

 

Link to comment
Share on other sites

sorry I did not provide enough details.  What we have is a somewhat unique situation.  we are not using standard Asp.net which produces .Aspx pages, we are using C# that will grab data from a sql server database and do some other manipulations then output it to a standard html page.

so for example we will execute a function on our website that will invoke a dll that will grab data, format it and them do a response.write to a html page.

it's our understand that ChartFX is a server control that requires a webform as a container in order for it to be used.  It is our hope that we have a misunderstand and that we can invoke the ChartFX object via it's API and dynamically create, render it to an html page since our enviroment and content management software does not allow nor support the use of .NET webforms.  if you need additional information please let me know.

 thanks for your assistance as we try to determine if your product will in our unique environment.

Link to comment
Share on other sites

Yes, you can render charts from any .NET code not necessarily an ASP.NET page. Chart FX does not require the WebForms platform to run.

You can create a chart like you create any object, customize it and then call RenderControl which will write a tag to an HTML writer.

Notice that since the chart is rendered as either an <IMG> or an <OBJECT> tag, the browser will need to go back to the server to actually grab the contents. Besides RendeControl the Chart class provides another method called RenderToStream that provides more control.

Some functionality like AJAX interactivity requires the WebForms structure, however, it is not the first time I hear of somebody using our software in a situation like the one you describe, we have many customers that have used Chart FX in similar environments where the charts are not generated from a WebForm.

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.

×
×
  • Create New...