Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

.NET

Charting: Fast and Efficient


The Results

With the review complete and our software successfully released, Nevron Chart for .Net satisfied all of our needs and wants with flying colors.

  • Nevron is licensed per developer with no royalties on distribution to customers in either a Windows Forms or web application setting.
  • We were able to create charts by easily dropping Chart objects on the ASP.NET designer, or create them programmatically for our background threads. For example, see Listing One, which generates a funnel chart.
  • Nevron is one of the fastest charting engines on the market, easily meeting our needs
  • All major chart types are included. (We're still trying to think of some ways to use some of the nice visualizations like funnel charts in our applications.)
  • The rendering quality is very good and controllable. It is easy to tune the engine to the specifications we need.
  • True 3D charts are supported, as well as some nice "middle of the road" options that use drop-shadowing and textures to add a nice stand-out effect to 2D charts.

// Portions of this code were obtained from Nevron LLC 

public string GenerateFunnelChart()
{
 Size imageDimensions = new Size(640, 480);
 string filename = Guid.NewGuid().ToString("n") + ".jpg";
 string relativeFilename = "~/App_Data/Temp/" + filename;
 string physicalFilename = 
    Server.MapPath(relativeFilename);

 NLicense license = new NLicense(NEVRON_LICENSE_KEY);
 NLicenseManager.Instance.SetLicense(license);
 NLicenseManager.Instance.LockLicense = true;

 using (NChartControl chartControl = new NChartControl())
 {
     chartControl.Settings.RenderDevice = 
        RenderDevice.OpenGL;

     // Add a Header
     NLabel header = chartControl.Labels.AddHeader
        ("Sample Funnel Chart");
     header.TextStyle.FontStyle =
        new NFontStyle("Verdana", 20, FontStyle.Italic);

     // Add a legend
     NLegend legend = chartControl.Legends[0];
     legend.SetPredefinedLegendStyle
        (PredefinedLegendStyle.BottomRight);

     // Setup chart 
     NFunnelChart chart = new NFunnelChart();
     chart.LightModel.SetPredefinedLightModel
        (PredefinedLightModel.SoftFrontal);
     chart.Projection.SetPredefinedProjection
        (PredefinedProjection.Orthogonal);
     chart.Projection.Elevation = 4;
     chartControl.Charts.Clear();
     chartControl.Charts.Add(chart);
// Add a new Funnel Series to chart
     NFunnelSeries funnel = 
        (NFunnelSeries)chart.Series.Add(SeriesType.Funnel);
     funnel.BorderStyle.Color = Color.LemonChiffon;
     funnel.Legend.DisplayOnLegend = legend;
     funnel.Legend.Mode = SeriesLegendMode.DataPoints;
     funnel.DataLabelStyle.Format = "<percent>";

     funnel.Values.Add(20.0);
     funnel.Values.Add(10.0);
     funnel.Values.Add(15.0);
     funnel.Values.Add(7.0);
     funnel.Values.Add(28.0);

     funnel.Labels.Add("Awareness");
     funnel.Labels.Add("First Hear");
     funnel.Labels.Add("Further Learn");
     funnel.Labels.Add("Liking");
     funnel.Labels.Add("Decision");

     funnel.FillStyles[0] =
        new NColorFillStyle(Color.FromArgb(169, 121, 11));
     funnel.FillStyles[1] =
        new NColorFillStyle(Color.FromArgb(157, 157, 92));
     funnel.FillStyles[2] =
        new NColorFillStyle(Color.FromArgb(98, 152, 92));
     funnel.FillStyles[3] =
        new NColorFillStyle(Color.FromArgb(111, 134, 181));
     funnel.FillStyles[4] =
        new NColorFillStyle(Color.FromArgb(179, 63, 92));

     chartControl.ImageExporter.SaveToFile(physicalFilename,
        new NSize(imageDimensions), 
           NResolution.ScreenResolution,
              new NJpegImageFormat());
   }
   return physicalFilename;
}
Listing One

Sources at Nevron also inform me that they will be coming out with a gauge component soon. Assuming they use similar licensing terms to what they currently have, it should fill yet another void for software development.

While negatives are few and far between, two are worth mentioning.

During the last three years, Nevron's object model has undergone substantial change, and we sometimes found ourselves upgrading only to find that there were several breaking changes. That said, every change has been an improvement and that trend appears to have stabilized over the course of the last year. This is most likely due to growing pains as their product has become more broadly adopted by the marketplace.

Another possible negative is that user forum participation is pretty scarce. This could be due to the responsiveness of the Nevron staff because it's sometimes easier to just ask them directly and get answers than to post. They have never been anything but extremely helpful in our communications with them. Still, an active and communicative user base is a valuable resource for developers and a sign of healthy growth.

Conclusion

Nevron Chart for .Net continues to meet our needs. The evaluation process gave me the opportunity to talk to Nevron about some new things they have coming down the pipe as well.

Features such as the new gauge component and coming enhancements to Nevron Chart for .Net are exciting to us and give us reason to trust Nevron's commitment to build upon and improve its products.

We look forward to seeing how these new developments can help us make SmarterMail and SmarterStats even better.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.