Profile Picture

Programmatic Virtual Chart Construction and Image Save

Posted By Lee Borgea 11 Years Ago
Author
Message
Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Lee,

"I'm guessing that I can render the charts to a visible onscreen development control to get the chart configuration just so before switching to an offscreen rendition to file ~ but that I'll work out now I know I can achieve the system design goal."

Yes sure - the code remains unchanged whether you're working on WinForm application, chart image server, ASP.NET etc. - you just need to change the chart control object where you apply the changes to. If you meet any problems or have any questions just let us know...



Best Regards,
Nevron Support Team



Lee Borgea
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 2, Visits: 1
WOW (in 72 point, bold, red font).

Worked first time once I'd figured out the references. Thank you for your prompt and helpful response.

I'm guessing that I can render the charts to a visible onscreen development control to get the chart configuration just so before switching to an offscreen rendition to file ~ but that I'll work out now I know I can achieve the system design goal.

I'll work through your example code to get the content development start I need, then I need to talk to your marketing folks about bulk licensing.

Stay tuned and many thanks again, best regard Lee.


Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Lee,

There is no problem to use the control as an off screen chart generator - the following sample code shows how to achieve this:

using Nevron.Chart;
using Nevron.Chart.WinForm;
using Nevron.GraphicsCore;

....

   using (NChartControl chartControl = new NChartControl())
   {
    NChart chart = chartControl.Charts[0];
    NBarSeries bar = new NBarSeries();

    bar.Values.Add(10);
    bar.Values.Add(20);
    bar.Values.Add(30);

    chart.Series.Add(bar);

    chartControl.ImageExporter.SaveToFile("c:\\temp\\test.png", new NSize(400, 400), NResolution.ScreenResolution, new NPngImageFormat());
   }

Hope this helps - let us know if you meet any problems...

On a different note we recommend PNG format for raster generation as it results in more crisp images (JPEG uses image compression that decreases the quality of the image).



Best Regards,
Nevron Support Team



Lee Borgea
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 2, Visits: 1
Hi,
I’ve just downloaded an evaluation copy of Nevron Vision for .Net. My requirements are very simple (initially) but a forum search doesn’t return all of the answers.

Can anyone confirm that this doable:

I need to build a c#.net chart factory. The desktop application will use Nevron Vision to create charts and save them as jpg files. No user interface or interaction is needed and I don’t want to see the charts as they are created.

Once the chart jpgs are created they will be programmatically inserted as images with other data into a series of word documents.

So, doable ? And does anyone have pointers to creating a non displayable chart object ? I don’t need or want to use a chart control for this purpose – it’s just redundant.

I don’t mind battling with the library to get the charts I need but I do not want to invest time if the objective is beyond capabilities.

Thanks in advance, Lee.




Similar Topics


Reading This Topic