Graphics Server Technologies: Graphs and Charts for the World
 

Gallery
Product Guide
Sample Code
New in 4.0
Widgets Edition
Support
Downloads
Order

Testimonials


"Anyway, just when I thought I had used or trialled every charting component in the known universe, Scoble brought my attention to yet another - Graphics Server .NET. These guys aren't marketing themselves aggressively enough, which is unfortunate as this is by far the most pleasant component I've used for a long time - dragging the individual elements of a chart into place is so much better than having to rely on trial and error as you set and reset layout properties until they're pixel perfect."

Ian Nelson Blog

Home / .NET Products

Graphics Server .NET 4.0

New features in Graphics Server .NET 4.0 include:

  • Data binding properties for Windows Forms and ASP.NET

    You can use new data binding properties to bind a chart to a data source at design-time. No code required! The new properties are:

    DataSource DataMember DataLabelField
    DataXField DataYField DataZField
    DataAngleField DataRadiusField DataOpenField
    DataHighField DataLowField DataCloseField

    The DataSource and DataMember properties work just as they do in standard Microsoft bound controls such as the DataGridView control. When you set the DataSource in the Properties window, you have immediate access to "Add New Data Source" dialogs. The remaining properties are for binding to individual fields or columns in the specified data source. Which properties you need to set is determined by the chart type.

    Design-Time Data Binding

    Setting the DataYField property at design time (thumbnail)

  • DataSourceDataProvider binds to data sources created in Visual Studio at design time

    You can tie into a data source that you have created in Design view, or to another data source already available, and can add extra series to the chart. The following code snippet shows how we would add two more series to the chart shown in the previous illustration.

    // Create new provider for our SalesPersonalSalesByFiscalYears data source.
    DataSourceDataProvider dsProv = new DataSourceDataProvider(this.vSalesPersonSalesByFiscalYearsBindingSource);
    // New series for field "2002"
    Series ser2002 = new Series("2002");
    ser2003.BindComponent(SeriesComponent.Y, dsProv, "2002");
    // New series for field "2003"
    Series ser2003 = new Series("2003");
    ser2004.BindComponent(SeriesComponent.Y, dsProv, "2003");
    // Add new series to chart
    this.gsNet2005WinChart1.Chart.AddSeries(ser2002);
    this.gsNet2005WinChart1.Chart.AddSeries(ser2003);
    // Refresh chart
    this.gsNet2005WinChart1.Chart.RecalcLayout();
    
  • DigitalClock Widget

    This new widget looks similar to a digital LED readout that displays numbers or roman characters. A typical use would be to display counters or date/time information.

    Digital Clock LED Widget

    DigitalClock widget

    The image shown above was created with the following code.

    // Local reference to the widget
    Widget widget1 = gsNetWinWidget1.Widget;
    // Create Digital Clock device
    DigitalClock clock1 = new DigitalClock();
    clock1.Size = new Size(widget1.Size.Width, widget1.Size.Height);
    clock1.Location = new Point(0, 0);
    clock1.Background.Color = Color.Black;
    // Color of illuminated (lit) numbers/letters
    // and un-illuminated (dim) numbers/letters.
    clock1.Lit.Color = Color.LimeGreen;
    clock1.Dim.Color = Color.FromArgb(30, 30, 30);
    // Outlines for each number/letter.
    clock1.LitOutline.Color = Color.Black;
    clock1.LitOutline.Thickness = 1;
    clock1.LitOutlineEnabled = true;
    clock1.DimOutline.Color = Color.Black;
    clock1.DimOutline.Thickness = 1;
    clock1.DimOutlineEnabled = true;
    // Allow for numbers & letters.
    clock1.DigitalMode = DigitalMode.AlphaNumeric;
    // Set text for digital clock
    DateTime curTime = DateTime.Now;
    clock1.Text = curTime.ToString("hh:mm tt");
    // Add clock to widget
    widget1.DeviceList.Add(clock1);
    // Refresh.
    gsNetWinWidget1.Invalidate();
    									
  • FunnelVertical chart type

    This new chart type is similar to a single-series stacked bar chart but looks like an inverted cone with a spigot at the bottom. You have full control over the gaps between funnel segments, the arc width of semi-circles, the placement of labels, and more.

    ChartType = FunnelVertical

    The FunnelVertical chart type is similar to a stacked percent bar chart

    The chart shown above was created with the following code:

    // Local chart reference.
    Chart cht = GSNetWinChart1.Chart;
    
    // Vertical Funnel chart.
    cht.ChartType = ChartType.FunnelVertical;
    
    // Chart title.
    cht.ChartTitle.Text = "Potential to Actual Customers";
    
    // Create new series data, add to chart.
    // Note for a Vertical Funnel the first data point should have the
    // largest value, the second data point should have the second largest,
    // value and so on.
    Series ser = new Series("Vertical Funnel");
    ser.SetValue(SeriesComponent.Y, 0, 383);
    ser.SetValue(SeriesComponent.Y, 1, 210);
    ser.SetValue(SeriesComponent.Y, 2, 152);
    ser.SetValue(SeriesComponent.Y, 3, 47);
    cht.RemoveAllSeries();
    int idx = cht.AddSeries(ser);
    
    // Set colors for each funnel slice.
    SeriesDrawing serDraw = cht.GetSeriesDrawing(idx);
    serDraw.SetDataPointMarkerFill(0, new Background(0, Color.Red, Color.Maroon, GradientType.HorizontalEdgesIn));
    serDraw.SetDataPointMarkerFill(1, new Background(0, Color.Blue, Color.DarkBlue, GradientType.HorizontalEdgesIn));
    serDraw.SetDataPointMarkerFill(2, new Background(0, Color.Orange, Color.OrangeRed, GradientType.HorizontalEdgesIn));
    serDraw.SetDataPointMarkerFill(3, new Background(0, Color.GreenYellow, Color.Green, GradientType.HorizontalEdgesIn));
    
    // Set labels on.
    serDraw.MarkerLabelsOn = true;
    serDraw.MarkerLabelProperties.CalloutOn = true;
    serDraw.MarkerLabelProperties.CalloutFillOn = false;
    
    // Set custom label percent text and label placement.
    cht.Grid.AxisFunnelVertical.FunnelVerticalLabelAlignment = FunnelVerticalLabelAlignment.LeftEdge;
    cht.Grid.AxisFunnelVertical.LabelPercentEnabled = true;
    
    // Set up legend, use a data point legend (versus a series legend).
    // Create custom text per point.
    cht.Legend.DataPointLegend = true;
    cht.Legend.BoxSize = new Size(15, 20);
    cht.Legend.BoxMode = LegendBoxMode.BoxesOn;
    cht.Legend.AutoTextColor = false;
    cht.Legend.TextFormat.Font = new Font(cht.Legend.TextFormat.FontFamilyName, 9.0F);
    cht.Legend.TextFormat.Font.Dispose(); // Recommended to call Dispose().
    string [] legendStrings = {"Awareness", "At Store/Website", "Sales Inquiry", "Purchase"};
    int totalPts = serDraw.GetSeries().DataPointCount(SeriesComponent.Y);
    for (int pt = 0; pt < totalPts; pt++)
    {
    	cht.Legend.SetUserLegendText(pt, legendStrings[pt].ToString());
    }
    
    // Set up how funnel looks (spigot at bottom).
    cht.Grid.AxisFunnelVertical.Spigot = 12;
    cht.Grid.AxisFunnelVertical.SmallEndSizePercent = 12;
    cht.Grid.AxisFunnelVertical.Gap = 5;
    cht.Grid.AxisFunnelVertical.ArcWidth = 18;
    
    // Refresh chart.
    cht.RecalcLayout();
    								
  • Smart tags for Visual Studio 2005

    Graphics Server now includes a set of controls designed specifically for Visual Studio 2005: GSNet2005WinChart for Windows Forms and GSNet2005WebChart for ASP.NET. Among other adaptations to the new development environment, the controls now have smart tags for quick access to key features.

    The control's smart tag in Design view

    Using the control's smart tag at design time

  • And much more....

Download the evaluation of Graphics Server 4.0 today and see how easy and powerful graphing can be.

What's new in Graphics Server .NET 4.0

This document details the new features and the bugs fixes within GS.NET 4.0.

Click the MS Word icon to view our Version 4.0 Features document. Or right-click the icon and choose "Save Target As..." to download and save the document.

What's in Graphics Server .NET 3.5

To see what has been added to our previous version Graphics Server .NET v3.5, please go here to see all the features of Graphics Server .NET 3.5.

    About Us      Contact      Privacy      Sitemap