Super 2d/3d Graph Library

Enhance your .NET application adding nice charts within minutes! Save time and money!


Example 41: Using Hatch Styles in Bar charts (C#)


Hatch styles are very useful when you don't/can't want use colors (eg. monochrome printers):

Steps to run this sample:

1. Create a new Windows application project (C#) and name it Tutorial41_HatchStyles.

2. Add Super 2d/3d Graph Library to the toolbox pallete and drag a chart to Form1. Name the Chart object "g".

3. Copy and paste de following code:

 
 


Form Code


using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Drawing.Drawing2D;
using
System.Text;
using
System.Windows.Forms;
using
Super2d3dGraphLibrary;

namespace Tutorial41_HatchStyles
{

  public
partial class Form1 :
Form
  {

    public
Form1()
    {
      InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {

      SeriesFactory
sf = new SeriesFactory
();  // Sample DATA
      sf.AddValue(10);
      sf.AddValue(15);
      sf.AddValue(20);
      sf.AddValue(25);
      sf.NewSerie();
      sf.AddValue(30);
      sf.AddValue(35);
      sf.AddValue(40);
      sf.AddValue(7);

      g.LicenseeIdentifier = "PROF";
      g.Style = STYLE2D3D.STYLE2D_BAR;
      g.Series = sf.Series;
      HatchBrush hb1 = new HatchBrush(HatchStyle.LightUpwardDiagonal, Color.White);
      HatchBrush
hb2 = new HatchBrush(HatchStyle.LargeGrid, Color.LightCyan);

      g.CastShadows = false;
      g.SeriesFillStyle = new HatchBrush[] {hb1, hb2};
      g.SeriesLegend = new String[] {"Source 1", "Source 2" };
      g.RefreshChart();
    }
  }
}


 

Result:


 

 

License & Purchase Info


Current version: 14

Super 2d/3d Graph Library is available as:
-Standard License (99€)
-Premium License (149€)
-Enterprise License (299€)

Click here for more details & purchase

Contact Info


Feel free to contact us
for questions related to any of our products or custom .Net development. We usually respond in the same labor day.

Software Siglo XXI

Main support service: support@softwaresigloxxi.com

Sales and other enquiries: contact@softwaresigloxxi.com