Aps.com Posted March 25, 2008 Report Share Posted March 25, 2008 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. Quote Link to comment Share on other sites More sharing options...
Frank Posted March 25, 2008 Report Share Posted March 25, 2008 Yes, you can render charts from any .NET code not necessarily an ASP.NET page. Some functionality like AJAX interactivity though requires the WebForms structure. Quote Link to comment Share on other sites More sharing options...
Aps.com Posted March 25, 2008 Author Report Share Posted March 25, 2008 is it possible to provide some examples? thanks Quote Link to comment Share on other sites More sharing options...
Frank Posted March 25, 2008 Report Share Posted March 25, 2008 An example of what exactly? Quote Link to comment Share on other sites More sharing options...
Aps.com Posted March 25, 2008 Author Report Share Posted March 25, 2008 I would like an example of creating and rending a chart with chartfx in C#. Quote Link to comment Share on other sites More sharing options...
Frank Posted March 26, 2008 Report Share Posted March 26, 2008 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(...) Quote Link to comment Share on other sites More sharing options...
Aps.com Posted March 26, 2008 Author Report Share Posted March 26, 2008 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. Quote Link to comment Share on other sites More sharing options...
Frank Posted March 27, 2008 Report Share Posted March 27, 2008 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. Quote Link to comment Share on other sites More sharing options...
Aps.com Posted March 27, 2008 Author Report Share Posted March 27, 2008 great thanks, now that I believe you understand what we are looking to do can you provide some basic examples of doing that for both and image as well as an object? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.