SharpPlot 3.71 User Manual: Getting Started

SharpPlot automated charting and reporting
Getting Started

SharpPlot is a professional charting and typesetting engine that produces high-quality graphs and reports in bmp, wmf, png, tiff, gif, vml, svg, pdf, ps, eps and xaml formats giving you the freedom to use the most appropriate display format for your applications. The design allows the programmer to create effective graphics with the bare minimum of coding.

Visit http://sharpplot.com/Download.htm to download the latest version.

SharpPlot is the latest in a family of tools from Causeway Graphical Systems Ltd., and is built on over 20 years experience helping developers build professional charts into their applications. We have many customers throughout the world using our charting software, including governments, police forces, international banks, international corporations, and many smaller website and systems developers.

Getting Started

Installing SharpPlot
SharpPlot is shipped both as a .net assembly and a Dyalog APL workspace, which can be downloaded it from http://sharpplot.com/Download.htm.
SharpPlot in different Languages
SharpPlot being delivered both as a .Net assembly and as an APL workspace, it can be used in many different languages. This tutorial shows how to write the same SharpPlot script in different languages (C#, VB/.Net, Dyalog APL/.Net, Dyalog APL).
Your first Chart
Let’s build a simple chart that will get you started with the SharpPlot class for charting.
Your first Report
Let’s build a simple report that will get you started with the SharpLeaf class for reporting.
Rendering Images
SharpPlot can generate the finished chart in any of five common vector formats (SVG, PDF, EPS, XAML, EMF) and any raster image format supported by the .net Bitmap class (PNG, JPEG, BMP, GIF, TIF).

Overview of capabilities

Its charting engine supports many chart styles including Bar charts, Box plots, Bubble charts, Cloud charts, Contour plots, Dial charts, Gantt charts, Histograms, Hi-lo close charts, Line graphs, Min-max charts, Network maps, Pie charts, Polar charts, Response plots, Scatter plots, Step charts, Tower charts, Trace charts, Kite charts, Venn diagrams, X bar charts, Triangle plots, and even simple Tables! The software can adapt the charts to the data being plotted, ensuring you always get clear charts with the minimum code.

Its reporting engine supports master page definitions, typesetting and flow control, tabulation of data, and various inclusions.

A common Document class allows you to aggregate charts and reports at the page level into more complex documents.

See also

See our website for more information.


SharpPlot 3.71 User Manual: Installing SharpPlot

Installing SharpPlot

SharpPlot is shipped both as a .net assembly and a Dyalog APL workspace, which can be downloaded it from http://sharpplot.com/Download.htm.

.net assembly version

The assembly is shipped as a single DLL, with accompanying XML documentation for use by visual development tools, ideal for use in your .net winforms and asp.net applications. All of the code is fully managed C# for the Microsoft.net 2.0 framework, and can even run on Mono – an open source version of the .net framework for Linux and Mac OSX. Bitmap and Metafile outputs are not supported under Mono – until they implement the GDI correctly...

APL workspace

SharpPlot is also available as a self-contained pure-APL workspace (sharpplot.dws), usable on all platforms supported by Dyalog (Windows, Linux, Mac...). Bitmap and Metafile outputs are not supported in pure-APL.

Of course the SharpPlot DLL, with its full capabilities and better performance, can be used directly from Dyalog APL through the .net bridge on Windows platforms.

Ease of use

Simply copy the files, and add it to your development project to make it available for use.

SharpPlot makes no registry entries on your machine, and never requires access to any data files. All communication with your application is handled via data (passed as arguments) and results from the various rendering methods.

See also ...

Getting Started | SharpPlot Tutorials | SharpLeaf Tutorials | SharpPlot in different Languages

Send comments on this topic
© Dyalog Ltd 2021


SharpPlot 3.71 User Manual: SharpPlot in different Languages

SharpPlot in different Languages

SharpPlot being delivered both as a .Net assembly and as an APL workspace, it can be used in many different languages. This tutorial shows how to write the same SharpPlot script in different languages (C#, VB/.Net, Dyalog APL/.Net, Dyalog APL).

Sample chart in C#

Here’s the code to produce that chart from C#. It can be used as a Rosetta stone for users trying to write scripts in other languages.

To build this project in Visual Studio, a few steps are required :

  • Create a Console C# project in Visual Studio
  • Add a reference to System.Drawing (Project → Add Reference... → .Net)
  • Add a reference to sharpplot.dll (Project → Add Reference... → Browse)
  • Paste the following code into your main .cs file
  • Build and run
 using System;
using System.Drawing;       // Requires adding a reference to System.Drawing to the C# project
using System.Drawing.Imaging;
using Causeway;             // Requires adding a reference to sharpplot.dll to the C# project

namespace MyNamespace
{
  class MyClass
  {
    static void Main(string[] args)
    {
        int[] data = {33, 18, 12, 10};
        int[] exp = {0, 0, 0, 20};
        string[] key = {"UK", "France", "Italy", "Ireland"};
        Color[] cols = {Color.Navy, Color.Maroon, Color.Teal, Color.Green};

        SharpPlot sp = new SharpPlot();                               // Use default size
        sp.Heading = "Sample pie chart";                              // Property
        sp.PieChartStyle = PieChartStyles.ValueTags;                  // Flag property with single flag
        sp.KeyStyle = KeyStyles.CenterAlign|KeyStyles.BottomAlign;    // Flag property with multiple flags
        sp.SetKeyText(key);                                           // Single-argument function
        sp.SetColors(cols); // Single-argument function
        sp.SetMargins(42, 48, 36, 18);                                // Multiple-argument function
        sp.DrawPieChart(data, exp);                                   // Multiple-argument function

        sp.SaveImage("samplepie.png", ImageFormat.Png);               // Save chart as PNG image at default size
        Console.WriteLine(sp.RenderSvg());                            // Output SVG image source to standard text stream
    }
  }
}

Sample chart in VB.Net

Here’s the same script in VB.Net. You can build it in a few steps :

  • Create a Console VB.Net project in Visual Studio
  • Add a reference to System.Drawing (Project → Add Reference... → .Net)
  • Add a reference to sharpplot.dll (Project → Add Reference... → Browse)
  • Paste the following code into your main .vb file
  • Build and run
 Imports System
Imports System.Drawing   ' Requires adding a reference to System.Drawing to the VB.Net project
Imports System.Drawing.Imaging
Imports Causeway         ' Requires adding a reference to sharpplot.dll to the VB.Net project

Module Module1
    Sub Main()
        Dim data As Integer() = New Integer() {33, 18, 12, 10}
        Dim exp As Integer() = New Integer() {0, 0, 0, 20}
        Dim key As String() = New String() {"UK", "France", "Italy", "Ireland"}
        Dim cols As Color() = New Color() {Color.Navy, Color.Maroon, Color.Teal, Color.Green}

        Dim sp As SharpPlot = New SharpPlot                                     ' Use default size
        sp.Heading = "Sample pie chart"                                         ' Property
        sp.PieChartStyle = PieChartStyles.ValueTags                             ' Flag property with single flag
        sp.KeyStyle = KeyStyles.CenterAlign+KeyStyles.BottomAlign               ' Flag property with multiple flags
        sp.SetKeyText(key)                                                      ' Single-argument function
        sp.SetColors(cols)                                                      ' Single-argument function
        sp.SetMargins(42, 48, 36, 18)                                           ' Multiple-argument function
        sp.DrawPieChart(data, exp)                                              ' Multiple-argument function

        sp.SaveImage("samplepie.png", ImageFormat.Png)                          ' Save the chart as PNG image at default size
        Console.WriteLine(sp.RenderSvg())                                       ' Output SVG image source to standard text stream
    End Sub
End Module

Sample chart in Dyalog APL/.Net

Because Dyalog has a .Net bridge, it can use sharpplot.dll directly, which is in the default Dyalog installation directory, and can be accessed by setting ⎕USING to ‘,sharpplot.dll’.

Refer to the Dyalog .Net Interface Guide if you need explanations about how to use .Net objects and pass arrays as arguments.

 ∇ {svg}←MyChart;⎕USING;data;exp;key;sp
  ⎕USING←'System.Drawing,system.drawing.dll' 'System.Drawing.Imaging' 'Causeway,sharpplot.dll'
  data←33 18 12 10
  exp←0 0 0 20
  key←'UK' 'France' 'Italy' 'Ireland'

  sp←⎕NEW SharpPlot                                 ⍝ Default size
  sp.Heading←'Sample pie chart'                     ⍝ Property
  sp.PieChartStyle←PieChartStyles.ValueTags         ⍝ Flag property with single flag
  sp.KeyStyle←KeyStyles.(CenterAlign+BottomAlign)   ⍝ Flag property with multiple flags
  sp.SetKeyText(⊂key)                               ⍝ Need to enclose the key vector because it is a single argument, rather than a list of arguments
  sp.SetColors ⊂Color.(Navy Maroon Teal Green)      ⍝ Need to enclose the vector because it is a single argument
  sp.SetMargins(42 48 36 18)                        ⍝ No need to enclose because the 4-item vector maps to 4 arguments
  sp.DrawPieChart(data exp)                         ⍝ No need to enclose here because the 2-item vector maps to 2 different arguments

  sp.SaveImage('samplepie.png' ImageFormat.Png)     ⍝ Save the chart as a PNG image, at default size
  svg←sp.RenderSvg ⍬                                ⍝ Return SVG image source
∇
See the
]chart
User Command for more samples, and a GUI interface to build chart scripts.

Sample chart in non-.Net Dyalog APL

Since Dyalog v14.0, SharpPlot is also shipped as a pure-APL workspace, than can be used on all platforms supported by Dyalog. All you need to do is to copy sharpplot.dws.

The main difference from using SharpPlot through the .Net bridge is the lack of support for raster graphics. Charts can be output only as SVG, PostScript or PDF (VML is deprecated and should not be used).

Because of the number of different classes provided by the sharpplot workspace, you probably want to bring them in a parent namespace for charting.

      ⎕CS 'Causeway' ⎕NS '' ⋄⎕CY 'sharpplot'   ⍝ copy all classes in a single namespace called "Causeway"

 ∇ {svg}←MyChart;data;exp;key;sp
  data←33 18 12 10
  exp←0 0 0 20
  key←'UK' 'France' 'Italy' 'Ireland'

  sp←⎕NEW SharpPlot                                 ⍝ default size
  sp.Heading←'Sample pie chart'                     ⍝ Property
  sp.PieChartStyle←PieChartStyles.ValueTags         ⍝ Flag property with single flag
  sp.KeyStyle←KeyStyles.(CenterAlign+BottomAlign)   ⍝ Flag property with multiple flags
  sp.SetKeyText(⊂key)                               ⍝ Need to enclose the key vector because it is a single argument, rather than a list of arguments
  sp.SetColors⊂Color.(Navy Maroon Teal Green)       ⍝ Need to enclose the vector because it is a single argument
  sp.SetMargins(42 48 36 18)                        ⍝ No need to enclose because the 4-item vector maps to 4 arguments
  sp.DrawPieChart(data exp)                         ⍝ No need to enclose here because the 2-item vector maps to 2 different arguments

  sp.SaveSvg(⊂'samplepie.svg')                      ⍝ SharpPlot/APL doesn't support raster graphics : SVG is the recommended way to export charts.
  svg←sp.RenderSvg ⍬
∇

See the #.Samples namespace in the sharpplot workspace for more example scripts.

Cross-platform charts in Dyalog APL

The best way to create cross-platform charts in Dyalog APL is to use the InitCauseway function. It will pick the .Net assembly if it’s available, else fall back to pure-APL SharpPlot.

It will initialise the argument namespace (current space if ⍬ is given), by creating a Causeway and a System.Drawing namespace there, so that code can be using interoperably on all platforms supported by Dyalog. The advantage over the previous strategies is that the namespace will be cluttered with fewer names (only Causeway, System and Drawing, rather than the whole list of structures used by Causeway).

However all structures will have to be fully qualified : structures from the Causeway assembly (all in this documentation) will have to be prepended with Causeway, and System.Drawing structures (Color, FontStyle) will have to be prepended with System.Drawing. That way the script will be completely cross-platform.

All you need to do to initialise the namespace once with:

    'InitCauseway' 'View' ⎕CY 'sharpplot'
    InitCauseway ⍬   ⍝ initialise current namespace

Then the same script as above is written as:

 ∇ {svg}←MyChart;data;exp;key;sp
    data←33 18 12 10
    exp←0 0 0 20
    key←'UK' 'France' 'Italy' 'Ireland'

    sp←⎕NEW Causeway.SharpPlot                        ⍝ default size
    sp.Heading←'Sample pie chart'                     ⍝ Property
    sp.PieChartStyle←Causeway.PieChartStyles.ValueTags         ⍝ Flag property with single flag
    sp.KeyStyle←Causeway.KeyStyles.(CenterAlign+BottomAlign)   ⍝ Flag property with multiple flags
    sp.SetKeyText(⊂key)                               ⍝ Need to enclose the key vector because it is a single argument, rather than a list of arguments
    sp.SetColors ⊂System.Drawing.Color.(Navy Maroon Teal Green)      ⍝ Need to enclose the vector because it is a single argument
    sp.SetMargins(42 48 36 18)                        ⍝ No need to enclose because the 4-item vector maps to 4 arguments
    sp.DrawPieChart(data exp)                         ⍝ Two arguments

    sp.SaveSvg(⊂'samplepie.svg')                      ⍝ SharpPlot/APL doesn't support raster graphics : SVG is the recommended way to export charts.
    svg←sp.RenderSvg ⍬                                ⍝ Return SVG image source
∇

See also ...

Getting Started | SharpPlot Tutorials | SharpLeaf Tutorials | Installing SharpPlot | SharpPlot Members


SharpPlot 3.71 User Manual: Your first Chart

Your first Chart

Let’s build a simple chart that will get you started with the SharpPlot class for charting.

Here’s a samples chart that’s the nearest thing to a “Hello world” example for a SharpPlot script:

// Getting started with SharpPlot.

using System;
using System.Drawing;
using System.Drawing.Imaging;
using Causeway;

namespace SharpPlotSample
{
  class Example
  {
    static void Main(string[] args)
    {
      // A simple composite chart showing most key features
       SharpPlot sp = new SharpPlot(360,240);
       sp.Heading = "Hello, Barchart!";
       int[] data = new int[] {6,18,27,31,56,72,45};
       string[] xlabs = new string[]{"Jan","Feb","Mar","Apr","May","June","July"};
       sp.SetXLabels(xlabs);
       sp.DrawBarChart(data);

      // Render the chart as a 96dpi PNG image, and save to file
       sp.SaveImage("firstbar.png",ImageFormat.Png,96);
       Console.WriteLine("Saved as firstbar.png!");
    }
  }
}

This will create the chart at the top of the page as an image file on disk.

How it all works

A good way to begin to learn about SharpPlot is to copy and modify the source, changing some properties and adding some new ones to see the effect. The SharpPlot engine is a ‘state machine‘ – you can set any of its internal properties at any time, and they stay set until you reset them. The current state influences the appearance and style of all the drawing commands in a logical and predictable way, but everything has a good default value to begin with.

The commands in the sample program work like this:

SharpPlot sp = new SharpPlot(360,240);
This resets all properties to their default values and clears a ‘chart area’ covering 360 by 240 points. This is a little smaller than the default size, and is a comfortable shape for many standard business charts.
sp.Heading = “Hello, Barchart!”;
The main heading is centred in the top margin by default.
sp.SetXLabels(xlabs);
Labels are defined with one value per data-point
sp.DrawBarChart(data);
Now we can draw the chart!
sp.SaveImage( ... );
Render the completed chart to file at 96dpi.

So generally, a SharpPlot script iterates through three steps :

  • Set up the drawing area
  • Set up (or reset) chart parameters
  • Draw chart

Then ends with the rendering of the whole chart to an image.

Spicing it up

You might guess that to change the default positioning of the heading, you could add a HeadingStyle property, and maybe you would like the abut the bars, so you could set the Gap property to zero. In general, SharpPlot is designed so that everything looks good when you take all the defaults, but if you have a specific design in mind, you can control the appearance of your chart very finely indeed. Here is the same chart with a few properties added, and some changes to styles and fonts to give you an idea of the possibilities:

The body of the sourcecode now looks like this:

   // Do it again, but prettier?
    sp.Reset(360,240);
    sp.SetBackground(Color.Purple,FillStyle.SpotTopLeft,2);
    sp.SetAxisStyle(Color.White,LineStyle.Solid,2.5);
    sp.Heading = "Hello again, Barchart!";
    sp.SetHeadingFont("Arial",18,FontStyle.Bold,Color.LemonChiffon);
    sp.SetLabelFont("Arial",10,FontStyle.Bold,Color.WhiteSmoke);
    sp.SetColors(Color.LimeGreen);
    sp.SetFillStyles(FillStyle.Drum);
    sp.HeadingStyle = HeadingStyles.Right;
    sp.Gap = 0.4;
    sp.SetXLabels(xlabs);
    sp.DrawBarChart(data);

This adds several properties, the most important being the Background to change the paper colour from white to deep purple with a spotlight gradient. It also sets the axes to white (and a little heavier) and changes the typesizes and colours for the various text elements. The x and y captions have also been centred and the heading is aligned with the right margin.

In general, you should start with a minimal collection of properties, and a very simple script. This approach lets you focus on getting the data correct, while leaving almost all the properties set to their default values. Once you have the chart working, then you can let the designers loose to play with the colours, typefaces and layout, adding more properties as you need them.

See also ...

Getting Started | SharpPlot Tutorials | SharpPlot in different Languages


SharpPlot 3.71 User Manual: Your first Report

Your first Report

Let’s build a simple report that will get you started with the SharpLeaf class for reporting.

Basic routine

As seen in a first chart tutorial, a typical SharpPlot script iteratively set up parameters and then draws. We can use the same approach to produce a simple report by iteratively adjusting settings then appending text. The following script uses the aplparas variable.

   lf = new SharpLeaf();

   lf.Style.Font.Size=24; // change font size;
   lf.Style.Alignment=Alignment.Center; // change alignment;
   lf.AddParagraphs("My Report Title");  // Flow title

   lf.IncludeSpace(36);  // Bump down by half an inch
   lf.Style.Font.Size=12; // change font size;
   lf.Style.Alignment=Alignment.Left; // change alignment;
   lf.Style.SpaceAfter=12; // 12 points of free space after each paragraph;
   lf.AddParagraphs(aplparas);  // Flow text

   lf.SavePdf("myfirstreport.pdf");

Spicing it up

Because a SharpLeaf script typically has many calls to methods control the flow and append content into the report, settings are generally available as structures, so that a typical SharpLeaf script will have two phases:

  • First, set up all desired structures (including page layouts)
  • Then, flow content through the report with SharpLeaf methods

Which is pretty similar to modern web design of segregating style (CSS) from content (HTML).

Using that mindset, we can make a nicer report with a cleaner script:

  // Set up paragraph styles
   title = new ParagraphStyle();
   title.Font = new FontType("Garamond",18,FontStyle.Bold,Color.Navy);
   title.Alignment = Alignment.Center;
   title.SpaceAfter = 36;  // Half an inch of free space below titles
   title.BookmarkLevel = 1;  // Automatically bookmark titles at top level

   body = new ParagraphStyle();
   body.IndentFirst = 36;
   body.IndentFirstAfterChange = false;  // Enforce typographical etiquette

  // Flow content
   lf.AddParagraphs("My Report Title",title);
  // Include an image on the right, scaling it to fit two inches
   lf.IncludeImage("dyalog.jpg","dyalog.jpg",BoxFlow.Right,144,144);
  // Start next paragraph with a dropped capital on three lines
   lf.SetCap(3);
   lf.AddParagraphs(aplparas,body);

  // Render report
   lf.SavePdf("myfirstreport.pdf");

See also ...

Getting Started | SharpLeaf Tutorials | SharpPlot in different Languages


SharpPlot 3.71 User Manual: Rendering Images

Rendering Images

SharpPlot can generate the finished chart in any of five common vector formats (SVG, PDF, EPS, XAML, EMF) and any raster image format supported by the .net Bitmap class (PNG, JPEG, BMP, GIF, TIF).

Vector vs Raster graphics

Raster graphics have a fixed resolution, so that the graphics are stored as a big matrix of monochrome cells – pixels – possibly with some compression. This forces the choice of a resolution (size in pixels of the whole image) at rendering time.

Vectorial graphics instead are stored as instructions to draw the graphics on an arbitrary XY plane. This means that they can be arbitrarily scaled on the output device. At rendering time, all you have to consider is how to scale it (Fixed size, Fixed Aspect, Stretch...)

In general, any vector format will be smaller (in byte count) than the corresponding raster image by a factor of between 5 and 10, excepted for charts which have a dense matrix of points, such as a contour plot with altitude shading, where the altitude shading is fundamentally a matrix of pixels.

Vectorial formats

  • SVG (Scalable Vector Graphic) is a ratified W3C standard and becoming the standard to vectorial graphics, supported by all modern web browsers – the latest to support it being Microsoft Internet Explorer version 9 (2011).
  • PDF (Portable Document Format) is a good format if you want to email a completed chart, or post several charts as a single document on your website. It might be a convenient way of packaging a large collection of graphs, with an appropriate navigation tree created by SharpPlot as bookmarks. It is the only format which works well with multiple pages.
  • EPS (Encapsulated PostScript). This is very suitable for including single charts in published documents prepared with high-end DTP software for printing on any PostScript device.
  • XAML (Extensible Application Markup Language) is the format created by Microsoft for (amongst other things) graphial definitions. This is the ideal format for integration into .net applications.
  • EMF (Enhanced Metafile). This is ideal for saving as a temporary format, and pasting into Word or PowerPoint.
  • VML (Vector Markup Language) was the vectorial graphics language designed by Microsoft for Internet Explorer 5. It is based on a W3C proposal (May 1998) but is unlikely to progress to a ratified open standard. VML is no longer supported by Microsoft and should not be used.

Raster formats

.Net supports the following raster formats : PNG, BMP, GIF, JPEG, TIF (see System.Drawing.Imaging.ImageFormat). These enumerations are passed as arguments to SaveImage and RenderBitmap functions which respectively save the completed chart on disk, and return it as a Bitmap object, which may for example be returned to the browser via http.

DPI setting

Most output functions takes the DPI (resolution in Dots Per Inch) to create the image at. To have the bounding box of the paper in pixels match the required height and width of the image in points, use 72 for the DPI setting (because there are 72 points per inch, and that SharpPlot use the point at its default unit).

Generally, for web publication, the default DPI setting of 96 – the pseudo-standard computer screen resolution – will be more appropriate. Remember to adjust the parameters in the image tag to match, if embedding the picture in a web page.

Here is an image tag suitable for a chart created with SharpPlot(432,324) and rendered with sp.RenderImage(96) to scale it up a little:

<img src="mychart.png" height=432 width=576 border=0 >

If you are creating charts to be printed at 300DPI, you should use RenderImage(300) which will generate a much larger picture, at the real size of the chart, in 72th of inches.

Multi-page documents

The Document class also offers the ability to aggregate multiple SharpPlot/SharpLeaf documents into a single one, possibly reordering the pages.

It also provides fine control over the output of multi-page document in formats that do not natively support multiple pages, such as SVG, XAML, and Raster images.

See also ...

Getting Started


SharpPlot 3.71 User Manual: SharpPlot Tutorials

SharpPlot Tutorials

The SharpPlot class offers a comprehensive range of Properties and Methods for constructing business and scientific charts from arrays of data.

You can look at a first example for a simple command-line program to draw a simple chart. If you need to write the script in APL or VB, have a look a the Language tutorial to see how to translate C# samples into APL or VB scripts.

Topics

General Tutorials
This section explores the main concepts that will be useful to the SharpPlot user.
Chart Samples
This section shows typical usages of the different chart types supported by SharpPlot.
Style Examples
Examples of typical chart and axis styles.


SharpPlot 3.71 User Manual: General Tutorials

General Tutorials

This section explores the main concepts that will be useful to the SharpPlot user.

Topics covered

Visual Glossary
Most of the basic chart terms are illustrated here.
Creating a Business graphic
SharpPlot is shipped with sample.cs which illustrates many of the capabilities you need to generate effective business graphics. This short tutorial takes the chart step by step and explains the various properties and methods used to construct it.
Working with Multiple series
There are many strategies for showing multiple data series in the same charting space. This tutorial explores the ways SharpPlot allows you to approach the issue of arranging several series on the same page.
The CMYK color model
On top of the standard ARGB color model (Alpha Red Green Blue – for monitor display), SharpPlot supports and the CMYK color model (Cyan Magenta Yellow Black – for ink mixing). CMYK colors are encoded are ARGB colors with an alpha channel (opacity) between 0 and 8. This is why, when using ARGB colors (which is standard .Net approach), you shouldn’t use opacity smaller than 9, otherwise the colors will appear “random”.
Using the Gradient fills
The way gradients (both linear and radial) are defined varies greatly between output formats, so SharpPlot defines a reasonable set of standard FillStyles for you, and where necessary (surface-filled linegraphs and piecharts) enforces a reasonable bounding rectangle on the fill definition.
Using Date and Time axes
Timeseries data from Excel or from a database query is often held internally as floating-point numbers where the integer part represents the date (the number of days elapsed since 30 December 1899) and the decimal part the time of day. This scheme is accurate to around 2 sec with normal floating-point precision and is equivalent to the OLE date format, and can be obtained by the System.DateTime.ToOADate method.
Using Picture Formatters
You may apply a ‘picture’ format to numeric values, and also to text labels to enforce truncation or wrapping into a given width.
Formatting text with simple HTML tags
SharpPlot allows a limited subset of HTML tags to be included in all text elements, typically headings or axis labels.
Adding Links & Handlers
SharpPlot makes it particularly easy to add hyperlinks and other JavaScript handlers to your charts. This tutorial shows how you can associate links and some simple handlers with each sector of a piechart. Try clicking on the sectors of the piechart for a simple popup message.
Active charts in GUI Applications
The PageMap class allows the programmer to explore hotspot data contained in any chart, so that the application can interact with chart items and data.
The Barley experiment
Many of the examples in the manual use a dataset collected in the 1930s from an experiment to investigate barley yields. Ten varieties of seed were planted at 6 farms over 2 years and the yields from each plot measured to give 120 data points.
Grouping and Splitting database data
Many aggregations can be done very easily in SQL, and SharpPlot simply used to plot the group totals. The methods explored in this tutorial show you how to make more complex summaries and cross-tabs directly from the raw data series.
Sample datasets supplied as XML
Several simple databases are included with the SharpPlot distribution to allow you to experiment with grouping and splitting data. The smallest of these is an invented Sales Information database with two products and some monthly figures:

There is also a full set of tutorials specific to each type of chart.


SharpPlot 3.71 User Manual: Visual Glossary

Visual Glossary

Most of the basic chart terms are illustrated here.

Paper

The entire region available for drawing the chart. It comprises the chart area and the gutter that surrounds it. The width and height can be set explicitly when you create a SharpPlot instance. The settings for color, fill style and thickness of the border line can be adjusted through the SetBackground method.

Gutter

The region lying between the edge of the paper and the chart area. The gutter has a uniform depth and, if the Gutter property is set to zero, the paper and chart area have identical dimensions.

Chart Area

The entire region used for the chart, axes, headings and so on. By default, its dimensions are the paper size less the gutter, but the NewFrame method can be used to alter the size of chart area. The settings for color, fill style and thickness of the border line can be changed through the SetFrameBackground method to create, for example, a ‘boxed’ chart (as in the diagram) where a thick line is drawn around it. The chart area that lies outside of the plotting region and that contains the heading, subheading and footnotes is known as the frame. The DrawFrame method can be used to draw this separately, which is useful when, for example, you want to draw several smaller charts on a single piece of paper.

Plotting Region

The rectangle formed by the X and Y axes, stretching between the first and last tick marks in each direction. By default, SharpPlot will leave this clear of all elements except plotted data, but you can choose to place the key here, or to add text notes after the plot is complete. The settings for plotting region color, fill style and thickness of the border line can be modified through the SetChartBackground method.

Margins

The area outside the plotting region up to the boundary of the chart area. By default SharpPlot leaves space for the Y-axis on the left (with labels of up to four digits), the X-axis and key at the foot, and a one-line heading at the top. If you require longer labels or a deeper heading, you will probably need to adjust these settings with the Margins property. This gives the (top,bottom,left,right) margins as shown, or you can set the margins individually with MarginTop and so on. All values are in points.

Chart Heading

The main title for the chart. By default this is written centred at the top of the chart, but you can place it as required by setting the heading style.

Axis Captions

You can set captions for any of the X, Y and Z axes. You can also choose, for example, to have (short) Y-axis captions written horizontally at the end of the axis rather than up the side by setting YAxisStyle.

Axis Labels

These are written at each tick mark. By default, SharpPlot uses numeric labels, but you can scale, format, or over-ride these as required. You can also choose to have the X-axis labels written midway between tick marks, which is often suitable for weekly or monthly data.

Grid Lines

These are lightly-drawn horizontals and verticals which extend from the major tickmarks across the plotting region.

Baseline

This determines how barcharts and surface charts are shaded. You can leave the X-axis at the bottom and set a baseline part-way up the Y-axis to give the effect of bars which ‘hang’ from a norm, or to shade above and below a standard setting.

Key or Legend

This is written (by default) across the foot of the chart, and shows a small sample of the colour / marker / fill style for each line or bar, with a short section of explanatory text beside it. You can place the key anywhere within the chart area or margins, and multiple charts may share a single key.

Value Tags

Scatter plots, piecharts and barcharts may be annotated with data values. For scatter plots these are simple numeric values written beside each data point, for barcharts you can choose to write them on top of each bar or just inside the bar, and for piecharts they will normally be written around the edge of the pie using radial ‘spider’ tags from each segment.

Chart Notes

You can add free text (optionally boxed) anywhere within the chart area. Notes are positioned using the (x,y) coordinates of the last chart plotted, except for piecharts where the plotting region has a notional coordinate system of 0 – 100 in both directions.

Nudge

The position of the Chart Heading, Key, Chart Notes and Value Tags can be shifted in the X- and Y-dimensions through the corresponding nudge property.

Datum Lines

These are normally added after the plot is complete to mark important ‘cut off’ lines, such as +/- 2 standard deviations on a control chart.

Data Analysis

Some charts have one or more styles that use regression (GrowthCurve, ModelFit) or Gaussian smoothing (TrendLine) to calculate and draw a line that best fits the data.

Walls

These are the YZ, XZ and XY backplanes of a 3D chart. The settings can be altered with the SetWallFillStyles method.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: Creating a Business graphic

Creating a Business graphic

SharpPlot is shipped with sample.cs which illustrates many of the capabilities you need to generate effective business graphics. This short tutorial takes the chart step by step and explains the various properties and methods used to construct it.

Here is the completed graphic, rendered to a Bitmap for inclusion in the help file.

Defining the data

// Data used in all the examples below
 data1 = new int[] {6,18,27,31,56,72,45,12};
 data2 = new int[] {9,23,32,33,59,81,47,13};
 xlabs = new string[]{"Jan","Feb","Mar","Apr","May","June","July","August\n(part)"};

These are the series used to draw the bars and the overlay line.

Step 1: a Simple Barchart

The first step is to set the chart heading, and to define the ‘paper’ with a suitable background color and fill pattern.

// First example with a barchart
 sp.Reset();
 sp.Heading = "Financial Summary for Current Year";
 sp.SetHeadingFont("Arial",18,FontStyle.Bold,Color.Firebrick);
// Use a simple shaded paper as background
 sp.SetBackground(Color.Wheat,FillStyle.Solid);
 sp.MarginTop = 56;  // Leave a lttle more headspace
 sp.YCaption = "$M";
 sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.AtEndCaption;
 sp.SetXLabels(xlabs);
 sp.DrawBarChart(data1);

The heading is a simple string property, which may contain newline characters. The ‘font’ is actually a composite of the font face, the point-size, the style and the color. Any combination of these may be given – the other elements retain their current settings. Note that you can give a list of font faces here, for example “Verdana,Arial,sans” would be fine for a chart destined to be rendered to VML or SVG.

This example also sets a slightly generous top margin, and places the Y-axis caption at the end of the axis, rather than in its default location which is written vertically alongside the axis. The X-axis labels are set with an array of labels (passed as strings) which again may contain embedded newlines.

Finally, you may have noticed that the Y-axis has been forced to range from zero, rather than taking the default lower limit from the data.

Step 2: Overlaying a LineGraph

The second step illustrates an important feature of the way SharpPlot retains state information. As soon as you draw a chart, you effectively fix the range of the X and Y axes from the given data. These axes can then be re-used over and over again by further charts, in this case a linegraph which shares the same X and Y scales.

// Overlay a linegraph on the same axis set
 sp.SetLineStyles(LineStyle.Dash);
 sp.SetColors(Color.DodgerBlue);
 sp.DrawLineGraph(data2);

SharpPlot works with the concept of color and LineStyle cycles, so you can pass an array of colors or line-styles here. If you are only plotting a single series (as here) then a single color and line-style are all you need.

As you can see, the line is a little lightweight visually, so it is given a much stronger presence in Step-3.

Step 3: Customising the Line

That looks better!

sp.LineGraphStyle = LineGraphStyles.Markers|LineGraphStyles.Risers|LineGraphStyles.Curves;
sp.SetLineStyles(LineStyle.Dash);
sp.SetMarkers(Marker.Lozenge);
sp.SetColors(Color.DodgerBlue);
sp.SetPenWidths(0.8);  // For line and risers
sp.Flexibility = 5;  // For curved line
sp.DrawLineGraph(data2);

The main change is to increase the pen-width (again you may set an array here for multiple series), add Risers from the axis to lozenge-shaped markers, and join the points with a smooth curve.

Step 4: adding a Datumline and a Legend

This shows an example of a Datum line, which has been defined with a customised dash-repeat.

sp.SetDatumLineStyle(Color.Navy,new LineStyle(new int[] {24,3,2,3,2,3}));
sp.SetYDatumLines(40);

You can set a single datum-line (as here) or an array of lines to draw horizontals at multiple Y-values.

This chart also has a simple legend, which describes both series.

// Key picks up series info from both charts
 sp.SetKeyText(new string[]{"Revenue","Invoiced Sales"});
 sp.KeyStyle = KeyStyles.Boxed|KeyStyles.Rounded;

Each time you call one of the SharpPlot ‘Draw’ routines, information about the series is automatically added to the key. All you need to do is to add some text describing each bar or line, and an appropriate legend will be created for you.

Step 5: Adding a Summary Piechart

Piecharts are treated by SharpPlot as ‘rolled-up’ barcharts, so they have X-labels. Again, you can set an array of colours here, which are used one-per-sector, running clockwise from 12:00.

sp.SetXLabelFont("Arial",13.4,FontStyle.Bold,Color.Navy);
sp.SetXLabels(new string[]{"Home","Export"});
sp.SetPieCenter(100,180);
sp.PieRadius = 50;
sp.SetEdgeStyle(Color.Wheat,LineStyle.Solid,1.2);
sp.SetColors(Color.Firebrick);
sp.DrawPieChart(new int[] {34,23});

Having set up the labels and colors, we can place the pie at a specific (x,y) location and reduce its radius to half the default value. It can be edged with a thick line in the current background colour to blend in nicely with the whole graphic.

sp.SetXLabelFont("Arial",13.4,FontStyle.Bold,Color.Navy);
sp.SetXLabels(new string[]{"Home","Export"});
sp.SetPieCenter(100,180);
sp.PieRadius = 50;
sp.SetEdgeStyle(Color.Wheat,LineStyle.Solid,1.2);
sp.SetColors(Color.Firebrick);
sp.DrawPieChart(new int[] {34,23});

Step 6: Graded Background and a Text Note

This illustrates another of the built-in gradient fills, this time shading towards white from the bottom-right corner.

It also adds a text note – you can write as many notes as you like, using either chart co-ordinates (as here) or absolute positioning.

sp.NoteStyle = NoteStyles.Boxed|NoteStyles.Rounded;
sp.SetNoteBackground(Color.Goldenrod);
sp.SetNoteFont(Color.White);
sp.DrawNote("Note: April figures were affected by warehouse fire",3.5,20,0,1.6);

The note is boxed, and you can set the fill-style and color of the background. In this case the font is left to its default (Arial) but changed to white. The text will wrap into a box 1.6 X-axis units wide starting at x-value 3.5 and y-value 20.

Summary

This tutorial illustrates many of the basic techniques for producing effective business graphics with SharpPlot. The next tutorial shows how you can associate hyperlinks and JavaScript handlers with your series to make the graphs part of a real user-interface on the web.


SharpPlot 3.71 User Manual: Working with Multiple series

Working with Multiple series

There are many strategies for showing multiple data series in the same charting space. This tutorial explores the ways SharpPlot allows you to approach the issue of arranging several series on the same page.

Re-using both X and Y axes

Once you have established the axes with your first plot, you can call any of the compatible DrawXx methods to overlay more series on the same scale. Clearly you can only reuse 2D scales with a 2D chart (for example a barchart, then a linegraph) or 3D axes with another 3D chart (for example a cloudchart and a fitted response surface). This example shows how to plot a fitted curve over a simple barchart.

sp.Reset();
sp.FrameStyle = FrameStyles.Boxed;
sp.SetMargins(60,48,36,18);
sp.Heading = "Fit of Logistic Curve\nto Checkweigh Data";
sp.HeadingStyle = HeadingStyles.Right;

sp.SetMarkers(Marker.Bullet);
sp.SetFillStyles(FillStyle.Saturate80);
sp.BarEdgeNib = 0;

sp.SetXLabels(new int[] {220,221,222,223,224,225,226,227,228,229,230,231,232});
sp.SetKeyText(new string[]{"Experimental Data","Logistic Fit"});
sp.XCaption = "Weight of Test Pack\n(grams)";
sp.YCaption = "No of rejects (out of 50)";

sp.DrawBarChart(rejects);

sp.SetPenWidths(1);
sp.LineGraphStyle = (LineGraphStyles.Curves|LineGraphStyles.Markers);

sp.DrawLineGraph(logfit);

sp.NoteStyle = 0;
sp.SetNoteFont("Arial",10,Color.Green);
sp.DrawNote("Deduced Set weight = 224.48g\nUncertainty = 1.31g",8,40);

The one thing to note here is that the BarChart must go first. It always creates an X-axis running upwards from 0.5 with bars positioned at 1,2, ... n and cannot reuse an existing X-scale. If you really need to add bars to an existing chart, you must use the XBar plot which has a ‘real’ X-Axis.

Using more than one (rescaled) YAxis

It is a very common requirement to show two related timeseries against different Y-scales, and SharpPlot gives you a very simple way to do this. The first series you plot will create the left-hand Y-axis in the usual way, then you call NewYAxis() to perform a partial reset – it leaves the XAxis in place and re-ranges the Y-axis to fit the second series.

sp.Reset();
sp.FrameStyle = FrameStyles.Boxed;
sp.SetMargins(60,48,36,36);
sp.Heading = "Weekly Bun Sales and\nMean Daily Temperature";

sp.SetPenWidths(0.6);
sp.SetLineStyles(new LineStyle[]{LineStyle.Solid,LineStyle.Dash});
sp.MissingValue = 0;

sp.SetKeyText(new string[]{"Bun Sales","Mean Temperature"});
sp.XAxisStyle = XAxisStyles.Date;
sp.XDateFormat = "dd-MMM";
sp.SetXTickMarks(7);
sp.YCaption = "Sales (arbitrary units)";

sp.DrawLineGraph(buns,date);

sp.NewYAxis();

sp.YCaption = "Temperature (deg C)";
sp.SetYTickMarks(5,4);

sp.DrawLineGraph(temp,date);

The data shows sales of hamburger buns on the left scale and the daily mean temperature on the right. If you want the tick-mark positions to line up (so you can have one set of horizontal gridlines) you will have to work out a good pair of ranges for yourself and set the ranges on both Y-axes explicitly.

Drawing several charts on the same page

SharpPlot defaults to using the entire available paper-size (less a 4-point gutter) for each chart that you draw. You can over-ride this by asking for a new Frame which restricts the plot to a rectangular space within the paper and triggers a complete reset of all properties. It is likely that the charts will share a common heading, and a common key, as shown in this example.

sp.Reset();
sp.FrameStyle = (FrameStyles.Boxed|FrameStyles.Filled);
sp.SetFrameBackground(Color.Green,FillStyle.Saturate20,1.2);
sp.SetMargins(42,48,16,18);
sp.Heading = "Weekly Bun Sales\nand Mean Daily\nTemperatures";
sp.HeadingStyle = HeadingStyles.Left;
sp.DrawFrame();

sp.NewFrame(4,200,256,196);  // Bounds of first chart

sp.FrameStyle = (FrameStyles.Boxed|FrameStyles.Filled);
sp.SetMargins(28,18,26,8);
sp.Heading = "Sales of Hamburger Buns";
sp.HeadingStyle = HeadingStyles.Left;
sp.SetPenWidths(1);
sp.SetColors(ColorTranslator.FromHtml("#2E319E"));
sp.MissingValue = 0;
sp.XAxisStyle = XAxisStyles.Date;
sp.YAxisStyle = YAxisStyles.GridLines;
sp.XDateFormat = "dd-MMM";
sp.SetXTickMarks(7);

sp.DrawLineGraph(buns,date);

sp.NewFrame(180,320,248,180);  // Bounds of second chart

sp.FrameStyle = (FrameStyles.Boxed|FrameStyles.Filled);
sp.SetMargins(28,18,26,8);
sp.Heading = "Mean Daily Temperatures";
sp.HeadingStyle = HeadingStyles.Left;
sp.SetHeadingNudge(8,0);
sp.SetColors(ColorTranslator.FromHtml("#CB2C27"));
sp.SetPenWidths(1);
sp.XAxisStyle = XAxisStyles.Date;
sp.YAxisStyle = YAxisStyles.GridLines;
sp.XDateFormat = "dd-MMM";
sp.SetXTickMarks(7);
sp.DrawLineGraph(temp,date);

// Share common key so reset to entire paper size
sp.NewFrame(432,324);
sp.SetKeyText(new string[]{"Bun Sales","Mean Temperature"});
sp.KeyStyle = (KeyStyles.Vertical|KeyStyles.Boxed);

sp.DrawKey(66,32);  // Notional co-ordinates (100,100) within margins

This can get quite tedious if there are several charts on the paper, but it does give you total control over the positioning. Obviously you need to be careful if you allow parts of one plot to obscure another, as here.

Making life easier with a trellis

The process of segmenting the paper can be automated, if what you want is a collection of charts arranged in a regular pattern. You can choose whether you want a full reset each time you move to a new cell, as often is is more convenient if most of the settings persist across all the charts. Here is an example which might be appropriate in a report on a portfolio of share prices.

sp.Reset(432,500);  // Paper size
sp.NewFrame(400,500);  // Chart area
sp.FrameStyle = FrameStyles.Boxed;

sp.Heading = "Popular UK Shares 2003 – 8";
sp.HeadingStyle = HeadingStyles.Left;
sp.SetHeadingFont("Arial",14,FontStyle.Bold,Color.Navy);
sp.DrawFrame();

sp.NewFrame(0,470,400,450);  // For all 3 charts

sp.SetTrellis(3,1);  // Three down, one across

sp.NewCell();        // Move to first cell and set all properties
sp.Heading = "Halifax Bank of Scotland";
sp.SetHeadingFont("Arial",10,FontStyle.Bold,Color.Navy);
sp.HeadingStyle = HeadingStyles.Left;
sp.SetHeadingNudge(10,-8);
sp.SetMargins(10,0,36,36);
sp.MissingValue = 0;
sp.XAxisStyle = (XAxisStyles.Clipped|XAxisStyles.AnnualTicks|XAxisStyles.PlainAxis);
sp.SetLabelFont("Times New Roman",6,Color.Black);
sp.YIntercept = 700;
sp.YAxisStyle = (YAxisStyles.Clipped|YAxisStyles.DuplicateAxes);
sp.YTickStyle = YTickStyles.InsideTicks;
sp.DrawLineGraph(HBOS,ShareDates);

sp.NewCell();       // Second cell reuses most properties
sp.Heading = "British Petroleum";
sp.YIntercept = 400;
sp.DrawLineGraph(BP,ShareDates);

sp.NewCell();      // Third cell similarly
sp.Heading = "Kelda (company sold late 2007)";
sp.XAxisStyle = (XAxisStyles.Clipped|XAxisStyles.MiddleLabels|XAxisStyles.AnnualTicks);
sp.YIntercept = 300;
sp.DrawLineGraph(Kelda,ShareDates);

Note how you only need to change the properties which are specific to each chart. If all the charts are identical (just iterating around a dimension in the data) you may be able to automate the process completely by using sp.DrawMultiple to iterate around the cells for you.

Driving the trellis with a scatterplot

For geographical data, you often need to place the individual plots at the correct location on a map. A nice example occured in the Proceedings of the Yorkshire Geological Society a few years ago showing the orientation of corals at various quarries in northern England.

sp.Reset(460,390);  // Paper size
sp.SetMargins(56,34,30,30);
sp.Heading = "Current Direction in the Great Limestone\nin Weardale and Teesdale";
sp.SetHeadingFont("Times New Roman",18,FontStyle.Italic,Color.Navy);
sp.Footnote = "PYGS 52.4 Nov99 page 358 (R.A. Fairbairn)";
sp.SetFootnoteFont("Arial",8,FontStyle.Italic,Color.Green);
sp.FootnoteStyle = FootnoteStyles.Right;

sp.SetMarkers(Marker.Bullet);
sp.ScatterPlotStyle = (ScatterPlotStyles.ValueTags|ScatterPlotStyles.GridLines);
sp.SetChartBackground(Color.Green,FillStyle.Saturate20,0);
sp.SetGridLineStyle(Color.Silver,LineStyle.Solid,0.7);
sp.SetValueTags(new string[]{"Wearhead","Stanhope","Middleton in Teesdale"});
sp.ValueTagStyle = ValueTagStyles.Left;
sp.SetAxisStyle(Color.Black,LineStyle.Solid,1);
sp.SetXRange(70,110);
sp.SetXTickMarks(10);
sp.SetXLabels(new string[]{"70","80","90","00","10"});
sp.SetYRange(20,50);
sp.SetYTickMarks(10);
sp.SetYLabels(new string[]{"20","30","40","50"});

sp.DrawScatterPlot(new int[]{39,39,25},new int[]{86,100,95});  // Towns

sp.ScatterPlotStyle = (ScatterPlotStyles.CellsCreated|ScatterPlotStyles.NoMarkers);
sp.SetCellSize(64);
sp.DrawScatterPlot(new int[]{43,47,42,44,43,37,35,36,28,31,31},     // Quarry Eastings
                   new int[]{79,84,88,95,100,103,98,93,94,89,83});  // Northings

// Create the legend by hand!
sp.SetKeyText(new string[]{"Corals","Latiproductus"});
sp.KeyStyle = (KeyStyles.Vertical|KeyStyles.Boxed);
sp.SetKeyBackground(Color.White,FillStyle.Solid,1.1);
kd1 = new KeyDefinition(2,Color.Maroon);
kd2 = new KeyDefinition(2,Color.Green);
sp.DrawKey(72,25,new KeyDefinition[]{kd1,kd2});

// First quarry sets all the properties
sp.ResetProperties();

sp.NewCell();
sp.SetColors(Color.Maroon);
sp.Gutter = 0;
sp.SetMargins(10);
sp.SetChartBackground(Color.White,FillStyle.Solid,0);
sp.Heading = "Killhope";
sp.PolarChartStyle = (PolarChartStyles.SurfaceShading|PolarChartStyles.GridLines);
sp.SetYRange(0,30);
sp.LabelStyle = LabelStyles.Opaque;
sp.DrawPolarChart(new int[] {10,10,20,20,20,15,10,10,20,20,20,15});

sp.NewCell();
sp.Heading = "Thorn Green";
sp.DrawPolarChart(new int[] {10,5,10,25,10,30,10,5,10,25,10,30});

sp.NewCell();
sp.Heading = "Greenfield";
sp.DrawPolarChart(new int[] {10,15,15,25,15,25,10,15,15,25,15,25,10});

sp.NewCell();
sp.Heading = "Chester Garth";
sp.DrawPolarChart(new int[] {15,10,0,15,15,15,35,15,10,0,15,15,15,35});

sp.NewCell();
sp.SetColors(Color.Green);
sp.Heading = "Stanhope Burn";
sp.DrawPolarChart(new int[] {25,10,10,10,10,5,0,0,0,0,0,20});

sp.NewCell();
sp.SetColors(Color.Maroon);
sp.Heading = "Wise Eels Bridge";
sp.DrawPolarChart(new int[] {15,25,25,15,10,10,15,25,25,15,10,10});

sp.NewCell();
sp.SetColors(Color.Green);
sp.Heading = "Harnisha Gill";
sp.DrawPolarChart(new int[] {10,0,5,20,0,0,0,0,0,5,10,35});

sp.NewCell();
sp.Heading = "Scutter Hill";
sp.DrawPolarChart(new int[] {35,10,0,0,0,20,10,0,0,0,0,10});

sp.NewCell();
sp.SetColors(Color.Maroon);
sp.Heading = "Newbiggin";
sp.DrawPolarChart(new int[] {10,10,10,10,20,25,10,10,10,10,20,25});

sp.NewCell();
sp.SetColors(Color.Green);
sp.Heading = "East Binks Edge";
sp.DrawPolarChart(new int[] {20,5,5,5,10,10,5,10,5,10,5,20});

sp.NewCell();
sp.SetColors(Color.Maroon);
sp.Heading = "High Hurth Edge";
sp.DrawPolarChart(new int[] {20,0,0,0,0,0,0,0,20,10,30,30});

The initial scatterplot of the quarries is drawn with no lines or markers, and simply leaves behind it a collection of frames which can be used by each polar plot in turn. Note that the paper is carefully sized to make the (x,y) squares exactly square here.

See also ...

SharpPlot.NewYAxis Method | SharpPlot.SetTrellis Method


SharpPlot 3.71 User Manual: The CMYK color model

The CMYK color model

On top of the standard ARGB color model (Alpha Red Green Blue – for monitor display), SharpPlot supports and the CMYK color model (Cyan Magenta Yellow Black – for ink mixing). CMYK colors are encoded are ARGB colors with an alpha channel (opacity) between 0 and 8. This is why, when using ARGB colors (which is standard .Net approach), you shouldn’t use opacity smaller than 9, otherwise the colors will appear “random”.

Background

Colors on devices that emit light (like computer monitors) traditionally use three light-sources in the Red, Green and Blue band of the spectrum to fool the eye into seeing any of the combinations of color these can produce. Hence the tendency of programmers to think that specifying ‘color’ simply requires giving 3 values to set the RGB of each composite pixel.

However, color printers require a very different perspective, as inks work by selectively removing color from the reflected light. Of course all printers will accept a specification in RGB terms, and internally convert it to (Cyan,Magenta,Yellow,Black) using a simple subtractive procedure. Typically they determine the amount of each of the first three inks by simple subtraction from the RGB values, then factor out as much Black as they can by finding the minimum value across the CMY vector, adding this as Black, then removing this from each of the CMY.

As you can quickly see, any grey (R=G=B in the intensity model) always maps to (0,0,0,k) when converted to ink. That is why the black cartridge always goes down fastest on your photo-printer! Even grey-ish colors use mostly black when converted to inks.

Because the conversion can never be better than a guess, if the intended output medium of a chart is paper (maybe previewed on screen) then to get the colors exactly right, it is best to use either EPS or PDF output from SharpPlot and set the colors of the inks directly. The values you give will be passed directly into the EPS or PDF drawing commands, and both these formats have the ability to control PostScript printers directly.

Previewing CMYK colors on screen

The reverse conversion from CMYK to RGB is very poorly defined – there are two reasonable approaches here. Firstly, we can essentially reverse the RGB mapping by subtracting CMY from 1.0, then subtracting the K component from each of them, being careful not to go less than zero. This is what SharpPlot does if you use the raster output, or save your chart in SVG, XAML and so on – formats which only support RGB. It also matches what GhostScript does with your EPS output (if you convert it to PNG) and what MS Word does when importing EPS files as pictures.

The alternative algorithm is to subtract the CMY values as above, then multiply what you get by (1-K). This avoids the problem of getting values below zero, but generates rather ‘muddier’ colors as a result. This approach is used by the common PDF viewers such as Acrobat Reader and Foxit to generate the preview.

Summary

Use CMYK colors when you need full control over the inks on your printer, but don’t get too hung up on what the preview looks like on screen! There is no one ‘correct approach’ to mapping from inks to pixels.

See also ...

SharpPlot.UseCmyk


SharpPlot 3.71 User Manual: Using the Gradient fills

Using the Gradient fills

The way gradients (both linear and radial) are defined varies greatly between output formats, so SharpPlot defines a reasonable set of standard FillStyles for you, and where necessary (surface-filled linegraphs and piecharts) enforces a reasonable bounding rectangle on the fill definition.

All the fills start from the base colour of the data series, and the default is to grade towards the fillstyle ‘30% saturated’, in other words, to stir in approximately three parts white for every one part of the original color. A typical example is:

          fs = FillStyle.GradientTopLeft;
          sp.SetFillStyles(fs);

This grades from the default color for the first series (Color.Navy) to the same shade of blue with added white. An easy way to modify this fill is to specify an alternative target color in the FillStyle constructor. For example here is a similar chart but grading towards yellow:

          sp.SetFillStyles(new FillStyle(fs,Color.YellowGreen));

If you simply want to have more or less saturation (but maintaining the hue of the series color) you may also override the target FillStyle, for example:

          sp.SetFillStyles(new FillStyle(fs,FillStyle.Saturate10));

This gives a stronger gradient effect while preserving the overall color balance.

For barcharts, the bounding rectangle of the fill is simply each bar taken individually. However for filled LineGraphs, SharpPlot always uses the span of the axes to define the fill, to ensure compatible shading between series with different data ranges.

For piecharts, the only fill which makes much sense is FillStyle.Dome which is always defined on the entire pie, rather than sector by sector which looks very strange indeed. Note that this does not work in VML which has no mechanism for overriding the bounding rectangle of a custom fill!

See also ...

FillStyle Struct


SharpPlot 3.71 User Manual: Using Date and Time axes

Using Date and Time axes

Timeseries data from Excel or from a database query is often held internally as floating-point numbers where the integer part represents the date (the number of days elapsed since 30 December 1899) and the decimal part the time of day. This scheme is accurate to around 2 sec with normal floating-point precision and is equivalent to the OLE date format, and can be obtained by the System.DateTime.ToOADate method.

Formatting dates

For example day number 35414 is actually 15/12/96 (in DD/MM/YY format) so 35414.5 would be 15/12/96 12:00, as times run from midnight to 23:59 spanning the range 0-1. SharpPlot can accept ‘Date’ and ‘Time’ styles (or both together) on either the X axis or Y axis, and will format the labels accordingly. The dates are shown by default in the format of your current Windows ‘short date’ setting and the times are normally shown as ‘HH:MM’ on a 24-hour clock.

Value ... Style ... Shown as
35414.25 ... (default) ... 35400
35414.25 ... Date ... 15/12/96
35414.25 ... Time ... 06:00
35414.25 ... Date,Time ... 15/12/96 06:00

For more detailed control over the presentation of the date/time combination, you can use the XDateFormat and XTimeFormat properties, for example to label tickmarks ‘Jan-01’ ‘Feb-01’ .... ‘Dec 02’ (in your local language) a suitable format would be “MMM-yy”.

The full reference can be found in the MSDN on Custom Date and Time Format Strings.

The X-axis will also accept integers in the range 19000000 to 20991231 and (if the XAxisStyle is one of Date/Annual/Monthly) treat these as if they are OLE date values. This may be convenient if you have imported your dates from an old time-series database, as this was a very common format in many database designs.

Setting Tickmarks

Tickmarks, Datum lines, etc are always given in data units, so OLE dates here.

Default tickmarks normally look for intervals which divide into 10, but for time-based axes the choice is made between values which divide into 12 which gives a better selection of intervals.

Calendar styles

In addition to ‘Date’ you can set the XAxisStyle (only) to ‘AnnualTicks’ which will put tickmarks at the year boundaries (so the tick spacing will be very slightly irregular). In this case the tick interval gives the number of years, so to mark decades you could use:

sp.XAxisStyle = XAxisStyles.AnnualTicks;
sp.SetXTickMarks(10);

This style would very likely go along with MiddleLabels to get the labels written between the tick marks. The style ‘MonthlyTicks’ works in a similar way – in this case the tickmark setting is the interval between months.

See also ...

Duration Label formatting | SharpPlot.XAxisStyle Property | SharpPlot.XDateFormat Property | SharpPlot.XTimeFormat Property | SharpPlot.YAxisStyle Property | SharpPlot.YDateFormat Property | SharpPlot.YTimeFormat Property


SharpPlot 3.71 User Manual: Using Picture Formatters

Using Picture Formatters

You may apply a ‘picture’ format to numeric values, and also to text labels to enforce truncation or wrapping into a given width.

Formatting numeric values

Wherever you can use numeric value as labels (axes and data value tags) you may specify a suitable format string to have the numbers converted to appropriate text. Typical formats would be:

  • ‘##0.00’ allows space for 3 leading digits and always shows 2 decimal places
  • ‘#,###,##0’ inserts commas at the thousands and has no decimal places
  • ‘0000’ formats with leading zeros (always 4 digits)
  • ‘0.0E00’ uses scientific format, showing 2 significant figures
  • ‘##0%’ shows a trailing percent sign but does not scale the data (unlike the .Net ToString method)
  • ‘£##0.00’ floats a leading currency symbol
  • ‘---0.00’ floats a leading minus sign if the numbers are negative
  • ‘(#,##0.00’ shows negative values in parentheses
  • ‘Week #0’ shows ‘Week 1’ .... ‘Week 52’

Note that .Net always shows leading minus signs for negative numbers. If you really want absolute values shown, use a 2-part format such as ‘##0;##0’ to have the negative values formatted without the leading minus.

More formally...

The characters ‘#’, ‘-’ and ‘0’ are used to place the digits. The total number of ‘-#0’ characters in front of the decimal point determines the largest number you can display. Larger numbers are shown as ‘****’ to indicate overflow. Leading ‘0’ characters are zero-filled; leading ‘#’ characters are suppressed if not used. Digits after the decimal point are always shown, so ‘#’ and ‘0’ are equivalent here. Negative numbers are given a leading ‘-’ only if you use ‘-’ rather than ‘#’ as the placeholder.

The common currency symbols ‘$£’ and Euro will float to the front of the result if used as the first character in the format.

The character ‘~’ suppresses the digit in that position, so a vector of years could be formatted as ‘~~00’ to suppress the century part of the 4-digit number.

If the picture begins with an opening parenthesis, negative numbers will be parenthesised, rather than being shown with leading -ve symbols.

If any of the tokens ‘E-0’ ‘E+0’ ‘E0’ occur in the formatter, scientific notation will be used. A ‘+’ in the exponent part will always be shown, but a minus will only be shown when necessary. Floating currency symbols and other leading and trailing characters may be used as normal, for example ‘-##0.00E+00kg’ is a valid formatter here.

All special characters can be escaped with a preceding ‘\’ character, which must therefore be doubled to print out.

All other characters are simply treated as insertions, with the exception of ‘,’ which is only inserted if there were enough digits in the number to require it. The trailing % does not automatically scale the data.

Note that you always use the ‘American’ convention here for the decimal and thousands separators. These will be converted to your local currency symbols by the formatting function before the finished text is written to the chart.

Formatting text labels

A limited subset of the picture formatting capability may be used with text items, such as value tags and axis labels.

  • ‘XXXXX’ and ‘xxxxx’ output as many characters of the formatted string as there are ‘X’s. If the formatted string is longer than the total number of X, the last output character is replaced by an ellipsis.
  • ‘~~~~~’ supresses that many characters from the formatted string.
  • ‘XXXXX;’ and ‘xxxxx;’ will output the rest of the formatted string, wrapping the whole output into the width given by the ‘X’s at target font size.
  • ‘*’ will output the rest of the formatted string, without forcing a wrapping

These special characters may be escaped by preceding them with a backslash ‘\’.

Any other characters are treated as insertions, so a format like ‘SKU:XX/XXXX’ could be used for product codes, or a format such as ‘XXXX-XX-XX’ would be appropriate for text dates in the form 20020612. You may use line-break character as an insertion within the string, for example ‘SKU:\nXX/XXXX’ will make 2-line labels prefixed with ‘SKU:’, and ‘SKU:\nXXXXXX;’ will make a multi-line label wrapping at 6 X-widths in the label font size.

See also ...

SharpPlot.XLabelFormat Property | SharpPlot.YLabelFormat Property


SharpPlot 3.71 User Manual: Formatting text with simple HTML tags

Formatting text with simple HTML tags

SharpPlot allows a limited subset of HTML tags to be included in all text elements, typically headings or axis labels.

The tags which may be used in all output formats are:

<b> – to bold a section of text
<i> – to italicise a section of text
<u> – to underline a section of text
<sup> – to superscript a section of text
<sub> – to subscript a section of text
<code> – to set a section of text in Courier (fixed pitch)
<strike> – to strike through a section of text (not supported in XAML)

For example:

sp.Heading = "Data for Current Year<sup>1</sup> for <b>all</b> Products";

This will format the text in the main chart heading, which may refer to Note-1 elsewhere in the output.

Note that you can use these HTML tags in text formatting strings, for example:

    sp.XDateFormat = "MMM\n<b>yyyy</b>";

This can be used with Spanned labelling to generate monthly labels and a bolded year centred under the available months.

Charts saved as VML

In this one case, you can use any HTML tags in your text, as they are simply passed directly into the output. However please be aware that SharpPlot will not measure text correctly if you use the <font> tag to change the text size, and as a result captions and Y-Labels may not wrap correctly.

For output saved as VML, SVG PDF or XAML, you may include hyperlink references in the text. For PDF and the various raster formats, superscripts and subscripts will not be underlined even if an underlined font is used in the main text. This improves the appearance of footnote references.


SharpPlot 3.71 User Manual: Adding Links & Handlers

Adding Links & Handlers

SharpPlot makes it particularly easy to add hyperlinks and other JavaScript handlers to your charts. This tutorial shows how you can associate links and some simple handlers with each sector of a piechart. Try clicking on the sectors of the piechart for a simple popup message.

Defining the data

segs = new int[] {67,34,12};
xlabs = new string[]{"Causeway","GraPL","SharpPlot"};
links = new string[]{"http://www.causeway.co.uk","http://www.grapl.net","http://www.sharpplot.com"};
js = new string[]{"alert('Causeway');","alert('GraPL');","alert('SharpPlot');"};
tips = new string[]{"Causeway hits","GraPL hits","SharpPlot hits"};

These are the items used to draw the pie and create the corresponding labels and links.

Step 1: a Plain Piechart

The first step is to set the chart heading, left-aligned this time. Then the pie can be drawn, using a matching font for the labels.

sp.SetMargins(24,0,0,0);
sp.Heading = "Website Visitors\nin 2004";
sp.SetHeadingFont("Arial",18,FontStyle.Bold,Color.Firebrick);
sp.HeadingStyle = HeadingStyles.Left;
sp.SetXLabels(xlabs);
sp.SetLabelFont("Arial",14,Color.Firebrick);
sp.DrawPieChart(segs);

Note that the margins have been adjusted here, as the pie only needs a little space at the top.

Step 2: Linking from the Sectors

Each sector of the chart now has a matching hyperlink from the data.

This example looks just like the previous chart, until you move the mouse over the pie sectors, when you will notice the ‘pointing hand’ cursor appears. In this case the chart has been rendered twice, firstly to create the <area> tags as an imagemap, and then as a 72dpi PNG file.

sp.AddHyperlinks(links);
sp.DrawPieChart(segs);

string map = sp.RenderImageMap(72);
Bitmap chart = sp.RenderBitmap(72));

When the two elements are combined in a webpage, the sectors become hyperlinks.

Step 3: Adding Hints and Scripting

This example shows how you can define an array of tips or actions, which exactly matches the elements in the data. SharpPlot also has overloads for the various ‘Add’ methods to let you target specific data items in this way.

This example has the same image, but with some simple changes to the map. Try clicking on the sectors, and notice that they all have pop-up tips as well as an Alert message.

// Each segment now has a tip and an action
sp.AddTips(tips);
sp.AddAttributes("onClick",js);
sp.DrawPieChart(segs);
map = sp.RenderImageMap(72);

This is probably all you need to enable quite a complex ‘drill-down’ application where the user can explore a large management report simply by clicking on the various graphical elements. However you are limited in what you can do with mapped images – clearly you cannot change the chart content ‘on the fly’ without reloading the entire image.

With VML or SVG, you have much more scope for adding handlers which actively modify the chart in the client browser. The next example simply illuminates the selected pie sector by highlighting the border.

Step 4: Modifying the Graphic Clientside (with VML)

Here is the same chart again, this time without the text.

Assuming you have the VML component of IE 5.5 or above installed, you will see a very similar piechart, but this time the edges change color as you move the mouse over the sectors!

sp.SetEdgeStyle(Color.Maroon,LineStyle.Solid,2);
sp.AddAttributes("onMouseOver","this.strokecolor='Lime'");
sp.AddAttributes("onMouseOut","this.strokecolor='Maroon'");
sp.DrawPieChart(segs);
string vmldemo = sp.RenderVml(false);

The sector edges start maroon this time, and are set to turn bright green when the mouse enters the sector. Obviously, you must set them back again when it leaves! You can change any attribute of the current object in this way (for example you could also increase the line-weight, or change the fill color) or you can change the attributes of a different object entirely. A typical chart might be a complex linegraph where the user can mouse-over the key to highlight a chosen line.

Similar techniques work with SVG charts, but the JavaScript must be modified to take account of the different property names and structure of the SVG document.

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method | SharpPlot.AddHyperlinks Method | SharpPlot.AddTips Method


SharpPlot 3.71 User Manual: Active charts in GUI Applications

Active charts in GUI Applications

The PageMap class allows the programmer to explore hotspot data contained in any chart, so that the application can interact with chart items and data.

Creating Active Charts

sp = new SharpPlot();

sp.SetChartName("Bar1");
sp.SetSeriesNames(new string[]{"Hats","Coats"});
sp.Heading = "Check out Logical ImageMap";

sp.AddTips(ScriptTarget.Heading,"This is the heading, honest!");
sp.AddTips(new string[]{"Hat 3","Hat 5","Hat 7"},"Hats");  // First series
sp.AddTips(new string[]{"Coat 8","Coat 5","Coat 4"},"Coats");  // Second series
sp.AddHints("Click me");  // default hint for all series items

sp.SetXLabels(new string[]{"North","South","Other"});  // Should show up with a counter
sp.XTrackFormat = "Region-#0";  // Logical x-axis
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.YTrackFormat = "#0.0kg";  // Formatter for primary y-scale

sp.DrawBarChart(new int[][]{new int[]{3,5,7},new int[]{8,5,4}});

sp.NewYAxis();
sp.SetMarkers(Marker.Lozenge);
sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.RightAxis;
sp.LineGraphStyle = LineGraphStyles.Markers;
sp.SetYTickMarks(100,1);

tips = new string[]{"Guess 583","Guess 419","Guess 325"};
sp.AddTips(tips);  // Default series
sp.DrawLineGraph(new int[] {583,419,325});

sp.SetKeyText(new string[]{"Hats are Blue","Coats are Red","Forecast is Teal"});

It is relatively easy to make simple interactive graphics on the internet, using a combination of JavaScript (attached to data series) and the SharpPlot Addxxx methods to associate Hints, Tips, Actions and Hyperlinks with elements of a data series. Typically you could allow a user to ‘drill down’ on summary data by clicking on the bars of a barchart, and linking to a detailed display of the underlying figures. The chart below is used for all the worked examples in this section.

The methods in this class allow an application to implement similar capabilities, by converting raw co-ordinates into hotspot information, and using this to extract the hints, tips and links associated with the data. An obvious application would be to show any hints in a status field as the mouse passes over the corresponding items of the data series.

Example

pm = sp.RenderPageMap();
System.Console.WriteLine("Pagemap has "+pm.ToString());
hix = pm.FindHotspot(200,120);  // Middle bar
hi = pm.GetHotspotInfo(hix);  // Full details so we can see it
System.Console.WriteLine("Series detail is "+hi.ToString());
tip = pm.FindTip(hix);
System.Console.WriteLine("Tip for this element is "+tip);

All co-ordinates are required as (x,y) in points, with the origin at the lower-left corner of the chart. If your application allows the user to resize the form containing the chart, you will need to scale any mouse-move values back to match the paper-size that SharpPlot was called with when the chart was created. The output from the sample is:

Pagemap has Series/targets=16, Hints=2, Tips=10, Links=0, Scripts=0
Series detail is Chart=Bar1, Series=Hats, Item=2, Shape=Bar, Locator=186.9 52 216 193.3 0 0
Tip for this element is Hat 5

The locator is stored to full precision, but is rounded off to the nearest 10th pt for display here.

See also ...

SharpPlot.RenderPageMap Method | HotspotInfo Struct | HotspotType Enumeration | PageMap.PageMap Members


SharpPlot 3.71 User Manual: The Barley experiment

The Barley experiment

Many of the examples in the manual use a dataset collected in the 1930s from an experiment to investigate barley yields. Ten varieties of seed were planted at 6 farms over 2 years and the yields from each plot measured to give 120 data points.

This data can be classified and tabulated in many interesting ways, and has been the subject of many papers in the statistical journals. If you want to try out some of the tutorial examples, you will need the numbers and categories, so here they are:

int[] barleyyear = new int[] {1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,
  1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,
  1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,
  1931,1931,1931,1931,1931,1931,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,
  1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,
  1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,
  1932,1932,1932,1932,1932,1932};

string[] barleyfarm = new string[] {"University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth",
  "University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris",
  "Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth",
  "University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris",
  "Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth",
  "University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris",
  "Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth",
  "University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris",
  "Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth",
  "University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris",
  "Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth",
  "University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris",
  "Crookston","Grand Rapids","Duluth","University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth",
  "University Farm","Waseca","Morris","Crookston","Grand Rapids","Duluth"};

string[] barleyvariety = new string[] {"Manchuria","Manchuria","Manchuria","Manchuria","Manchuria","Manchuria",
  "Glabron","Glabron","Glabron","Glabron","Glabron","Glabron","Svansota","Svansota","Svansota","Svansota","Svansota",
  "Svansota","Velvet","Velvet","Velvet","Velvet","Velvet","Velvet","Trebi","Trebi","Trebi","Trebi","Trebi","Trebi",
  "No. 457","No. 457","No. 457","No. 457","No. 457","No. 457","No. 462","No. 462","No. 462","No. 462","No. 462",
  "No. 462","Peatland","Peatland","Peatland","Peatland","Peatland","Peatland","No. 475","No. 475","No. 475","No. 475",
  "No. 475","No. 475","Wisconsin No. 38","Wisconsin No. 38","Wisconsin No. 38","Wisconsin No. 38","Wisconsin No. 38",
  "Wisconsin No. 38","Manchuria","Manchuria","Manchuria","Manchuria","Manchuria","Manchuria","Glabron","Glabron",
  "Glabron","Glabron","Glabron","Glabron","Svansota","Svansota","Svansota","Svansota","Svansota","Svansota","Velvet",
  "Velvet","Velvet","Velvet","Velvet","Velvet","Trebi","Trebi","Trebi","Trebi","Trebi","Trebi","No. 457","No. 457",
  "No. 457","No. 457","No. 457","No. 457","No. 462","No. 462","No. 462","No. 462","No. 462","No. 462","Peatland",
  "Peatland","Peatland","Peatland","Peatland","Peatland","No. 475","No. 475","No. 475","No. 475","No. 475","No. 475",
  "Wisconsin No. 38","Wisconsin No. 38","Wisconsin No. 38","Wisconsin No. 38","Wisconsin No. 38","Wisconsin No. 38"};

double[] barleyyield = new double[] {27,48.87,27.43,39.93,32.97,28.97,43.07,55.2,28.77,38.13,29.13,29.67,35.13,47.33,
  25.77,40.47,29.67,25.7,39.9,50.23,26.13,41.33,23.03,26.3,36.57,63.83,43.77,46.93,29.77,33.93,43.27,58.1,28.7,45.67,
  32.17,33.6,36.6,65.77,30.37,48.57,24.93,28.1,32.77,48.57,29.87,41.6,34.7,32,24.67,46.77,22.6,44.1,19.7,33.07,39.3,
  58.8,29.47,49.87,34.47,31.6,26.9,33.47,34.37,32.97,22.13,22.57,36.8,37.73,35.13,26.17,14.43,25.87,27.43,38.5,35.03,
  20.63,16.63,22.23,26.8,37.4,38.83,32.07,32.23,22.47,29.07,49.23,46.63,41.83,20.63,30.6,26.43,42.2,43.53,34.33,19.47,
  22.7,25.57,44.7,47,30.53,19.9,22.5,28.07,36.03,43.2,25.23,26.77,31.37,30,41.27,44.23,32.13,15.23,27.37,38,58.17,
  47.17,35.9,20.67,29.33};

The yields have been rounded off to 2 decimal places to save on byte count, but otherwise the data is entirely as collected.


SharpPlot 3.71 User Manual: Grouping and Splitting database data

Grouping and Splitting database data

Many aggregations can be done very easily in SQL, and SharpPlot simply used to plot the group totals. The methods explored in this tutorial show you how to make more complex summaries and cross-tabs directly from the raw data series.

Grouped Barchart of Quarterly Sales

This example makes use of the DbUtil class to extract entire columns from a sample dataset (supplied as XML) and make a simple summary using grouping and splitting. Here is the finished chart and the complete source code to generate it:

// Simple example to show how we make a chart from a dataset
// Uses sample Sales.xml shipped with SharpPlot and the DbUtil class

using System;
using System.Data;
using Causeway;

class charttest
{
  static void Main()
  {
    SharpPlot sp = new SharpPlot();
    DataSet ds = new DataSet();

   // Initialise the dataset from the XML (schema is included)
    ds.ReadXml("Sales.xml");
    DataTable summary = ds.Tables[1];
    DataRow[] sel = summary.Select();  // All rows are fine here

    int[] col_sales = DbUtil.GetIntegers(sel,"Sales");
    string[] col_prodid = DbUtil.GetStrings(sel,"Product");
    string[] col_qtr = DbUtil.GetStrings(sel,"Quarter");

    sp.SplitBy(col_prodid); // One bar for each product
    sp.GroupBy(col_qtr);    // Accumulate quarters

    sp.BarChartStyle = BarChartStyles.ForceZero|BarChartStyles.StackedBars;
    sp.Heading = "Quarterly Sales Summary";
    sp.YCaption = "Tonnes";
    sp.YAxisStyle = YAxisStyles.AtEndCaption;

   // Use the product names for the keys (tables have the same ordering)
    sp.SetKeyText(DbUtil.GetStrings(ds.Tables[0].Select(),"Product Name"));

    sp.DrawBarChart(col_sales);

   // Save to SVG file
    sp.SaveSvg("dbdemo1.svg",SvgMode.FixedAspect);
  }
 }

Some things to note is the example:

  • The first step is to make a selection from the table – in this case we just take all the rows in primary key sequence.
  • Then we can pick out the required columns one by one – the data is returned as typed arrays
  • SharpPlot can use the Quarters to aggregate the sales values, and the Product Ids to split them
  • The Key text is set by default to the Ids used to split the data – here we override with the full product names.

With real data, you will probably have to take care to have the selections ordered correctly, but the basic principles should be very similar.

Plotting a Simple Timeseries (Share price data)

This example makes a comparative plot of two popular UK shares to get an idea which has performed better over the last three years. Note the formatting of the date column to obtain well-structured X-axis labelling.

The Date column should be retrieved as integers, which forces a conversion to OLEDate values


SharpPlot 3.71 User Manual: Sample datasets supplied as XML

Sample datasets supplied as XML

Several simple databases are included with the SharpPlot distribution to allow you to experiment with grouping and splitting data. The smallest of these is an invented Sales Information database with two products and some monthly figures:

Products Table
==============

 Column Name   Data Type      Allow Null  Unique
 -----------   ---------      ----------  ------
 Product Id    System.String           0       1
 Product Name  System.String           1       0

Sales Table
===========

 Column Name  Data Type        Allow Null  Unique
 -----------  ---------        ----------  ------
 Date         System.DateTime           0       0
 Year         System.Int32              1       0
 Month        System.String             1       0
 Quarter      System.String             1       0
 Product      System.String             0       0
 Sales        System.Int32              1       0

There are two products, and 30 entries in the sales information.

The XML souce is:

<?xml version="1.0" standalone="yes"?>
<Sales_x0020_Information>
  <xs:schema id="Sales_x0020_Information" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="Sales_x0020_Information" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Products">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Product_x0020_Id" type="xs:string" />
                <xs:element name="Product_x0020_Name" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="Sales">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Date" type="xs:dateTime" />
                <xs:element name="Year" type="xs:int" minOccurs="0" />
                <xs:element name="Month" type="xs:string" minOccurs="0" />
                <xs:element name="Quarter" type="xs:string" minOccurs="0" />
                <xs:element name="Product" type="xs:string" />
                <xs:element name="Sales" type="xs:int" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
      <xs:unique name="Constraint1" msdata:PrimaryKey="true">
        <xs:selector xpath=".//Products" />
        <xs:field xpath="Product_x0020_Id" />
      </xs:unique>
      <xs:unique name="Sales_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
        <xs:selector xpath=".//Sales" />
        <xs:field xpath="Date" />
        <xs:field xpath="Product" />
      </xs:unique>
      <xs:keyref name="Distribution" refer="Constraint1">
        <xs:selector xpath=".//Sales" />
        <xs:field xpath="Product" />
      </xs:keyref>
    </xs:element>
  </xs:schema>
  <Products>
    <Product_x0020_Id>KK</Product_x0020_Id>
    <Product_x0020_Name>Kit Kat</Product_x0020_Name>
  </Products>
  <Products>
    <Product_x0020_Id>QS</Product_x0020_Id>
    <Product_x0020_Name>Quality Street</Product_x0020_Name>
  </Products>
  <Sales>
    <Date>2005-01-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Jan</Month>
    <Quarter>Q1</Quarter>
    <Product>KK</Product>
    <Sales>341</Sales>
  </Sales>
  <Sales>
    <Date>2005-02-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Feb</Month>
    <Quarter>Q1</Quarter>
    <Product>KK</Product>
    <Sales>482</Sales>
  </Sales>
  <Sales>
    <Date>2005-03-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Mar</Month>
    <Quarter>Q1</Quarter>
    <Product>KK</Product>
    <Sales>467</Sales>
  </Sales>
  <Sales>
    <Date>2005-04-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Apr</Month>
    <Quarter>Q2</Quarter>
    <Product>KK</Product>
    <Sales>403</Sales>
  </Sales>
  <Sales>
    <Date>2005-05-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>May</Month>
    <Quarter>Q2</Quarter>
    <Product>KK</Product>
    <Sales>325</Sales>
  </Sales>
  <Sales>
    <Date>2005-06-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Jun</Month>
    <Quarter>Q2</Quarter>
    <Product>KK</Product>
    <Sales>302</Sales>
  </Sales>
  <Sales>
    <Date>2005-07-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Jul</Month>
    <Quarter>Q3</Quarter>
    <Product>KK</Product>
    <Sales>287</Sales>
  </Sales>
  <Sales>
    <Date>2005-08-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Aug</Month>
    <Quarter>Q3</Quarter>
    <Product>KK</Product>
    <Sales>290</Sales>
  </Sales>
  <Sales>
    <Date>2005-09-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Sep</Month>
    <Quarter>Q3</Quarter>
    <Product>KK</Product>
    <Sales>318</Sales>
  </Sales>
  <Sales>
    <Date>2005-10-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Oct</Month>
    <Quarter>Q4</Quarter>
    <Product>KK</Product>
    <Sales>371</Sales>
  </Sales>
  <Sales>
    <Date>2005-11-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Nov</Month>
    <Quarter>Q4</Quarter>
    <Product>KK</Product>
    <Sales>403</Sales>
  </Sales>
  <Sales>
    <Date>2005-12-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Dec</Month>
    <Quarter>Q4</Quarter>
    <Product>KK</Product>
    <Sales>497</Sales>
  </Sales>
  <Sales>
    <Date>2006-01-01T00:00:00+00:00</Date>
    <Year>2006</Year>
    <Month>Jan</Month>
    <Quarter>Q1</Quarter>
    <Product>KK</Product>
    <Sales>383</Sales>
  </Sales>
  <Sales>
    <Date>2006-02-01T00:00:00+00:00</Date>
    <Year>2006</Year>
    <Month>Feb</Month>
    <Quarter>Q1</Quarter>
    <Product>KK</Product>
    <Sales>480</Sales>
  </Sales>
  <Sales>
    <Date>2006-03-01T00:00:00+00:00</Date>
    <Year>2006</Year>
    <Month>Mar</Month>
    <Quarter>Q1</Quarter>
    <Product>KK</Product>
    <Sales>512</Sales>
  </Sales>
  <Sales>
    <Date>2006-04-01T00:00:00+01:00</Date>
    <Year>2006</Year>
    <Month>Apr</Month>
    <Quarter>Q2</Quarter>
    <Product>KK</Product>
    <Sales>378</Sales>
  </Sales>
  <Sales>
    <Date>2006-05-01T00:00:00+01:00</Date>
    <Year>2006</Year>
    <Month>May</Month>
    <Quarter>Q2</Quarter>
    <Product>KK</Product>
    <Sales>328</Sales>
  </Sales>
  <Sales>
    <Date>2006-06-01T00:00:00+01:00</Date>
    <Year>2006</Year>
    <Month>Jun</Month>
    <Quarter>Q2</Quarter>
    <Product>KK</Product>
    <Sales>297</Sales>
  </Sales>
  <Sales>
    <Date>2005-01-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Jan</Month>
    <Quarter>Q1</Quarter>
    <Product>QS</Product>
    <Sales>173</Sales>
  </Sales>
  <Sales>
    <Date>2005-02-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Feb</Month>
    <Quarter>Q1</Quarter>
    <Product>QS</Product>
    <Sales>82</Sales>
  </Sales>
  <Sales>
    <Date>2005-03-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Mar</Month>
    <Quarter>Q1</Quarter>
    <Product>QS</Product>
    <Sales>313</Sales>
  </Sales>
  <Sales>
    <Date>2005-04-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Apr</Month>
    <Quarter>Q2</Quarter>
    <Product>QS</Product>
    <Sales>67</Sales>
  </Sales>
  <Sales>
    <Date>2005-10-01T00:00:00+01:00</Date>
    <Year>2005</Year>
    <Month>Oct</Month>
    <Quarter>Q4</Quarter>
    <Product>QS</Product>
    <Sales>102</Sales>
  </Sales>
  <Sales>
    <Date>2005-11-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Nov</Month>
    <Quarter>Q4</Quarter>
    <Product>QS</Product>
    <Sales>217</Sales>
  </Sales>
  <Sales>
    <Date>2005-12-01T00:00:00+00:00</Date>
    <Year>2005</Year>
    <Month>Dec</Month>
    <Quarter>Q4</Quarter>
    <Product>QS</Product>
    <Sales>617</Sales>
  </Sales>
  <Sales>
    <Date>2006-01-01T00:00:00+00:00</Date>
    <Year>2006</Year>
    <Month>Jan</Month>
    <Quarter>Q1</Quarter>
    <Product>QS</Product>
    <Sales>98</Sales>
  </Sales>
  <Sales>
    <Date>2006-02-01T00:00:00+00:00</Date>
    <Year>2006</Year>
    <Month>Feb</Month>
    <Quarter>Q1</Quarter>
    <Product>QS</Product>
    <Sales>12</Sales>
  </Sales>
  <Sales>
    <Date>2006-03-01T00:00:00+00:00</Date>
    <Year>2006</Year>
    <Month>Mar</Month>
    <Quarter>Q1</Quarter>
    <Product>QS</Product>
    <Sales>67</Sales>
  </Sales>
  <Sales>
    <Date>2006-04-01T00:00:00+01:00</Date>
    <Year>2006</Year>
    <Month>Apr</Month>
    <Quarter>Q2</Quarter>
    <Product>QS</Product>
    <Sales>267</Sales>
  </Sales>
  <Sales>
    <Date>2006-05-01T00:00:00+01:00</Date>
    <Year>2006</Year>
    <Month>May</Month>
    <Quarter>Q2</Quarter>
    <Product>QS</Product>
    <Sales>28</Sales>
  </Sales>
</Sales_x0020_Information>

See also ...

Grouping and Splitting database data


SharpPlot 3.71 User Manual: Chart Samples

Chart Samples

This section shows typical usages of the different chart types supported by SharpPlot.

Each of the following tutorials has a set of four examples showing how a particular chart type can be used.

Bar charts for small series
The Barchart is probably the simplest and most commonly used graphic on the web. It is an ideal format for presenting summary data in multiple categories, and often works much better than a Piechart if the object is to allow the reader to compare values easily.
Box-and-Whisker plots for multivariate data
A selection of simple Box-and-Whisker charts are developed here, all using a ‘classic’ dataset from the 1930s showing barley yields at various farms in Canada. The trials were made at 6 farms over 2 years, with 10 varieties of barley, giving 120 data-points in total. The entier dataset can be found here.
Bubble charts for discrete XYZ data
This tutorial builds four simple examples of bubble-charts, showing how the markers scale to represent an extra dimension in the data. Regression models may be used with the bubble-chart – naturally the area of the bubble weights the model-fit appropriately. User-defined markers can be used to good effect also, as the final example illustrates.
Cloud charts for discrete XYZ data with perspective
The CloudChart or XYZ Scatter is a surprisingly versatile method for diagramming data in 3 dimensions. The four examples shown here illustrate a few of the possibilities.
Contour plots for XYZ interpolation
Contour plots offer a 2-dimensional alternative to CloudCharts when it is necessary to visualize ‘height’ data in addition to x and y values. The data may be geographic (rainfall totals from a number of weather stations) or simply a model of 3 variables (house prices as a function of the age of the property and its floor area).
Dials and Gauges for isolated numbers
The Dial chart is the only charttype in SharpPlot which typically takes a single number, rather than an array. It is possible to use charts like the XBarchart to imitate thermometers and other simple gauges, but the Dial has the benefit of showing some of the context of the data with warning zones, datum lines and other cues.
Gantt charts for timewise bars
The Gantt chart was originally developed as a good way to represent activities across time, and was popularised by tools such as Microsoft Project. It may be used in a variety of planning scenarios, or simply to show the status of some activity or piece of machinery across time (say machine performance across the day).
Histograms for distributions
All the examples which follow use the same set of values – the sum of three dice, thrown repeatedly. Clearly the range will vary from 3 to 18, with the more likely values falling in the middle.
Line graphs and Time series
Although it is called ‘Linegraph’ this SharpPlot method can do markers, risers from the X-axis, filled surfaces and so on, in any combination. Typically it is used for timeseries data, but of course it can also draw any continuous curve when given x as well as y co-ordinates.
Min-Max or Hi-Lo charts
This chart is often used in combination with a LineGraph or ScatterPlot to show range in addition to daily values. The first example creates a typical ‘High-Low-Close’ chart from daily share price information, and the second shows how errorbars can be added to a scatterplot of experimental data. However, it can be used on its own, for example to show the span of frost-free days across the year as a timeseries.
Multiples for small thumbnails
One of the best innovations in Tufte’s “The Visual Display of Quantitative Information” is the idea of using an array of miniature charts to display multi-dimensional data. Often a series of values are recorded at (say) several sites or on several days, then are superimposed on a single chart as a collection of dotted and dashed lines in various colors. This often makes it very hard to see the patterns and relationships in the data.
Network Map for nodes and links
The Network Map offers the ability to display a list of nodes and all their mutual links. The DrawNetworkMap help page demonstrates that flat links are suited for an unoriented dense network on the default (circular) layout. Let’s explore a few more uses of network maps.
Pie charts and Rose diagrams
Piecharts are best used with a small number of data items where the values represent some part of a total. Typically the numbers will be percentages, and the sector values will differ significantly. If it is important for the user to be able to compare values accurately, a simple Barchart is almost always a better choice.
Polar and Radar charts
The ‘Radar’ chart is logically similar to a Barchart, in that the given data is arranged at equal intervals. The difference is that the Radar chart arranges the values around a circle at equal angles, which is often a good way of comparing several sets of performance indicators.
Response surfaces
The response surface is generally used with computed data to show a mathematical function of two variables. It may be combined with other 3D charts (typically the cloud chart) to show a theoretical fit in addition to the raw data plotted in 3 dimensions.
Scatter plots for discrete XY data
The scatterplot (or scatter diagram) is almost always the first step in analysing any collection of data. Typically you are trying ti isolate one or more causes, in the attempt to predict some effect. These examples all use some data on house-prices, with the idea of being able to predict the price of any house given its type and floor area.
Step charts for discontinuous data
Step charts are used for two main chart-types. They are a very convenient way of plotting a timeseries where there may be an instantaneous change between values, which then stay fixed for some time – government interest-rates are typical. Filled stepcharts work well in combination with Barcharts, and they can also be used instead of the Histogram where data has been aggregated into categories of varying widths.
Tabulating data
SharpPlot can tabulate as well as chart, but please be aware that these tables are not designed to display large amounts of complex data. They are for summaries and simple CrossTabs where a limited amount of data can be used to augment a complex chart. The examples show a table used as a chart in its own right, and some simple summaries and groupings added as ‘notes’ to typical timeseries data.
Tower charts for 3D bars
Towercharts are good for visual impact, but are rarely an effective way to present numbers where the values are important. These examples parallel some of the examples in the tutorial on tables, as a Towerchart is really just a simple way to present a two-way tabulation in visual form.
Trace charts for multiple series
Trace charts (or ECG plots) are often a convenient way to add an extra dimension to a two-dimensional chart. They are similar in principle to the small multiple, but save a lot of redundant ink when all the series share the same X-axis. Trace-charts are also used as a simple way to draw Kite Diagrams, which are a common graphical tool for botanical field studies.
Triangle plots for 3-way proportions
The Triangle chart is used to analyse data where there are three important constituents, summing to unity. It is common in Geology and Chemical Engineering where a set of 3 key ingredients determines the outcome from some process.
Vector fields and directed graphs
This style of plot can be used in two very different ways, to show either directed graphs, or to plot vector fields as a scatter diagram. The examples illustrate both of these.
Venn diagrams
Venn diagrams are used to summarise set membership information. SharpPlot will draw a proportional diagram for two sets (and one intersection) but for the three set case the chart is purely diagrammatic, as it is impossible to scale all the regions in the correct proportion. Diagrams for higher numbers of sets are not supported.
X Bar charts for positioned bars
Barcharts are usually drawn with a ‘logical’ X-axis. However there are times when you want to represent discrete values which occur at particular times. the XBarchart allows you to place bars exactly where you want them, and also to override the normal width for each bar.


SharpPlot 3.71 User Manual: Bar charts for small series

Bar charts for small series

The Barchart is probably the simplest and most commonly used graphic on the web. It is an ideal format for presenting summary data in multiple categories, and often works much better than a Piechart if the object is to allow the reader to compare values easily.

This short tutorial show 4 variations on a basic barchart, illustrating many of the common properties and styles of labelling that are available.

Grouped data in a vertical chart

data = new int[][]{new int[]{6,18,27,31,40,43},new int[]{17,33,42,54,71,78}};

sp.Heading = "Comparative Spend 2004-5";
sp.BarChartStyle = BarChartStyles.TicksBetween|BarChartStyles.ValueTags|
         BarChartStyles.ForceZero;
sp.XAxisStyle = XAxisStyles.MiddleLabels|XAxisStyles.GridLines;

sp.ValueTagStyle = ValueTagStyles.Vertical|ValueTagStyles.Inside|
         ValueTagStyles.SectorValues|ValueTagStyles.RecolorOutside;
sp.SetValueFont("Arial",10,FontStyle.Bold,Color.LightYellow);
sp.ValueTagFormat = "###0 Units";

sp.Gap = 0;
sp.GroupGap = 0.5;
sp.SetColors(new Color[]{Color.Green,Color.Maroon});

sp.XLabelFormat = "Proj-XX";
sp.SetXLabels(new string[]{"A2","18","Q5","T6","T8","32"});
sp.SetKeyText(new string[]{"Last Year","This Year"});

sp.DrawBarChart(data);

This simple barchart illustrates several SharpPlot features which are designed to make the programmer’s life easy. Notice how the value-tags hop on top of the bars when they run out of space. In this case the ‘Recolor’ style has been used to have them take on the color of the bar (rather than white) when this happens.

The gap between bars (within each group) has been closed up completely, and the gap between groups reduced to half the width of one bar. By setting both gaps ‘relative to bar’ in this way, SharpPlot will adapt automatically to new data series with more or fewer bars.

Notice how the XLabelFormat has been used to expand slightly on the project identifiers used as labels.

Stacked bars, drawn horizontally

data = new int[][]{new int[]{21,18,27,31,40,43,56},new int[]{12,33,42,54,71,78,88}};

sp.Heading = "Cumulative Resource Usage";
sp.BarChartStyle = BarChartStyles.TicksBetween|BarChartStyles.ValueTags|
         BarChartStyles.ForceZero|BarChartStyles.Horizontal|
         BarChartStyles.StackedBars;
sp.YAxisStyle = YAxisStyles.MiddleLabels|YAxisStyles.GridLines|YAxisStyles.CenteredCaption;
sp.ValueTagStyle = ValueTagStyles.Middle|ValueTagStyles.SectorValues;
sp.SetValueFont("Arial",8,FontStyle.Bold,Color.DarkSlateBlue);
sp.ValueTagFormat = "###0\nUnits";

sp.Gap = 0;
sp.MarginLeft = 48;

sp.SetColors(new Color[]{Color.Green,Color.Red});
sp.SetFillStyles(FillStyle.Halftone);

sp.YLabelFormat = "Project\n#0000";  // Allows newlines here
sp.SetYLabels(new int[] {12,18,5,67,8,32});
sp.SetKeyText(new string[]{"Last Year","This Year"});

sp.DrawBarChart(data);

Bars, colored by category

This is a very typical political graphic, where a small amount of data must be clearly presented with consistent coloring.

Party = new string[]{"Con","Lib","Lab"};
Vote2001 = new int[] {20711,15836,6470};

sp.SetMargins(42,48,36,18);
sp.Heading = "How Ryedale voted\nin 2001!";
sp.HeadingStyle = HeadingStyles.Right;

sp.SetHeadingFont("ARB",16,Color.Navy);
sp.SetValueFont("ARB",12,Color.Navy);
sp.SetLabelFont("ARB",12,Color.Black);

sp.SetColors(new Color[] {Color.Navy,ColorTranslator.FromHtml("#FAB32E"),
         ColorTranslator.FromHtml("#D3342C")});
sp.SetXLabels(Party);

sp.DataStyle = DataStyles.Rows;  // One series per value is required
sp.BarChartStyle = BarChartStyles.ValueTags;
sp.KeyStyle = KeyStyles.NoKey;

sp.ValueTagFormat = "Votes:\n##,###";
sp.YAxisStyle = YAxisStyles.NoAxis|YAxisStyles.ForceZero;
sp.DrawBarChart(Vote2001);

Horizontal, with ticks gridlines between bars

This chart of oil reserves is again designed for easy reading, and uses the horizontal style to allow space for the labels.

sp.SetBackground(Color.White,FillStyle.Solid);

country = new string[]{"Syria","Qatar","Oman","Kuwait","Iraq","UAE","Iran","Saudi Arabia"};
barrels = new int[] {560,715,910,2025,2505,2580,2550,8595};

sp.SetMargins(36,24,72,16);
sp.SetColors(Color.Firebrick);
sp.SetFillStyles(FillStyle.GradientLeft);

sp.BarChartStyle = BarChartStyles.Horizontal|BarChartStyles.ValueTags|
         BarChartStyles.TicksBetween;
sp.XAxisStyle = XAxisStyles.ForceZero|XAxisStyles.NoAxis;
sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.MiddleLabels|YAxisStyles.InvisibleAxis;
sp.YTickStyle = YTickStyles.NoTicks;

sp.Gap = 0.3;

sp.SetLabelFont("Arial",10,Color.Black);

sp.SetValueFont("Arial",10,FontStyle.Bold,Color.Black);
sp.ValueTagFormat = "#,##0";
sp.ValueTagStyle = ValueTagStyles.Inside;

sp.Heading = "Middle East Oil Production";
sp.SetHeadingFont("ARB",14,Color.Black);
sp.HeadingStyle = HeadingStyles.Left;

sp.Subheading = "Production,1000s of Barrels/day";
sp.SetSubheadingFont("Arial",10,Color.Black);

sp.Footnote = "Source BP(1999 figures)";
sp.FootnoteStyle = FootnoteStyles.Right|FootnoteStyles.RuledAbove;
sp.SetFootnoteFont("Arial",8,Color.Black);

sp.SetYLabels(country);
sp.DrawBarChart(barrels);


SharpPlot 3.71 User Manual: Box-and-Whisker plots for multivariate data

Box-and-Whisker plots for multivariate data

A selection of simple Box-and-Whisker charts are developed here, all using a ‘classic’ dataset from the 1930s showing barley yields at various farms in Canada. The trials were made at 6 farms over 2 years, with 10 varieties of barley, giving 120 data-points in total. The entier dataset can be found here.

The object of the trial was to see what the significant effects were, and the boxplot is an ideal way to explore relationships between variables. You might also check on the histograms of various subsets of the data, maybe using a Multiple chart to split the data by various criteria.

Spread of a single series

This chart simple takes the entire yield vector, and determines the ‘shape’ of the distribution.

sp.Heading = "Barley Yield (uncategorised)";
sp.SetColors(Color.Orange);
sp.XAxisStyle = XAxisStyles.ForceZero;
sp.YAxisStyle = YAxisStyles.NoAxis;
sp.BoxPlotStyle = BoxPlotStyles.Horizontal;
sp.DrawBoxPlot(barleyyield);

The chart shows the Median yield is about 32kg per acre, with 75% of the values falling in the range 26-42. There are outliers on both sides, and the shape of the data looks a little skewed. SharpPlot has been told not to draw a Y-Axis here, as the vertical dimension is meaningless.

Two categories, to compare distributions

The first obvious question to ask would be “were the years comparable?”. This is easily answered by splitting the dataset by year and repeating the chart.

sp.Heading = "Yields Compared by Year";
sp.SetColors(Color.Orange);
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.BoxPlotStyle = BoxPlotStyles.DecileWhiskers;
sp.DrawBoxPlot(barleyyield,barleyyear);

Note that the BoxPlot call now has 2 arguments, the first is the data, and the second the categorisation. This example is drawn with ‘Deciles’ shown in the whiskers, which indicate that the lower end of the range has a few outlying values. However it is fairly clear that there was not a big difference between the years.

Several categories, drawn horizontally

So maybe the farm was an important factor? Let’s try passing the farm name as the category, using a horizontal plot to leave plenty of room for the long names.

sp.SetBackground(Color.White,FillStyle.Solid);

sp.MarginLeft = 72;
sp.Heading = "Yields by Farm";
sp.SetColors(Color.Orange);
sp.XAxisStyle = XAxisStyles.ForceZero;
sp.BoxPlotStyle = BoxPlotStyles.Horizontal;
sp.DrawBoxPlot(barleyyield,barleyfarm);

That looks clear enough! The best yield at Duluth is barely up to the poorest result at Waseca. Some farms are also much more variable, so maybe we should look at combinations of variables as well as a single factor.

Vertical, using a 2-way split

This chart takes another approach to the names, setting up a format string to force them to wrap nicely between the tickmarks. Two categories are given – the first spreads the data across the X-axis as before and the second (or inner category) adds an extra level of fine structure which is annotated automatically in the chart legend.

sp.Heading = "Yield Split by Farm and by Year";
sp.SetColors(new Color[]{Color.Orange,Color.GreenYellow});
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.XAxisStyle = XAxisStyles.MiddleLabels|XAxisStyles.GridLines;
sp.BoxPlotStyle = BoxPlotStyles.TicksBetween;
sp.XLabelFormat = "XXXXXX;";
sp.DrawBoxPlot(barleyyield,barleyfarm,barleyyear);

Interestingly, there were very big variations by year but they were very different at the different farms, so the simplistic split by year completely masked the effect. This style of chart makes the effect very clear indeed.

Summary

Boxplots are an excellent tool for exploring a complex dataset with many factors contributing to a single outcome. SharpPlot makes it easy to slice the data any way you like to bring the important variables to the fore.


SharpPlot 3.71 User Manual: Bubble charts for discrete XYZ data

Bubble charts for discrete XYZ data

This tutorial builds four simple examples of bubble-charts, showing how the markers scale to represent an extra dimension in the data. Regression models may be used with the bubble-chart – naturally the area of the bubble weights the model-fit appropriately. User-defined markers can be used to good effect also, as the final example illustrates.

A Simple Weighted Scatter

This is the most obvious use of the bubblechart. Three vectors of data are provided, giving the x,y co-ordinates of each value and a count of the number of items at that point.

ydata = new int[] {190,270,310,120,190,230};
xdata = new int[] {17,31,29,14,16,24};
count = new int[] {12,65,77,7,9,112};

sp.Heading = "Incident count";

sp.SetXTickMarks(5);
sp.SetYTickMarks(50);

sp.SetMarkers(Marker.Bullet);
sp.SetMarkerScales(5);
sp.BubbleChartStyle = BubbleChartStyles.GridLines|BubbleChartStyles.ValueTags;
sp.SetValueTags(count);
sp.SetValueFont("Arial",10);
sp.DrawBubbleChart(ydata,xdata,count);
sp.SetKeyText("Number of Incidents");

Note that this chart adds Value tags to the markers to give an exact value for the count at that point.

Two categories, to compare series

This chart shows data collected from two similar experiments, and allows a quick comparison of the success of each (maybe the number of seeds which germinated under gven lighting and temperature).

ydata = new int[] {190,270,310,120,190,230,200,240,311,110};
xdata = new int[] {17,31,29,14,16,24,19,24,30,12};
count = new int[] {12,65,77,7,9,112,18,194,90,17};
type = new int[] {1,1,1,1,1,1,2,2,2,2};

sp.Heading = "Two Experiments Compared";

sp.SetMarkers(Marker.Bullet);
sp.SetMarkerScales(5);
sp.SetColors(new Color[] {Color.Orange,ColorTranslator.FromHtml("#80006666")});

sp.BubbleChartStyle = BubbleChartStyles.GridLines|BubbleChartStyles.ExplodeAxes;
sp.SetKeyText(new string[]{"Old method","New method"});
sp.SplitBy(type);
sp.DrawBubbleChart(ydata,xdata,count);

Note that the axes are ‘exploded’ here to keep them out of the way of the data. Note also the use of semi-transparent markers to avoid the second series obscuring results from the first.

Weighted modelfit

This example illustrates the way the regression line is weighted by the count at each data-point.

ydata = new int[] {190,270,310,120,190,230};
xdata = new int[] {17,31,29,14,16,24};
count = new int[] {12,15,77,97,9,112};

sp.Heading = "Weighted Regression";

sp.SetYTickMarks(50);

sp.SetMarkers(Marker.Lozenge);
sp.SetMarkerScales(5);
sp.BubbleChartStyle = BubbleChartStyles.GridLines|BubbleChartStyles.ModelFit|
         BubbleChartStyles.HaloMarkers;

sp.DrawBubbleChart(ydata,xdata,count);
sp.SetKeyText(new string[]{"Incident count","Weighted model"});

You can see that the fitted line is strongly biased towards the points with more data.

User-defined Markers showing categories

This example exploits two standard WingDings characters to show the number of contacts by phone and mail.

ydata = new int[] {190,270,310,120,190,230,200,240,311,110};
xdata = new int[] {17,31,29,14,16,23,19,24,30,12};
count = new int[] {12,65,77,7,9,112,18,194,90,17};
type = new int[] {1,1,1,1,1,1,2,2,2,2};

sp.Heading = "User-defined Markers";

sp.SetColors(new Color[]{Color.Orange,Color.Purple});

// Telephone and Letter symbols
sp.SetMarkers(new Marker[]{(new Marker("wingdings,9,)")),new Marker("wingdings,9,+")});
sp.SetMarkerScales(5);
sp.BubbleChartStyle = BubbleChartStyles.GridLines|BubbleChartStyles.ExplodeAxes;

sp.SplitBy(type);
sp.DrawBubbleChart(ydata,xdata,count);
sp.SetKeyText(new string[]{"Contacts by Phone","Contacts by Letter"});

Note that there is no need to have the markers drawn semi-transparently here as they are only drawn in outline. Several other characters in the WingDings font are extremely useful for categorised data, for example the circled numbers may be used to represent up to 20 categories very effectively.

Summary

The Bubblechart is an effective way of combining dimensions where you need to show how many events occurred at a particular combination of X and Y values (such as the number of artifacts found in each grid square on a field survey). Transparency can be used effectively where there are many overlapping bubbles.


SharpPlot 3.71 User Manual: Cloud charts for discrete XYZ data with perspective

Cloud charts for discrete XYZ data with perspective

The CloudChart or XYZ Scatter is a surprisingly versatile method for diagramming data in 3 dimensions. The four examples shown here illustrate a few of the possibilities.

A Simple Scatter plot in XYZ space

sp.SetMargins(24,32,18,6);
sp.Heading = "XYZ Scatter";
sp.HeadingStyle = HeadingStyles.Right;

zdata = new int[] {12,65,77,117,9,112};
xdata = new int[] {17,31,29,21,30,21};
ydata = new int[] {190,270,310,300,190,230};

sp.CloudChartStyle = CloudChartStyles.WallShading|CloudChartStyles.Risers|
         CloudChartStyles.HaloMarkers;
sp.ZAxisStyle = ZAxisStyles.ForceZero;
sp.XAxisStyle = XAxisStyles.GridLines;
sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.FlatText;
sp.SetZTickMarks(50);
sp.SetYTickMarks(20);
sp.SetMarkerScales(2);
sp.SetMarkers(Marker.Ball);

sp.DrawCloudChart(xdata,ydata,zdata);

This style of chart would often be used with a large dataset (several thousand points) to get a feel for the general shape of a distribution. In this example ‘risers’ have been drawn from the xy plane to give a better idea of where the points are placed.

Shaded planes to compare several series

sp.SetMargins(24,24,18,6);

series1 = new int[] {5,6,7,4,3,6,5,4};
series2 = new int[] {4,5,4,7,4,5,5,3};
xdata = new int[] {4,5,7,8,9,11,12,15};

sp.Heading = "Shaded\nPlanes";
sp.HeadingStyle = HeadingStyles.Right;

sp.SetViewpoint(33,18,54);
sp.SetColors(new Color[]{Color.OrangeRed,Color.ForestGreen});
sp.SetFillStyles(FillStyle.Opacity66);
sp.SetLineStyles(LineStyle.Solid);
sp.CloudChartStyle = CloudChartStyles.NoMarkers|CloudChartStyles.SurfaceShading|
         CloudChartStyles.Lines|CloudChartStyles.GridLines;
sp.SetYRange(0.5,2.5);
sp.YAxisStyle = YAxisStyles.PlainAxis;
sp.ZAxisStyle = ZAxisStyles.ForceZero;

sp.DrawCloudChart(xdata,new int[]{2,2,2,2,2,2,2,2},series2);  // First plane
sp.DrawCloudChart(xdata,new int[]{1,1,1,1,1,1,1,1},series1);

This diagram shows the cloud-chart being used in a similar way to the Excel Ribbon chart to compare series. This is generally done for visual effect rather than as a serious attempt to compare the data values. However it does illustrate the versatility of the Cloudchart when used as a general-purpose 3D drawing tool. If you start by setting fixed ranges on all 3 axes, you can draw any number of lines of filled shapes in the rctangular co-ordinate system within the chart walls.

This chart is also drawn with a slightly modified viewpoint. The best viewing angle for any particular dataset is obviously a matter of experiment.

Fitted quadratic surface

Just as the ScatterPlot can fit a regression-line to the data, the Cloudchart can fit a regression surface.

sp.SetMargins(24,32,18,6);

sp.Heading = "Modelled\nSurface";
sp.HeadingStyle = HeadingStyles.Right;

zdata = new int[] {12,65,77,117,9,112};
xdata = new int[] {17,31,29,21,30,24};
ydata = new int[] {190,270,310,300,190,230};

sp.SetZTickMarks(50);

sp.CloudChartStyle = CloudChartStyles.WallShading|CloudChartStyles.ModelFit;
sp.SetWallFillStyles(FillStyle.Halftone);

sp.SetOrderOfFit(2,1);
sp.EquationFormat = "z = C0 + C1x + C2x² + C3y";

sp.ZAxisStyle = ZAxisStyles.ForceZero;
sp.YAxisStyle = YAxisStyles.FlatText;
sp.SetPenWidths(1.2);

sp.SetMarkers(Marker.Node);
sp.DrawCloudChart(xdata,ydata,zdata);
sp.SetKeyText(sp.Equation);

The model in this case is quadratic in the X-direction and linear in Y to give the simple folded surface shown. The order of fit may be up to 4 (quartic) in either direction.

Trend surface with contour lines

sp.SetMargins(24,32,18,6);

zdata = new int[] {100,15,27,117,19,112};
xdata = new int[] {17,31,29,21,30,24};
ydata = new int[] {190,270,310,300,190,230};

sp.Heading = "Trend\nSurface";
sp.HeadingStyle = HeadingStyles.Right;

sp.SetZTickMarks(50);  // Contour interval also

sp.CloudChartStyle = CloudChartStyles.WallShading|CloudChartStyles.TrendSurface|
         CloudChartStyles.Contours|CloudChartStyles.GridLines|
         CloudChartStyles.TiledSurface;

sp.Flexibility = 1;
sp.ZAxisStyle = ZAxisStyles.ForceZero;
sp.YAxisStyle = YAxisStyles.FlatText;
sp.SetFillStyles(FillStyle.Opacity30);
sp.SetMarkerScales(2);

sp.SetMarkers(Marker.Node);
sp.DrawCloudChart(xdata,ydata,zdata);

This is again the analagous style to the ‘trendline’ available in the ScatterPlot. The surface is a gaussian-weighted smooth which can be controlled with the Flexibility property. With so few points, the sample sets the flex very low indeed as otherwise the surface would resemble a series of plateaux around each point. With a realistically large data array (probably several hundred points) the default flexibility would be more suitable.

Contour lines are drawn at each Z-axis tickmark, and the ‘grid’ is computed at the intersection of each x-y tick. The MeshDensity property can be used to add more points into the mesh to make a smoother surface.

Summary

Cloudcharts can be a really effective way to visualize genuine 3D datasets. However for serious data analysis it is probably better to use a set of simple 2D charts to show appropriate sections through the data.


SharpPlot 3.71 User Manual: Contour plots for XYZ interpolation

Contour plots for XYZ interpolation

Contour plots offer a 2-dimensional alternative to CloudCharts when it is necessary to visualize ‘height’ data in addition to x and y values. The data may be geographic (rainfall totals from a number of weather stations) or simply a model of 3 variables (house prices as a function of the age of the property and its floor area).

Depending on the type of data, SharpPlot can fit a variety of models to generate the contours for the height dimension. These four examples show how very similar numbers can create very different maps depending on the chosen approach. The key properties are the order of fit (which creates an underlying model) and flexibility (which determines how far the computed surface can deviate from the model).

Note that the ContourPlot is just an extension of the simple ScatterPlot, and shares many of its style settings.

A Simple 2-variable Regression Surface

This example fits the same Quadratic surface as the third CloudChart tutorial. You can see that several of the points fall on the ‘wrong’ side of the line, which is very reasonable for a noisy dataset where the Z-values may be subject to a large random error.

sp.Heading = "Modelled Surface using Contours";

zdata = new int[] {12,65,77,117,9,112};
xdata = new int[] {17,31,29,21,30,24};
ydata = new int[] {190,270,310,300,190,230};

sp.SetOrderOfFit(2,1);
sp.Flexibility = 0;
sp.EquationFormat = "z = C0 + C1x + C2x² + C3y";

sp.ContourPlotStyle = ContourPlotStyles.ValueTags|ContourPlotStyles.ExplodeAxes|
         ContourPlotStyles.Curves;
sp.SetMarkers(Marker.Bullet);

sp.DrawContourPlot(xdata,ydata,zdata);
sp.SetKeyText(sp.Equation);

The Cloudchart is probably a better tool for an initial visualisation, but the Contourplot is much more suitable if you want to answer questions like “what is the best estimate for z, given x and y” as you can easily read off he numbers.

An Approximate Trend Surface

The remaining examples all use the same set of data-points as the final example in the Cloudchart tutorial. The same data-set can produce very different ‘landscapes’ depending on the model chosen.

zdata = new int[] {100,15,27,117,19,112};
xdata = new int[] {17,31,29,21,30,24};
ydata = new int[] {190,270,310,300,190,230};

sp.Heading = "Trend Surface (Rough fit)";

sp.ContourPlotStyle = ContourPlotStyles.ValueTags|ContourPlotStyles.ExplodeAxes|
         ContourPlotStyles.Curves;
sp.SetMarkers(Marker.Bullet);

sp.Flexibility = 5;
sp.MeshDensity = 2;

sp.DrawContourPlot(xdata,ydata,zdata);

The first surface shows the effect of setting the flexibility quite low. Each computed point on the xy grid then ‘sees’ many of the nearby points and the effect is create a quite smooth (but strongly averaged) surface. This would be a suitable model if the data were known to be noisy, and a rough feel for the shape of the surface was all that was required.

Fitting an Accurate set of Spot-heights

If the z-values really represent accurately measured values (spot heights in a landscape) then the map should be forced to fit itself around them.

zdata = new int[] {100,15,27,117,19,112};
xdata = new int[] {17,31,29,21,30,24};
ydata = new int[] {190,270,310,300,190,230};

sp.Heading = "Trend Surface (Close Fit)";
sp.SetAltitudeColors(new Color[]{Color.Navy,Color.Green,Color.GreenYellow,
         Color.Khaki,Color.Silver,Color.White});
sp.ContourPlotStyle = ContourPlotStyles.ValueTags|ContourPlotStyles.ExplodeAxes|
         ContourPlotStyles.AltitudeShading;
sp.SetMarkers(Marker.Bullet);

sp.Flexibility = 8;
sp.MeshDensity = 5;

sp.DrawContourPlot(xdata,ydata,zdata);

This example increases the mesh-density (to compute the contours at many more points) and sets the flexibility high enough to force the contours to behave correctly with respect to the points nearby. Whether this map is any better than any other is (of course) arguable. It is an interesting exercise to take a set of points like this and attempt to make the map by hand. Altitude shading has been used with ‘realistic’ colouring to give the effect of an aerial view of a landscape.

Fitting a Flexible Cubic Model

The final example generates the most ‘satisfying’ map, from a purely visual point of view. This allows SharpPlot to fit a cubic regression surface in the x-direction, then apply a little flexibility to this to finalise the shape of the surface. No underlying model is assumed in the y-direction.

zdata = new int[] {100,15,27,117,19,112};
xdata = new int[] {17,31,29,21,30,24};
ydata = new int[] {190,270,310,300,190,230};

sp.Heading = "Cubic Model with False Colours";
sp.SetAltitudeColors(new Color[]{Color.SlateBlue,Color.Navy,Color.Green,Color.Red,
         Color.Orange,Color.Yellow});

sp.ContourPlotStyle = (ContourPlotStyles.ValueTags|ContourPlotStyles.ExplodeAxes|
         ContourPlotStyles.AltitudeShading|ContourPlotStyles.Curves);
sp.SetMarkers(Marker.Bullet);

sp.SetOrderOfFit(3,0);
sp.Flexibility = 8;
sp.MeshDensity = 3;

sp.DrawContourPlot(xdata,ydata,zdata);

This combination of modelfit and flexibility is a good approach when you know that the z-value is composed of several effects, some of which are expected to obey a known model, but some of which are effectively ‘random’ values. Altitude shading can be used with an array of suitable color values to help bring out the shape of the final surface.

Summary

Contour plots can be an excellent way to display 3-dimensional data on a 2-dimensional chart, but creating the ‘best’ surface for any given dataset will require some prior knowledge of the underlying model, and a certain amount of experimentation.


SharpPlot 3.71 User Manual: Dials and Gauges for isolated numbers

Dials and Gauges for isolated numbers

The Dial chart is the only charttype in SharpPlot which typically takes a single number, rather than an array. It is possible to use charts like the XBarchart to imitate thermometers and other simple gauges, but the Dial has the benefit of showing some of the context of the data with warning zones, datum lines and other cues.

A Simple Dial to Show One Value

sp.SetMargins(24,24,12,12);
sp.Heading = "Simple Pointer and Scale";
sp.SetAxisStyle(Color.Navy,LineStyle.Solid,1.2);
sp.SetXLabelFont("Arial",12,FontStyle.Bold);

sp.SetPenWidths(2);
sp.SetXRange(0,30);
sp.SetXTickMarks(5,4);
sp.SetDatumLineStyle(Color.Red,LineStyle.Dash,0.8);
sp.SetXDatumLines(25);

sp.DrawDialChart(17);

This chart has a simple pointer, and adds a datum line to show a reasonable maximum value. Note that the x-range is used to range the dial here, and is always required as SharpPlot has no way to guess the correct range from a single data point.

Arrowed Pointer and a Warning Zone

sp.SetMargins(24,24,12,12);
sp.Heading = "Arrowed Pointer and Zone";
sp.SetAxisStyle(Color.White,LineStyle.Solid,2);
sp.SetXLabelFont("Arial",16,FontStyle.Bold,Color.White);
sp.SetChartBackground(Color.DarkSlateGray,FillStyle.Solid);

sp.SetPenWidths(2);
sp.SetColors(Color.Red);

sp.DialChartStyle = DialChartStyles.ArrowLines|DialChartStyles.WedgeZones;
sp.SetXRange(0,1000);
sp.SetXTickMarks(500,4);

xzone = new Zone(700,1000,Color.Red,FillStyle.ForwardDiagonal);
sp.SetXZones(xzone);

sp.XCaption = "rpm\n×1000";
sp.SetXCaptionFont("Times",18,FontStyle.Italic|FontStyle.Bold,Color.Yellow);
sp.CaptionLineSpacing = 120;

sp.DrawDialChart(345);

This chart is designed to look as if it came from an instrument panel. The ‘red zone’ is very prominently marked with a wedge of color and the x-caption is used to label the value. A typical application might use several of these dials to make a ‘cockpit’ view of selected key parameters for a company healthcheck.

Two Warning Zones

sp.SetMargins(24,24,12,12);

sp.Heading = "Ranged, with Two Annular Zones";
sp.SetAxisStyle(Color.Black,LineStyle.Solid,2);
sp.SetXLabelFont("Arial",12,FontStyle.Bold);

sp.SetPenWidths(2);
sp.SetBackground(Color.Silver,FillStyle.Solid);
sp.SetChartBackground(Color.White,FillStyle.Solid);
sp.SetXRange(200,800);
sp.SetXTickMarks(100,1);

xzones = new Zone[]{new Zone(200,350,Color.Green),new Zone(700,800,Color.Orange)};
sp.SetXZones(xzones);

sp.XCaption = "psi";
sp.SetXCaptionFont("times",18,FontStyle.Italic,Color.Maroon);

sp.DrawDialChart(345);

This chart uses ‘annular’ zones (the default) to show two significant ranges in different colors. This gives a very clear indication of the health (or otherwise) of some key indicator of company performance.

Multiple Pointers and Zones

sp.SetMargins(24,24,12,12);

sp.Heading = "Multiple Pointers and Zones";
sp.SetBackground(Color.Silver);
sp.SetChartBackground(Color.White,FillStyle.Solid);
sp.SetAxisStyle(Color.Black,LineStyle.Solid,2);
sp.SetXLabelFont("Arial",12,FontStyle.Bold);

sp.SetColors(new Color[]{Color.Navy,Color.Maroon});
sp.DialChartStyle = DialChartStyles.ArrowLines;
sp.SetPenWidths(new double[] {2,1.2});
sp.SetLineStyles(LineStyle.Solid);
sp.SetArrowStyle(-10);  // Negative arrow size is proportional to line width

sp.SetXRange(0,100);
sp.SetXTickMarks(20,3);

xzones = new Zone[]{new Zone(0,10,Color.Lime),new Zone(40,70,Color.Orange),new
         Zone(70,100,Color.Red)};
sp.SetXZones(xzones);

radii = new int[] {100,50};
data = new int[] {25,56};

sp.DrawDialChart(data,radii);

The final chart has two values, which would typically by shown (as here) with pointers of different lengths. There is no limit to the number of pointers or Zones, but in practice this chart is probably at the limit of what the dial can reasonably display. It would be much better to make a matrix of dials using a trellis to show several related values.


SharpPlot 3.71 User Manual: Gantt charts for timewise bars

Gantt charts for timewise bars

The Gantt chart was originally developed as a good way to represent activities across time, and was popularised by tools such as Microsoft Project. It may be used in a variety of planning scenarios, or simply to show the status of some activity or piece of machinery across time (say machine performance across the day).

A Simple Activity Schedule

This example shows four activities planned by week-number.

sp.Heading = "Work Schedule";
todo = new string[]{"","Clear ground","Dig drains","Lay foundations","Concrete floors"};
sp.SetYLabels(todo);

startwk = new int[] {24,28,34,50};
endwk = new int[] {30,36,48,54};
ydata = new int[] {1,2,3,4};

sp.MarginLeft = 72;
sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.GridLines;
sp.SetXTickMarks(5);

sp.DrawGanttChart(ydata,startwk,endwk);

The activity names have been used as axis labels here, but note that you must provide one label per tick-mark, so there is an extra dummy label to go opposite the X-axis. The left-margin will usually need to be made a little wider, even if the labels are wrapped into a preset width (as here).

Categorised and Labelled Activities

This example is very similar, but labels the activities rather than the axis.

sp.Heading = "Work in Progress";
sp.HeadingStyle = HeadingStyles.Right;
todo = new string[]{"Clear ground","Dig drains","Lay foundations","Concrete floors"};
startwk = new int[] {24,28,34,50};
endwk = new int[] {30,36,48,54};
ydata = new int[] {4,3,2,1};
status = new string[]{"Done","Done","Progressing","Not started"};
sp.SetValueFont("Arial",8,FontStyle.Bold);
sp.SetValueTags(todo);
sp.GanttChartStyle = GanttChartStyles.ValueTags;
sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.GridLines|YAxisStyles.NoLabels;
sp.SetXTickMarks(5);
sp.SplitBy(status);
sp.DrawGanttChart(ydata,startwk,endwk);

The activities have been classified depending on status, and are drawn with the earliest at the top of the chart this time.

Using the barwidths to show resources

The third variation on this basic chart uses the widths of each bar to indicate the number of people on site for each phase.

sp.Heading = "Resources";
sp.HeadingStyle = HeadingStyles.Right;
todo = new string[]{"Clear ground","Dig drains","Lay foundations","Floor"};
startwk = new int[] {24,28,34,50};
endwk = new int[] {30,36,48,54};
ydata = new int[] {4,3,2,1};
status = new string[]{"Done","Done","Progressing","Not started"};
resources = VectorMath.Multiply(0.33,new int[] {2,1,3,2});
sp.SetValueFont("Arial",8,FontStyle.Bold,Color.White);
sp.SetValueTags(todo);
sp.ValueTagStyle = ValueTagStyles.Inside;
sp.ValueTagFormat = "XXXXXXXXX;";
sp.GanttChartStyle = GanttChartStyles.ValueTags;
sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.GridLines|YAxisStyles.NoLabels;
sp.SetXTickMarks(5);
sp.SetXZones(new Zone(40,44,Color.LightGreen));
sp.SplitBy(status);
sp.SetBarWidths(resources);
sp.DrawGanttChart(ydata,startwk,endwk);

This time the bars have been labelled inside – be sure there is enough space for the labels if you choose to do this with real data. The widths are given in terms of the Y-scale, so typically the largest bar should be scaled to around 1 unit here.

Note the use of an XZone to indicate a particular period of time – probably a holiday week. You can set an array of zone definitions here to mark out several time intervals if required.

Plant Status Chart

This final chart uses the Gantt style to show historical performance rather than a schedule. The times are given as decimal parts of the day – see DateTime.ToOADate in the .Net framework for the conversion from DateTime objects.

ydata = new int[] {1,2,2,1,2,2,3,1,2,3};
starttime = new double[] {0.5,0.52083,0.60278,0.57291,0.5243,0.62986,0.6041,0.5694,0.5,0.5};
endtime = new double[] {0.5694,0.5243,0.62986,0.6667,0.6028,0.6667,0.6667,0.57291,
         0.52083,0.6041};
// Colours are allocated by state
state = new int[] {2,2,2,3,3,3,3,1,1,1};
sp.Heading = "Machine Status Summary";
sp.SetChartBackground(Color.Silver,FillStyle.Halftone);
sp.SetColors(new Color[]{Color.Maroon,Color.Olive,Color.Green});
sp.SetFillStyles(FillStyle.Pipe);
sp.XAxisStyle = XAxisStyles.Time|XAxisStyles.GridLines|XAxisStyles.ArrowedAxis;
sp.YAxisStyle = YAxisStyles.ExactFit;
sp.SetYRange(0.5,3.5);  // Space around bars
sp.SetYTickMarks(1);
sp.SetXRange(12/24.0,16/24.0); // Lunchtime to 16:00;
sp.BarEdgeNib = 0;
sp.YLabelFormat = "##";  // Eliminate zero
sp.XTimeFormat = "HH:mm";  // Force 23:59 time format (rather than default .Net culture)
sp.SetKeyText(new string[]{"Out of Action","Running acceptably","Running well"});
sp.SplitBy(state);

sp.SetBarWidths(0.5);
sp.DrawGanttChart(ydata,starttime,endtime);

Assuming the state information is complete, each bar will be continous across time, and will show colored bands corresponding to the state of each machine during that period. The gradient fill looks quite good here, but obviously adds no extra information and makes the saved chart a little larger in any of the raster formats.

Summary

This is a fairly special-purpose chart, but is a very convenient way to outline blocks of activities or status across time.


SharpPlot 3.71 User Manual: Histograms for distributions

Histograms for distributions

All the examples which follow use the same set of values – the sum of three dice, thrown repeatedly. Clearly the range will vary from 3 to 18, with the more likely values falling in the middle.

Aggregating a Set of Samples

This first chart takes most of the SharpPlot defaults as they come and simply displays the distribution of samples.

sp.Heading = "Sum of 3 Dice Throws";
threedice = new int[] {9,8,6,11,9,14,11,8,9,14,12,7,6,11,15,14,11,7,5,8,7,9,6,7,12,
         7,13,8,9,13,7,7,8,12,11,16,12,9,11,12,12,12,9,14,8,9,13,11,10,13,11,13,9,
         10,10,4,14,8,9,11,12,5,12,15};
sp.HistogramStyle = HistogramStyles.SurfaceShading;
sp.SetXRange(3,18);
sp.XAxisStyle = XAxisStyles.MiddleLabels;
sp.DrawHistogram(threedice);

With integer data (one ‘bin’ per value) it clearly makes sense to label the bars, rather than the tickmarks. For some reason, thise set of throws produced very few 10s, but is otherwise unremarkable.

Grouping into Class Intervals

This example aggregates the same data into groups 2-4, 4-6 and so on. The groups are all labelled (including the groups with zero count, as this is perfectly valid data here).

sp.Heading = "3 Dice Throws (Grouped)";
sp.HistogramStyle = HistogramStyles.SurfaceShading|HistogramStyles.ValueTags;
sp.SetFillStyles(FillStyle.GradientBottom);
sp.SetValueFont("Arial",10,FontStyle.Bold);

sp.SetXRange(3,18);
sp.ClassInterval = 2;
sp.SetXTickMarks(2);

sp.DrawHistogram(threedice);

Very Plain, with Exploded Axes

This example is a style of histogram often seen in statistical journals.

sp.Heading = "Histogram with Exploded Axes";
sp.HistogramStyle = HistogramStyles.Risers|HistogramStyles.ExplodeAxes;

sp.SetXRange(3,18);
sp.ClassInterval = 2;
sp.SetXTickMarks(2);

sp.DrawHistogram(threedice);

Overlayed Normal Curve

The final example draws a theoretical bellcurve centred on the mean.

sp.Heading = "Histogram with Normal curve";
sp.HistogramStyle = HistogramStyles.SurfaceShading|HistogramStyles.Risers|
         HistogramStyles.NormalCurve;
sp.SetFillStyles(FillStyle.Halftone);
sp.SetPenWidths(2);

sp.SetXRange(3,18);
sp.ClassInterval = 3;
sp.SetXTickMarks(3);

sp.DrawHistogram(threedice);

Datumlines or an XZone could be added to show the ‘range’ of the data, typically the mean +/- 2 standard deviations.


SharpPlot 3.71 User Manual: Line graphs and Time series

Line graphs and Time series

Although it is called ‘Linegraph’ this SharpPlot method can do markers, risers from the X-axis, filled surfaces and so on, in any combination. Typically it is used for timeseries data, but of course it can also draw any continuous curve when given x as well as y co-ordinates.

A Typical Timeseries with Averaging

SharpPlot offers several ways to smooth a typically noisy timeseries. You can use the ‘Trend’ style to add a gaussian-weighted moving average or you can use any combination of traditional smoothing methods. This example has the results of monitoring the fuel consumption of a typical family car (measured in miles per gallon of fuel) which has plenty of random variation and some clear cycles (probably winter and summer).

odo = new int[] {11061,11354,11689,11975,12300,12558,12856,13100,13455,13841,14239,
         14571,14721,15058,15546,15886,16220,16592,16944,17192,17552,17906,18252,
         18381,18611,18876,19224,19558,19907,20252,20584,20914,21188,21549,21901,
         22204,22563,22890,23232,23510,23847,24214,24589,24954,25291,25627,25977,
         26366,26708,27030,27396,27753,28107,28437,28792,29136,29459,29831,30153,
         30487,30796,31127,31440,31722,32018,32442,32755,33045,33385,33689,34031,
         34355,34715,34944,35281,35398,35618,35915,36225,36526,36878,37212,37496,
         37805,38152};
mpg = new double[] {0,37.6,39.4,37.2,39.7,38.2,37.2,39.6,40.2,41,43.1,39.9,40.1,
         38.3,41.9,38.8,41.3,41.4,44.2,36,44,39.2,43,41.6,41.8,36.9,39.3,40.9,38.4,
         40.3,37.9,38.8,38.6,39.9,37.2,38.9,38.8,40.4,35.9,40.6,39.8,39.8,38.1,39,
         38.8,39.2,39.1,40.7,39.7,42.4,41.4,41.3,41.9,42.4,39.5,41.8,41.7,39.5,41.3,
         40.6,38.6,40.2,39.2,37.3,37.1,37.5,38.8,35.7,39.5,38.9,37.6,39.2,37.8,42.5,
         36.6,37.2,40.7,35,38.4,41.3,38,37.9,39.8,36.6,39.8};

sp.Heading = "Plot of MPG against Miles Run";
sp.SetXTickMarks(5000);
sp.LineGraphStyle = LineGraphStyles.TrendLine|LineGraphStyles.OnTopModel;
sp.Flexibility = 5;
sp.MissingValue = 0;
sp.SetLineStyles(new LineStyle[]{LineStyle.Solid,LineStyle.Dash});
sp.SetPenWidths(new double[] {0.8,1.2});

sp.DrawLineGraph(mpg,odo);  // SharpPlot.DrawLineGraph

sp.SetKeyText(new string[]{"Raw MPG data","Gaussian smooth"});

Note that the very first value is a ‘dud’ and is removed from the plot by setting it as ‘missing data’. In this case the fitted curve has been emphasised over the raw series by drawing it with a heavier line, on top of the data.

Of course you may have your own routines to compute more sophisticated curves and just add them to the chart with more calls to DrawLineGraph. A typical trick used when monitoring market data is to plot several moving averages and look for the point where they cross.

Mountain-range shading

Sometimes it is best to show the accumulated values of several series as a stack of shaded surfaces. SharpPlot will accumulate the series for you and shade the surfaces if required.

sp.Heading = "Total Monthly Sales by Region";

home = new int[] {18,16,21,22,21,27,23,24,27,24,23,18};
export = new int[] {4,4,3,4,5,7,12,9,8,3,3,2};
months = new int[] {1,2,3,4,5,6,7,8,9,10,11,12};

sp.LineGraphStyle = LineGraphStyles.SurfaceShading;
sp.DataStyle = DataStyles.Relative;
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.SetXLabels(new string[]{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep",
         "Oct","Nov","Dec"});

sp.SetFillStyles(FillStyle.GradientBottom);
sp.SetPenWidths(0.1);
sp.SetLineStyles(LineStyle.Solid);

sp.DrawLineGraph(new int[][]{home,export},months);  // SharpPlot.DrawLineGraph
sp.SetKeyText(new string[]{"Home trade","Exported"});

Note that any gradient fills are defined on the entire plotting region, so will always be consistently applied regardless of the range of the data. Clearly, you must pass all the series in the same call to have SharpPlot accumulate them for you in this way.

Drawing a Line given both x and y values

This example illustrates a mathematical curve, with computed x and y values. The ‘curves’ style also works well for examples like this, as many fewer intermediate points are required to give a pleasing result.

e = 2.718281828459045;
b = 0.30634896253003313;  // ln(phi) / (pi/2)
t = VectorMath.Multiply(-0.1,VectorMath.Range(0,1000));  // 1000 angles in [-100;0] radians
mag = VectorMath.Pow(e,VectorMath.Multiply(b,t));  // multiplied by phi every quarter-turn
xdata = VectorMath.Multiply(mag,VectorMath.Cos(t));
ydata = VectorMath.Multiply(mag,VectorMath.Sin(t));

sp.Heading = "Golden logarithmic spiral";
sp.SetAxesScales(1);  // force normal axes
sp.XAxisStyle = (XAxisStyles.GridLines|XAxisStyles.BalancedAxis);
sp.YAxisStyle = (YAxisStyles.GridLines|YAxisStyles.BalancedAxis);
sp.DrawLineGraph(ydata,xdata);

It is called a Fibonacci spiral, and cuts the x-axis at the classic Fibonacci series values of 1 1 2 3 5 8 and so on.

The Playfair Plot

This chart (quoted in Tufte’s first book) was first used in 1760 to show the rising national debt in England. There are quite a lot of properties to set here, but it is tedious rather than hard, to get the feel of the original graphic.

years = new int[] {1688,1701,1714,1727,1739,1748,1755,1762,1775,1784};
debt = new double[] {0.2,1.3,3.2,2.4,2.1,3,2.2,4.8,4.4,9.2};

sp.LineGraphStyle = LineGraphStyles.SurfaceShading|LineGraphStyles.ValueTags;
sp.SetMargins(24,36,12,24);
sp.XAxisStyle = XAxisStyles.GridLines;
sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.RightAxis;
sp.SetHeadingFont("times",12,FontStyle.Bold|FontStyle.Italic);
sp.SetGridLineStyle(Color.LightGray,LineStyle.Solid,0.3);
sp.SetDatumLineStyle(Color.LightGray,LineStyle.Solid,1.5);
sp.SetXTickMarks(years);
sp.SetYRange(20);
sp.SetYTickMarks(1);
sp.SetFillStyles(FillStyle.Opacity42);
sp.Heading = "Interest of the NATIONAL DEBT from the Revolution";
sp.SetYDatumLines(10);

vtags = new string[]{"Revolution","Accession of Queen Anne","Accession of George "+
         "1st","Accession of George 2nd","Beginning of Spanish War","End of Spanish "+
         "War","Beginning of Continental War","End of Continental War","Beginning "+
         "of American War","End of American War"};

sp.SetValueTags(vtags);
sp.SetValueFont("Times",6,FontStyle.Regular,Color.Red);
sp.ValueTagStyle = ValueTagStyles.Vertical;

sp.DrawLineGraph(debt,years);

The most interesting design feature is the x-tick spacing where significant historical dates have been used to mark the years. The Y-axis is intentionally over-scaled to reduce the political impact of the graphic! Playfair’s first draft of this chart was much more dramatic. Opacity is used to give the effect of a water-color wash as used in the original drawing.

Summary

The Linegraph is by far the most versatile plotting method offered by the SharpPlot library, and is definitely the most widely used. It can be used in combination with any other 2D chart type to add extra lines and decorations as well as being a plotting tool in its own right.


SharpPlot 3.71 User Manual: Min-Max or Hi-Lo charts

Min-Max or Hi-Lo charts

This chart is often used in combination with a LineGraph or ScatterPlot to show range in addition to daily values. The first example creates a typical ‘High-Low-Close’ chart from daily share price information, and the second shows how errorbars can be added to a scatterplot of experimental data. However, it can be used on its own, for example to show the span of frost-free days across the year as a timeseries.

A Typical Hi-Lo-Close Plot

There are many variations on this chart, but most of them come down to a combination of a MinMax and an overlayed scatterplot.

hi = new int[] {123,122,119,125,132,135,140,141,142,136,131,129};
lo = new int[] {120,116,116,117,121,127,135,136,131,125,122,122};
close = new int[] {121,117,118,124,129,135,139,137,132,130,124,126};
wkno = new int[] {36,37,38,39,40,41,42,43,44,45,46,47};

sp.Heading = "Hi-Lo Close Chart";

sp.SetColors(Color.Navy);
sp.SetPenWidths(2);
sp.DrawMinMaxChart(hi,lo,wkno);

sp.SetMarkers(Marker.RightTick);
sp.DrawScatterPlot(close,wkno);

The ‘LeftTick’ and ‘RightTick’ markers are specifically designed for this type of chart – you could additionally use a LeftTick to show the opening level if required.

Adding Errorbars to a ScatterPlot

Experimental data may have errors on the y-dimension, the x-dimension or both. This chart is very similar to the Hi-Lo plot, but uses two MinMax charts to show errors in both X and Y directions.

yield = new int[] {6,8,12,11,17,32,20,28};
temp = new int[] {12,14,23,28,31,34,36,40};
error = new int[] {2,2,4,4,4,12,6,8};

sp.Heading = "Errorbars in 2 Dimensions";
sp.XCaption = "Temperature °C";
sp.YCaption = "Yield (gm)";

sp.SetColors(new Color[]{Color.Navy,Color.Navy,Color.Maroon});
sp.MinMaxChartStyle = MinMaxChartStyles.ErrorBars;
sp.DrawMinMaxChart(VectorMath.Sum(yield,error),VectorMath.Subtract(yield,error),temp);

sp.MinMaxChartStyle = MinMaxChartStyles.ErrorBars|MinMaxChartStyles.Horizontal;
sp.DrawMinMaxChart(VectorMath.Sum(temp,1),VectorMath.Subtract(temp,1),yield);

sp.SetMarkers(Marker.Bullet);

sp.DrawScatterPlot(yield,temp);

Note that the scatter is typically the last chart to be drawn, so that the errorbars set the Y-axis range. If the X-errors are very large it may be necessary to set the X-axis range explicitly here. This also has the effect of placing the markers on top of the errorbars, which looks much cleaner.

Frost-free days as a TimeSpan

This time, a horizontal chart style is used so that the years are stacked vertically up the page.

sp.SetMargins(12,20,24,12);

years = new int[] {89,90,91,92,93,94,95,96,97,98,99,0,1,2,3};
days = new int[] {31,29,31,30,31,30,31,31,30,31,30,31};
dmax = new int[] {324,294,293,288,333,309,313,298,291,279,305,309,292,295};
dmin = new int[] {108,118,95,107,108,118,97,127,106,108,106,130,109,102};

sp.SetXTickMarks(VectorMath.Catenate(0,VectorMath.RunningTotal(days)));
sp.XAxisStyle = XAxisStyles.GridLines|XAxisStyles.MiddleLabels|XAxisStyles.ForceZero;
sp.SetXLabels(new string[]{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep",
         "Oct","Nov","Dec"});
sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.AtEndCaption;
sp.YCaption = "Year";
sp.YLabelFormat = "00";
sp.SetYLabels(years);
sp.SetYTickMarks(1);

sp.MinMaxChartStyle = MinMaxChartStyles.Horizontal|MinMaxChartStyles.ArrowLines|
         MinMaxChartStyles.Envelope;
sp.SetFillStyles(FillStyle.Opacity30);

sp.SetArrowStyle(7,20,FillStyle.Saturate80);

sp.DrawMinMaxChart(dmax,dmin);

sp.SetNoteFont("Arial",24,FontStyle.Bold,Color.White);
sp.DrawNote("Frost-free Days",170,2,65);

This gives a clear picture of the ‘growing season’ from year to year. The arrowheads have been ‘customised’ a little here (the default shape is a little too fat) and an angled note is used to label the central region.

Using Envelope Fill as a Backcloth

Another good use of this chart is to show increasing uncertainty into the future. This example shows a projected cumulative spending pattern, with an overrun zone to allow for ‘contingencies’ which cannot be planned for.

sp.Heading = "Annual Budget with Overrun Zone";

budget = new int[] {0,5,15,17,20,34,53,66,72,87,92,102,104};
bmax = new int[] {0,6,18,22,27,44,66,82,91,109,118,131,137};
xdata = new int[] {0,1,2,3,4,5,6,7,8,9,10,11,12};

sp.XAxisStyle = XAxisStyles.GridLines|XAxisStyles.MiddleLabels|XAxisStyles.ForceZero;
sp.SetXLabels(new string[]{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep",
         "Oct","Nov","Dec"});

sp.SetColors(Color.Navy);
sp.MinMaxChartStyle = MinMaxChartStyles.Envelope|MinMaxChartStyles.NoLines;
sp.SetFillStyles(FillStyle.GradientBottom);

sp.DrawMinMaxChart(budget,bmax,xdata);

sp.SetPenWidths(2);
sp.DrawLineGraph(budget,xdata);
sp.SetKeyText(new string[]{"","Cumulative budget spend"});

This could be used with financial data to show deviation from budget, or the movement of some key variable within its ‘allowed’ band. It could also show the confidence limits around a modelfit or economic forecast.

Summary

The MinMax chart is ideal wherever data has a natural range. It can also be used as a backcloth to many other charts to show an allowed or predicted range for a data series.


SharpPlot 3.71 User Manual: Multiples for small thumbnails

Multiples for small thumbnails

One of the best innovations in Tufte’s “The Visual Display of Quantitative Information” is the idea of using an array of miniature charts to display multi-dimensional data. Often a series of values are recorded at (say) several sites or on several days, then are superimposed on a single chart as a collection of dotted and dashed lines in various colors. This often makes it very hard to see the patterns and relationships in the data.

The ‘Multiple’ plots each series on its own chart, and arranges them automatically in a trellis to allow easy comparison between them.

Comparing two datasets

This example is the simplest form of multiple chart. Two sets of data are compared by being plotted side-by-side as barcharts. Note that the multiple chart has very few styles of its own – here the example uses the YAxisStyle to have both charts constrained to show the zero point.

data = new int[][]{new int[]{1,2,3},new int[]{4,5,6}};

sp.SetPageLabels(new string[]{"1995","2005"});
sp.SetXLabels(new string[]{"Milk","Eggs","Bread"});

sp.YAxisStyle = YAxisStyles.ForceZero;
sp.SetLabelFont("Arial",13);
sp.SetCaptionFont("Arial",15,FontStyle.Bold,Color.Firebrick);

sp.DrawMultiple(ChartType.BarChart,data);

PageLabels are a useful way of labelling the cells in the trellis.

A Collection of Histograms

The barley yield data could be shown on a single histogram, but often this conceals some systematic variation in the data. In this example, the farm is used to create a trellis of charts, each showing the spread of the data at the individual farms.

Although the experiment was designed to investigate various barley varieties, this plot makes it very clear that the farm is going to be a big factor in the outcome. A quick glance shows that yields at Wasaca may be quite variable, but that it easily beats both Grand Rapids and Duluth (which is consistently very poor).

sp.SplitBy(barleyfarm);  // One cell per farm

sp.HistogramStyle = HistogramStyles.SurfaceShading;
sp.ClassInterval = 10;
sp.SetXRange(0,70);
sp.SetYRange(14);

sp.SetCaptionFont("Arial",14,FontStyle.Bold,Color.Firebrick);
sp.DrawMultiple(ChartType.Histogram,barleyyield);

The PageLabels have been automatically set to reflect the unique values in the dimension used to split the data.

Constructing a dashboard

This example automates a typical use of the dial chart, which are often grouped in arrays to show related values.

sp.SetXRange(0,100);
sp.SetXZones(new Zone(80,100,Color.Red,FillStyle.Solid));
sp.SetPenWidths(1.5);
sp.DialChartStyle = DialChartStyles.ArrowLines;

sp.SetPageLabels(new string[]{"Engine No.1","Engine No.2","Engine No.3","Engine No.4"});
sp.XCaption = "Coolant &deg;C";

sp.SetLabelFont("Arial",13);
sp.SetCaptionFont("Arial",15,FontStyle.Bold,Color.Firebrick);

sp.DrawMultiple(ChartType.DialChart,new int[]{23,34,78,12});

Note that the range and warning zone will be common to all the charts in the trellis.

Comparing several attributes

The final example shows a collection of polar charts, which readily allow various criteria to be compared across several cameras (the example came from a Swiss camera magazine). Notice how the distinct set of camera types is automatically used as page-labels to caption each chart in the trellis.

sp.SetMargins(36,12,20,0);

cameradata = new double[] {4.5,3.1,2,4.5,5,2.5,5,5,3,5,3.5,2.5,4.5,3,3,4.5,2,4,4.5,
         4.5,2.5,4.5,4.5,4.5};
cameratype = new int[] {1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4};
cameranames = new string[]{"Sony\nCyber-Shot\nDSC-V1","Canon\nPowerShot\nG5",
         "Nikon\nCoolPix\n5400","Olympus\nCamedia\nC-5060"};
cameracap = new string[]{"Résolution","Rendu","Couleur","Sensibilité","Flash",
         "Autofocus","Rapidité"};

sp.SplitBy(cameratype);  // Sets trellis
sp.SetPageLabels(cameranames);  // Sets cell labels

sp.SetFillStyles(FillStyle.Opacity42);
sp.SetColors(Color.Red);
sp.SetMarkers(Marker.SmallBullet);
sp.SetLineStyles(LineStyle.Solid);
sp.SetPenWidths(1);

sp.PolarChartStyle = PolarChartStyles.SurfaceShading|PolarChartStyles.GridLines|
         PolarChartStyles.Markers;
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.SetXLabels(cameracap);
sp.XLabelFormat = "XXXXXXXX;";
sp.SetLabelFont("Arial",6,Color.Black);
sp.SetCaptionFont("Arial",14,FontStyle.Bold,Color.Black);

sp.DrawMultiple(ChartType.PolarChart,cameradata);

This is likely to make visual comparison much easier than attempting to overlay the radar plots from several cameras on the same chart.


SharpPlot 3.71 User Manual: Network Map for nodes and links

Network Map for nodes and links

The Network Map offers the ability to display a list of nodes and all their mutual links. The DrawNetworkMap help page demonstrates that flat links are suited for an unoriented dense network on the default (circular) layout. Let’s explore a few more uses of network maps.

Sparse link matrix

As long as the link matrix is sparse, laying out the network map is more a matter of taste than a challenge for readability. In particular, if there are links only across distinct subsets of nodes, then horizontal or vertical layout is perfectly suited.

Here we split links by origin node, which is a convenient alternative to arrows to emphase the orientation of arcs (which are all clockwise since all the data is positive and that NetworkMapStyles.CounterClockwise is not used)

data = new int[][]{new int[]{0,0,0,92,0,54,16,0,0,44},new int[]{0,0,0,0,44,70,0,0,0,
         0},new int[]{0,0,0,0,0,10,0,0,81,74},new int[]{79,0,0,0,0,0,0,0,0,0},new
         int[]{78,0,0,0,0,0,0,0,0,0},new int[]{0,0,93,0,0,0,0,0,0,0},new int[]{0,70,
         0,0,0,0,0,0,0,0},new int[]{0,67,31,0,0,0,0,0,0,0},new int[]{0,0,0,0,0,0,0,
         0,0,0},new int[]{0,0,51,0,0,0,0,0,0,0}};
cat = new int[] {1,1,1,2,2,2,2,2,2,2};

sp.Heading = "Import/Export Summary";
sp.SetMargins(60,60,40,40);

sp.SetColors(new Color[]{Color.LightGreen,Color.LightSalmon});
sp.SetLineStyles(LineStyle.Solid);
sp.SetMarkers(Marker.Bullet);
sp.SetPenWidths(3);
sp.SetMarkerScales(5);
sp.SetNetworkMapLinkArc(-45);  // 45-degree arcs

sp.NetworkMapStyle = (NetworkMapStyles.NoAxes|NetworkMapStyles.Horizontal|
         NetworkMapStyles.SplitByOrigin|NetworkMapStyles.OnTopMarkers|
         NetworkMapStyles.FixedArcs|NetworkMapStyles.ValueTags);
sp.SetILabels(new string[]{"Aberdeen","York","Manchester","Toronto","Mumbai",
         "Singapore","Sydney","Cape Town","Bahamas","New York"});
sp.SetILabelFont("Times",8,FontStyle.Bold,Color.Black);
sp.SetValueFont("Arial",7,FontStyle.Regular,Color.Navy);
sp.SetKeyText(new string[]{"Home","Overseas","Export","Import"});
sp.KeyStyle = (KeyStyles.BottomAlign|KeyStyles.CenterAlign);

sp.SplitBy(cat);
sp.DrawNetworkMap(data);

We even have room to put value tags on links and labels on nodes!

Dense, oriented link matrix

Dense networks are far more challenging, especially when oriented – that is we want to easily distinguish the two links between any two nodes corresponding to the two possible directions.

In this example the goal is to focus on the ability to quickly identify large links and their destination nodes. The circular (default) layout for nodes is generally best when the link matrix is dense. Also, notice how the automatic arc radius make links more visible as it tends towards a half-circle when nodes are close.

We split links by destination node, and use flashy colors on a black background. Because we have many nodes, we use mutually prime sizes for color and marker cycles, so that combinations are unique. The ArrowLines style is not strictly necessary because the arcs are clock-wise, and colored by destination, but it still helps readability. Because links typically share the color of the node they point to, we require the Dissected style too.

data = new int[][]{new int[]{9,3,12,11,38,20,11,8,29,98,19,81},new int[]{144,2,40,
         17,102,506,164,33,299,1,83,302},new int[]{7,375,9,28,23,159,11,79,75,0,76,
         13},new int[]{16,114,18,237,20,99,0,256,168,248,39,22},new int[]{150,370,
         118,370,410,425,5,33,79,27,44,68},new int[]{48,140,259,487,92,198,64,64,11,
         20,26,47},new int[]{210,1,162,21,80,71,108,31,2,141,0,178},new int[]{21,94,
         195,159,33,264,33,101,210,36,367,4},new int[]{33,156,0,207,104,65,7,3,27,1,
         12,1},new int[]{59,87,137,30,531,22,267,140,30,32,125,40},new int[]{27,61,
         226,14,65,145,66,3,189,213,3,690},new int[]{259,589,361,260,185,27,15,138,
         5,12,22,45}};
ids = new int[]{1,9,22,46,48,60,62,70,79,81,90,98};

sp.Heading = "Data transfers by consumer";
sp.SetHeadingFont("Times",18,FontStyle.Regular,Color.LightGray);
sp.SetBackground(Color.Black);
sp.SetMargins(55,25,30,100);

sp.SetMarkers(new Marker[]{Marker.Triangle,Marker.Del});
sp.SetMarkerScales(1.5);
sp.SetPenWidths(3);
sp.SetLineStyles(LineStyle.Solid);
sp.SetColors(new Color[]{Color.Blue,Color.Yellow,Color.Cyan,Color.Magenta,
         Color.Lime,Color.Red,Color.White});

sp.NetworkMapStyle = (NetworkMapStyles.NoAxes|NetworkMapStyles.SplitByDestination|
         NetworkMapStyles.ArrowLines|NetworkMapStyles.Dissected|
         NetworkMapStyles.NoLinkKey);
sp.KeyStyle = (KeyStyles.Vertical|KeyStyles.RightAlign|KeyStyles.BottomAlign);
sp.SetKeyFont("Arial",7,FontStyle.Regular,Color.LightGray);
sp.KeyFormat = "192.168.0.XXX";

sp.DataStyle = DataStyles.Rows;  // Series are given by destination node
sp.SplitBy(ids);  // Links are split by destination node
sp.DrawNetworkMap(data);

We also rely on the fact that SplitBy categories are used as default keys (and disable it for links).

Using X/Y Coordinates

So far we’ve used automatic layout of nodes, but we can specify the X/Y positions of nodes. In this example, the X coordinates encodes the quantity rather than the link width which is fixed. The Y coordinate encodes the category.

links = new double[][] {new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0},new
         double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0},new double[] {0,0,0,0,0,0,
         0,0,0,0,0,0,0,0,1,0,0,0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
         0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},new double[] {0,
         0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,
         0,0,0,1,0,0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},new
         double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},new double[] {0,0,0,0,0,0,
         0,0,0,0,0,0,0,0,0,1,0,0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
         0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},new double[] {0,
         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,
         0,0,0,0,0,0,1},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},new
         double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0},new double[] {0,0,0,0,0,0,
         0,0,0,0,0,0,0,0,0,1,0,0,0},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,
         0,1},new double[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
nodes = new string[]{"Ammonium Bicarbonate","Bicarbonate","Water","Biscuit Flour",
         "Wholemeal","Oatflour","Coconut","Sugar","Inverted Sugar","Malt","Fat",
         "Salt","Water Loss","Chocolate","Batch Ingredients","Dough","Biscuit "+
         "Crumb","Biscuit Baked","Chocolate Bar"};
cat = new int[] {1,1,1,1,1,1,1,1,1,1,1,1,3,1,2,2,2,2,3};
catlabs = new string[]{"Primary Ingredients","Intermediate Products","End Products"};
xpos = new double[] {1.28,1,19.92,102.8,99.8,52,20,56.4,25.6,10.4,62.6,2.2,54.7,
         592.7,22.2,462,8,407.3,1000};
ypos = new double[] {120,180,180,135,165,120,120,180,150,120,150,150,350,120,250,
         225,275,275,350};

sp.Heading = "Processing chain for chocolate bars";
sp.MarginLeft = 50;

sp.XAxisStyle = (XAxisStyles.LogScale|XAxisStyles.ArrowedAxis);
sp.XCaption = "Weight";
sp.SetYTickMarks(100);
sp.YAxisStyle = (YAxisStyles.MiddleLabels|YAxisStyles.GridLines);
sp.SetYLabels(catlabs);

sp.SetPenWidths(1);
sp.SetLineStyles(LineStyle.Solid);
sp.SetMarkers(Marker.Bullet);
sp.SetMarkerScales(3);
sp.SetColors(new Color[]{Color.LightGreen,Color.LightSalmon,Color.LightSteelBlue,
         Color.LightGray});
sp.SetArrowStyle(7);  // Fixed-size arrows
sp.SetNetworkMapLinkArc(150);  // Absolute arc radius in points

sp.NetworkMapStyle = (NetworkMapStyles.ArrowLines|NetworkMapStyles.Dissected|
         NetworkMapStyles.FixedArcs|NetworkMapStyles.CounterClockwise);
sp.SetILabelFont("Times",7,FontStyle.Regular,Color.Navy);
sp.SeriesKey = false;  // No key

sp.SetILabels(nodes);
sp.SplitBy(cat,new int[]{1,2,3});  // Force order of categories
sp.DrawNetworkMap(links,xpos,ypos);

A very similar thing would be done if you wanted to overlay a network map over a geographical image, for example.

Fine-tuned network maps

Here we’re going to take fine control over the display of individual nodes and links. The special effect on nodes is achieved by a ScatterPlot re-using the X/Y coordinates beforehand.

We use SplitByLink, which applies the SplitBy to links (in provided order), and we use SplitByOrigin on top of it, so that node are split by the category of links to themselves (the diagonal of the link SplitBy).

As with the previous example the data is unitary, but we use different pen widths for different categories. Also, we use negative data to individually inverse the orientation of some links.

data = new int[][]{new int[]{0,-1,1,0,-1,1,0},new int[]{-1,1,1,1,1,0,0},new int[]{0,
         0,0,1,-1,0,0},new int[]{1,0,0,0,-1,0,0},new int[]{-1,1,0,0,1,1,1},new
         int[]{0,-1,0,0,0,0,1},new int[]{1,-1,0,0,0,0,0}};
nodes = new string[]{"Citizens","Media","Executive","Finance","Legislature",
         "Judiciaries","Police"};
x = new int[] {0,0,5,5,0,-5,-5};
y = new int[] {0,6,3,-3,-6,-3,3};
// Link settings are taken in the series order of the input data
// Node categories is diagonal of link categories, that is {2,3,2,2,4,2,2}
linkcat = VectorMath.Enlist(new int[][]{new int[]{2,3,1,1,4,1,1},new int[]{1,3,3,3,
         3,3,3},new int[]{2,2,2,2,4,2,2},new int[]{2,2,2,2,4,2,2},new int[]{1,4,4,4,
         4,4,4},new int[]{2,3,2,2,2,2,2},new int[]{2,3,2,2,2,2,2}});
linkarc = VectorMath.Enlist(new int[][]{new int[]{0,-45,-100,0,-45,-100,0},new
         int[]{-45,-60,-60,-60,-90,-60,-60},new int[]{0,0,0,-100,-60,0,0},new
         int[]{-100,0,0,0,-60,0,0},new int[]{-45,-90,-60,-60,-60,-60,-60},new
         int[]{0,-60,0,0,0,0,-100},new int[]{-100,-60,0,0,0,0,0}});

sp.Heading = "Organisational Chart";
sp.SetHeadingNudge(90,0);  // Nudge further than right margin
sp.SetMargins(40,40,20,150);
sp.FrameStyle = FrameStyles.Boxed;

sp.SetMarkers(Marker.Circle);
sp.SetColors(Color.Aqua);
sp.SetPenWidths(1);
sp.SetMarkerScales(7);
sp.SplitBy(new int[]{0,1,1,1,1,1,1},new int[] {1});  // First marker is excluded
sp.ScatterPlotStyle = ScatterPlotStyles.NoAxes;
sp.SetAxesScales(1);
sp.DrawScatterPlot(y,x);

sp.SetMarkers(Marker.Bullet);
// Color Markers independently of their category
sp.SetMarkerColors(new Color[]{Color.LightGray,Color.OrangeRed,Color.LightGray,
         Color.LightGray,Color.Orange,Color.LightGray,Color.LightGray});
// Link color by category
sp.SetColors(new Color[]{Color.OrangeRed,Color.Orange,Color.LimeGreen,Color.Blue});
// Link width by category (data is only in {-1,0,1})
sp.SetPenWidths(new double[] {3,3,0.5,0.5});
sp.SetLineStyles(LineStyle.Solid);
sp.SetNetworkMapLinkArc(linkarc);
sp.SetArrowStyle(10,30);  // Fixed-size arrows
sp.SetILabelFont("Arial",9,FontStyle.Bold);

sp.NetworkMapStyle = (NetworkMapStyles.NoAxes|NetworkMapStyles.SplitByLink|
         NetworkMapStyles.SplitByOrigin|NetworkMapStyles.ArrowLines|
         NetworkMapStyles.Dissected|NetworkMapStyles.FixedArcs);
sp.SetILabels(nodes);
sp.SplitBy(linkcat,new int[]{1,2,3,4});  // Ensure order for key

sp.DrawNetworkMap(data,x,y);

// First key is for scatter plot
// The second key is empty to exclude nodes of category 2
// (there are no nodes of category 1)
sp.SetKeyText(new string[]{"Constitutionally\nIndependent Powers","","Influences "+
         "Nominations","Regulates Control\nand Nominations","Nominates","Controls",
         "Inspects","Regulates"});
sp.KeyStyle = (KeyStyles.RightAlign|KeyStyles.Vertical|KeyStyles.BottomAlign);
sp.SetKeyFont("Times",8,FontStyle.Regular,Color.Black);

Summary

The Network Map is pretty effective for reasonably sized networks, but can’t do miracles if your data is really big, unless you have a miraculous output resolution.

See also ...

SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: Pie charts and Rose diagrams

Pie charts and Rose diagrams

Piecharts are best used with a small number of data items where the values represent some part of a total. Typically the numbers will be percentages, and the sector values will differ significantly. If it is important for the user to be able to compare values accurately, a simple Barchart is almost always a better choice.

A Basic Pie with Spider Tags

This example shows a piechart with most of the options left to default.

sp.SetMargins(16,0,6,6);
sp.Heading = "A Basic\nPiechart";
sp.HeadingStyle = HeadingStyles.Right;

sp.SetXLabels(new string[]{"Hello","World","This label will be wrapped"});
sp.SetLabelFont("Arial",10,FontStyle.Bold,Color.Navy);
sp.XLabelFormat = "XXXXXXXXXXXXXX;";
sp.DrawPieChart(new int[]{13,3,2},new int[]{0,20,0});

Note that SharpPlot treats piecharts as if they have an ‘x-axis’ so this example uses X-labels and wraps them with an X-axis formatter. The chart allows ‘reasonable’ headspace for the labels (within the chart margins) but it may be necessary to adjust either the positioning or radius of the pie if there is a lot of long label text.

Labelling inside the sectors

This chart complements the political graphic in the Barchart tutorial by showing the percentage of votes cast for each party.

sp.SetMargins(18,24,18,0);

Party = new string[]{"Con","Lib","Lab"};
Votepc = new int[] {48,37,15};

sp.Heading = "Share of\nVotes Cast";
sp.HeadingStyle = HeadingStyles.Left;
sp.SetHeadingFont("ARB",14);

sp.PieChartStyle = PieChartStyles.ValueTags;
sp.PieStartAngle = 90;
sp.SetEdgeStyle(Color.White,LineStyle.Solid,3);  // SharpPlot.SetEdgeStyle
sp.ValueTagStyle = ValueTagStyles.Inside;
sp.SetValueFont("ARB",18,Color.White);
sp.ValueTagFormat = "#0%";

sp.SetColors(new Color[]{Color.Navy,Color.Orange,Color.Red});  // Party colors
sp.DrawPieChart(Votepc);

sp.SetKeyText(Party);
sp.KeyStyle = KeyStyles.Vertical|KeyStyles.Boxed|KeyStyles.Rounded|
         KeyStyles.Shadowed|KeyStyles.LeftAlign|KeyStyles.BottomAlign;
sp.SetKeyFont("ARB",11,Color.Navy);

The numbers are written inside each sector here. Obviously, this approach only works if most of the sectors are reasonably large as SharpPlot will simply omit any labels which don’t fit. This pie starts drawing from the 3:00 line (rather than midnight) and uses a thick white edge to give a ‘dissected’ appearance.

Note that SharpPlot does not multiply the values by 100 here – the ‘%’ symbol is treated like any other insertion character and has no special meaning.

Merging values and labels

This is a very similar example, but instead of drawing a separate legend, it uses a special format string to merge the X-label text into the spider tags. The string ‘XL’ is treated as an insertion point for the corresponding value from the array of labels.

sp.SetMargins(12,0,18,0);

Party = new string[]{"Con","Lib","Lab"};
Votepc = new int[] {48,37,15};

sp.Heading = "Share of Votes Cast";
sp.HeadingStyle = HeadingStyles.Left;
sp.SetHeadingFont("ARB",14);

sp.PieChartStyle = PieChartStyles.ValueTags|PieChartStyles.Plain;
sp.SetEdgeStyle(Color.White,LineStyle.Solid,3);
sp.SetXLabels(Party);
sp.SetXLabelFont("ARB",12,Color.Navy);
sp.ValueTagFormat = "XL #0%";

sp.SetColors(new Color[]{Color.Navy,Color.Orange,Color.Red});

sp.DrawPieChart(Votepc);

The ‘plain’ style simply omits the spider lines.

Drawing a Rose Diagram

This is a fairly uncommon plot, but does illustrate the possibility of varying the sector radii as well as the angular values. The data is genuine, and shows that snowfields tend to stick around more on NE-facing slopes! Note that you must give 8 equal values for the angles, and set the appropriate style here to have the explosions treated as radii.

sp.Heading = "Distribution of\nCorrie Directions\nin Scotland";
sp.HeadingStyle = HeadingStyles.Bottom|HeadingStyles.Left;

corries = new int[] {6,7,5,3,3,2,3,5};

sp.PieChartStyle = PieChartStyles.ValueTags|PieChartStyles.RoseDiagram;
sp.SetValueTags(corries);
sp.ValueTagStyle = ValueTagStyles.Inside;
sp.SetValueFont("ARB",12,Color.White);

sp.SetColors(Color.ForestGreen);
sp.SetEdgeStyle(Color.White,LineStyle.Solid,2);

sp.PieRadius = 2400;  // Scale up entire pie

sp.SetFillStyles(FillStyle.Dome);

sp.DrawPieChart(new int[]{1,1,1,1,1,1,1,1,1},corries);

Note that the entire pie is scaled to about 20 times normal size, as the radii are taken as percentages of standard, which would result in very tiny sectors here. The ‘dome’ style of radial gradient works well with Pie and Polar charts as it is always drawn radially from the centre of the entire chart.

Summary

Piecharts are best used as top-level summaries, showing quite small numbers of values. They often make a good starting point for a ‘drilldown’ process, where the user may click on each sector to get a more detailed picture of some aspect of company performance.


SharpPlot 3.71 User Manual: Polar and Radar charts

Polar and Radar charts

The ‘Radar’ chart is logically similar to a Barchart, in that the given data is arranged at equal intervals. The difference is that the Radar chart arranges the values around a circle at equal angles, which is often a good way of comparing several sets of performance indicators.

The ‘Polar’ chart is simply a variant of the Linegraph where the y-values become radii and the x-values angles around a circle. It is typically used to plot data which has a natural cycle, for example daily temperatures or annual rainfall. It can also be used as a type of scatterplot, where the angles represent compass directions or times of day.

Comparing Features with a Radar Chart

This chart compares two fictional vehicles based on seven criteria which are plotted as radial lines.

sp.Heading = "Two Cars\nCompared";
sp.HeadingStyle = HeadingStyles.Left;

Volvo = new int[] {20,36,29,42,31,36,34};
Saab = new int[] {30,24,28,34,23,34,28};
criteria = new string[]{"Speed and handling","Fuel consumption","Comfort and "+
         "legroom","Reliability record","Safety","Seating and luggage space",
         "Service interval"};

sp.PolarChartStyle = PolarChartStyles.GridLines|PolarChartStyles.SurfaceShading;
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.MarginLeft = 12;
sp.MarginRight = 0;
sp.SetXLabels(criteria);
sp.XLabelFormat = "XXXXXXXXX;";
sp.LabelLineSpacing = 120;

sp.SetFillStyles(FillStyle.Opacity30);

polardata = new int[][]{Volvo,Saab};
sp.DrawPolarChart(polardata,new int[0]);

The semi-transparent overlay makes it very easy to compare the ‘shapes’ which characterise the two sets of data.

Summarizing Directional Data

This is also a Radar chart, although it could have been plotted with additional angular values, if the directions were not equally spaced around the circle. It shows an alternative presentation to the Rose diagram of the corrie data from the Scottish highlands.

sp.Heading = "Frequency of Corrie Directions in Scotland";

corries = new int[] {6,7,5,3,3,2,3,5};

sp.PolarChartStyle = PolarChartStyles.Risers|PolarChartStyles.ArrowLines|
         PolarChartStyles.NoLines;
sp.HeadingStyle = HeadingStyles.Bottom;
sp.SetPenWidths(0.8);
sp.SetMargins(0);
sp.YAxisStyle = YAxisStyles.NoAxis|YAxisStyles.ForceZero;
sp.XAxisStyle = XAxisStyles.NoAxis;
sp.SetArrowStyle(6,30);  // Size,angle

sp.DrawPolarChart(corries);

Scaled markers could be used instead of arrows with this chart style to give an indication of average size as well as frequency of occurence. This is probably a more ‘honest’ chart than the equivalent Rose diagram, as it does not exaggerate the larger numbers in the same way.

ScatterPlot of the Night Sky

This is genuinely Polar data, so it is best plotted around a circle. The y-values are altitude (but of course 90 is at the Zenith) and the x-values give the direction of the observation.

altitude = new int[] {8,42,1,38,20,35,34,28,22,50,52,40,30,10,7,41,41,17,11,30,5,8,
         42,42,19,24,57,38,32,4,19,40,41,49};
azimuth = new int[] {48,42,55,63,48,51,75,41,32,51,51,38,48,57,35,54,23,70,54,40,55,
         38,69,70,64,35,69,37,77,80,33,47,45,25};

sp.Heading = "Meteors sighted\n18th Nov";
sp.HeadingStyle = HeadingStyles.Left;

sp.SetMargins(24,12,0,0);

sp.SetXLabels(new string[]{"North","NE","East","SE","South","SW","West","NW"});
sp.SetXTickMarks(45,3);
sp.SetYTickMarks(new int[] {0,30,60,90});
sp.SetXLabelFont("arial",8,FontStyle.Regular,Color.Maroon);
sp.SetYLabelFont("arial",8,FontStyle.Regular,Color.White);
sp.YAxisStyle = YAxisStyles.InvertAxis|YAxisStyles.InvisibleAxis;
sp.YTickStyle = YTickStyles.NoTicks;
sp.PolarChartStyle = PolarChartStyles.Markers|PolarChartStyles.GridLines|
         PolarChartStyles.CompassPlot|PolarChartStyles.NoLines;
sp.SetChartBackground(Color.Navy,FillStyle.Saturate80);
sp.LabelStyle = LabelStyles.Opaque;  // Background for circle - also May 03
sp.SetMarkers(Marker.Bullet);
sp.SetColors(Color.White);

sp.DrawPolarChart(altitude,azimuth);

This chart could also be used with daily data, for example a count web-site hits over 24 hours.

Circular Linegraph of Daily Temperatures

This chart copies the typical pen-recorder often seen in computer rooms to track tempterature and humidity.

sp.Heading = "Daily Temperatures\nin Iceland";
sp.HeadingStyle = HeadingStyles.Left;
sp.SetMargins(48,12,12,0);

times = new double[] {0.8,2.3,3.8,5.3,6.8,8.3,9.8,11.3,12.8,14.3,15.8,17.3,18.8,
         20.3,21.8,23.3};
temps = new double[] {4.4,4.4,4.4,4.8,4.4,4.4,4.8,5.6,6,6,6,6.4,6.4,6.8,6.4,6.4};

sp.SetYRange(0,8);
sp.SetYTickMarks(2);
sp.SetXTickMarks(3,2);

sp.YLabelFormat = "#0°";

sp.YCaption = "Deg C";
sp.SetColors(Color.Red);
sp.SetPenWidths(1.5);

sp.SetXZones(new Zone(10,17,Color.SkyBlue,FillStyle.Dome));

sp.PolarChartStyle = PolarChartStyles.ClockFace|PolarChartStyles.GridLines|
         PolarChartStyles.Curves|PolarChartStyles.HollowCenter;
sp.DrawPolarChart(temps,times);

The data values become radii, and time is plotted around the circle as a 24-hour clock – the x-tickmarks are given in hours here. X-zones may be used to indicate times of day.

Summary

The polar plot is a fairly special-purpose chart, but for some types of data it is the only good way to make a readable layout.


SharpPlot 3.71 User Manual: Response surfaces

Response surfaces

The response surface is generally used with computed data to show a mathematical function of two variables. It may be combined with other 3D charts (typically the cloud chart) to show a theoretical fit in addition to the raw data plotted in 3 dimensions.

A Simple Mesh Surface

The data is an array of arrays of nodes in the surface, which must be strictly rectangular. Each inner array is drawn parallel to the X-axis, working from front to back.

mesh = new int[][]{new int[]{8,7,6,5,4,3},new int[]{12,11,10,9,8,7},new int[]{16,15,
         14,13,12,11}};

sp.SetMargins(48,12,24,0);
sp.Heading = "Simple Mesh Surface";
sp.ResponsePlotStyle = ResponsePlotStyles.WallShading|ResponsePlotStyles.Markers;
sp.SetMarkers(Marker.Node);

sp.DrawResponsePlot(mesh);

Mesh with Given X and Y Co-ordinates

This has the same arrays for the mesh, but the nodes are placed explicitly in both X and Y directions, so the effect is to stretch the surface.

mesh = new int[][]{new int[]{8,7,6,5,4,3},new int[]{12,11,10,9,8,7},new int[]{16,15,
         14,13,12,11}};
xvalues = new int[] {8,10,16,20,26,48};
yvalues = new int[] {8,12,20};

sp.SetMargins(48,12,24,0);
sp.Heading = "Stretched Mesh Surface";
sp.ResponsePlotStyle = ResponsePlotStyles.WallShading|ResponsePlotStyles.Markers;
sp.SetMarkers(Marker.Ball);

sp.DrawResponsePlot(mesh,xvalues,yvalues);

Tiling Two Surfaces

Tiled surfaces are most effectively drawn with semi-transparent fill styles, to allow the axes and any data to show through.

mesh = new int[][]{new int[]{8,7,6,5,4,3},new int[]{12,11,10,9,8,7},new int[]{16,15,
         14,13,12,11}};

sp.SetMargins(48,12,24,0);
sp.Heading = "Tiled Surface with Contours";
sp.ResponsePlotStyle = ResponsePlotStyles.WallShading|ResponsePlotStyles.GridLines|
         ResponsePlotStyles.TiledSurface|ResponsePlotStyles.Contours;
sp.SetFillStyles(FillStyle.Opacity42);

sp.SetContourStyle(Color.Navy,LineStyle.Dash,1.5);

sp.DrawResponsePlot(mesh);

This example shows two intersecting planes, each drawn with 30% opacity.

Altitude Shading

If the mesh genuinely represents ‘altitude’ it can be shaded to represent the range of the Z-axis.

terrain = new int[][]{new int[]{50,49,50,49,48,50,49,50,49,47,45,45,43,40,40,36,35,
         33,34,31,30,32,35,36,38,39,42,42,42,45,49,49,50},new int[]{51,51,49,49,47,
         49,48,49,50,46,47,44,43,43,41,41,39,36,33,32,30,32,34,36,38,40,42,44,41,43,
         48,49,52},new int[]{54,49,48,49,49,49,47,47,49,49,48,44,42,44,44,44,41,37,
         34,34,32,33,33,37,40,41,44,42,42,42,44,47,52},new int[]{57,51,51,48,47,48,
         48,51,51,51,49,47,43,43,43,44,43,37,35,34,34,34,35,37,42,41,42,42,44,46,46,
         48,51},new int[]{57,54,51,48,47,51,52,52,53,52,49,46,44,45,46,43,42,41,37,
         36,36,36,39,40,41,42,42,44,45,47,48,48,49},new int[]{56,55,54,49,46,48,52,
         54,55,51,47,46,43,43,45,44,42,40,41,40,37,41,41,43,44,45,42,43,45,45,47,46,
         49},new int[]{55,54,54,49,44,48,50,53,54,49,46,44,42,41,43,43,44,42,43,39,
         38,43,45,47,49,46,44,46,45,45,46,47,47},new int[]{53,54,53,47,47,47,50,51,
         52,50,47,44,43,44,41,44,40,41,41,41,42,44,49,50,51,51,46,45,45,45,46,47,
         48},new int[]{52,50,50,49,46,49,49,51,52,49,46,45,43,44,42,41,40,39,40,43,
         46,49,51,54,55,52,49,49,47,46,46,47,49},new int[]{53,51,53,50,49,49,51,54,
         53,48,46,45,43,42,41,40,39,40,39,41,45,46,49,52,56,54,52,51,51,50,49,49,
         52},new int[]{52,53,55,52,52,52,53,54,55,48,44,42,42,42,39,37,37,38,40,41,
         44,45,48,52,55,56,55,54,52,52,52,54,56},new int[]{56,55,56,55,57,56,57,55,
         55,48,43,43,40,40,38,38,38,39,43,44,45,49,49,53,55,55,54,52,52,53,55,58,
         58},new int[]{58,57,57,61,62,59,58,54,52,47,44,42,40,39,40,39,36,40,43,46,
         48,51,52,54,54,55,53,54,53,54,58,60,60},new int[]{62,60,59,62,61,59,58,53,
         49,48,46,42,37,36,35,37,35,39,42,46,48,50,52,52,56,55,54,51,52,53,58,59,
         61},new int[]{66,65,61,61,60,58,57,53,49,48,47,41,36,34,33,32,33,37,39,42,
         46,48,51,53,54,55,54,54,51,53,56,59,61},new int[]{66,65,64,63,61,59,57,54,
         49,46,46,39,36,34,33,30,30,32,34,39,42,46,49,51,53,55,53,54,54,53,57,57,
         59},new int[]{68,67,63,64,64,60,58,54,51,49,43,38,34,33,30,28,27,31,31,35,
         40,41,45,48,51,51,54,54,54,55,58,58,59},new int[]{65,62,62,64,63,59,53,53,
         49,46,42,40,36,32,31,28,24,29,33,36,39,41,44,47,48,49,51,52,53,53,55,57,
         57},new int[]{61,63,63,62,60,56,52,49,48,45,44,38,35,33,31,27,24,28,33,36,
         37,40,43,44,47,47,50,49,50,52,51,54,55},new int[]{60,58,61,57,55,53,52,48,
         49,47,44,39,34,33,31,26,25,29,31,33,34,37,40,44,49,47,49,50,49,50,49,52,
         51},new int[]{57,56,57,53,51,51,49,49,49,44,43,37,34,30,28,26,25,30,32,33,
         32,34,37,41,47,48,49,48,47,47,49,49,48},new int[]{58,55,55,53,49,48,46,45,
         45,42,39,36,36,35,32,29,27,30,31,34,35,37,37,41,46,48,46,44,44,47,49,48,
         50},new int[]{56,55,52,49,45,44,43,43,44,40,36,38,37,36,34,30,28,28,30,32,
         37,38,39,43,46,43,42,44,43,46,47,48,49},new int[]{52,49,49,45,42,44,41,43,
         42,39,37,36,36,35,34,30,30,32,30,35,37,36,38,39,42,42,43,41,41,42,44,47,
         48},new int[]{48,47,45,43,40,41,41,41,39,38,36,34,35,34,35,33,30,31,33,34,
         37,35,36,36,39,40,41,40,39,40,41,42,46},new int[]{48,45,43,43,40,40,40,40,
         39,38,38,36,36,35,33,34,32,32,34,34,35,36,36,36,39,40,42,40,39,42,43,44,
         47},new int[]{48,43,42,40,39,40,38,38,38,37,38,38,37,35,33,35,35,36,36,35,
         34,33,35,37,39,42,43,44,43,43,43,46,49},new int[]{44,45,43,40,40,38,40,37,
         36,35,37,39,39,36,34,34,35,35,36,33,35,35,38,40,41,40,41,42,43,44,44,47,
         50},new int[]{43,43,44,42,39,40,40,37,35,34,36,38,38,39,37,36,34,34,34,33,
         33,37,39,40,41,42,41,42,44,44,46,49,52},new int[]{46,44,45,43,41,41,38,37,
         36,37,36,37,35,36,35,35,34,34,35,34,37,38,37,40,41,40,41,41,40,43,47,51,
         52},new int[]{47,44,44,44,44,42,38,36,36,37,36,34,35,36,35,34,34,34,34,35,
         37,38,38,39,40,42,41,39,38,42,48,49,52},new int[]{48,47,47,43,42,40,40,38,
         39,37,36,36,36,34,35,35,34,34,35,37,35,37,35,35,37,38,38,37,36,39,46,47,
         50},new int[]{50,50,47,45,42,44,43,40,39,40,38,36,36,36,35,35,37,35,37,35,
         35,36,36,33,33,36,36,35,36,37,41,47,50}};

sp.SetMargins(48,12,24,0);
sp.Heading = "Altitude-shaded Terrain";
sp.ResponsePlotStyle = ResponsePlotStyles.WallShading|
         ResponsePlotStyles.TiledSurface|ResponsePlotStyles.AltitudeShading;
sp.XAxisStyle = XAxisStyles.PlainAxis;
sp.YAxisStyle = YAxisStyles.PlainAxis;

sp.SetFillStyles(FillStyle.Opacity66);
sp.SetColors(Color.ForestGreen);

sp.DrawResponsePlot(terrain);

This works very well with this style of generated fractal landscape.

Summary

The response plot can be a very good way to visualise a computed surface in 3 dimensions.


SharpPlot 3.71 User Manual: Scatter plots for discrete XY data

Scatter plots for discrete XY data

The scatterplot (or scatter diagram) is almost always the first step in analysing any collection of data. Typically you are trying ti isolate one or more causes, in the attempt to predict some effect. These examples all use some data on house-prices, with the idea of being able to predict the price of any house given its type and floor area.

A Simple Scatter of 2 Variables

The first step is simply to plot the price against most likely cause (floor area) as a simple xy plot:

area = new int[] {1326,782,312,1460,1056,752,1120,904,1654,735,565,346,698,775,696,
         741,432,517,747,914,603,1292,551,1383,1580,754,850,518,634};
price = new int[] {60500,47500,46000,110000,148000,65000,79950,54000,120000,85000,
         65000,55000,70000,82500,78500,49950,46950,46950,77000,102000,37500,68000,
         65000,145000,98000,75000,96500,53950,75000};

sp.Heading = "Does Area Affect Price?";
sp.YAxisStyle = YAxisStyles.AtEndCaption;
sp.YCaption = "Price\n(£Thou)";
sp.YFactor = 1000;
sp.XCaption = "Floor Area (sq ft)";

sp.DrawScatterPlot(price,area);

So there is a relationship here, but there is also a lot of apparently random noise.

Using a Quadratic Model

The second example shows a ‘best fit’ model, assuming that there may be a quadratic relationship between floor area and price:

sp.Heading = "How Does Area Affect Price?";
sp.YAxisStyle = YAxisStyles.AtEndCaption;
sp.YCaption = "Price\n(£Thou)";
sp.YFactor = 1000;
sp.XCaption = "Floor Area (sq ft)";

sp.SetMarkers(Marker.Bullet);

sp.ScatterPlotStyle = ScatterPlotStyles.ModelFit|ScatterPlotStyles.GridLines|
         ScatterPlotStyles.ExplodeAxes;
sp.SetOrderOfFit(2);
sp.EquationFormat = "Price = C0 + C1×area + C2×area²";

sp.DrawScatterPlot(price,area);

sp.SetKeyText(sp.Equation);

The equation has been formatted, and used as the text for the key. Note that you cannot retrieve the equation of coefficients until after the plot has been run – this is one of the few places in SharpPlot where the order of the commands is crucial!

Using Logarithmic Axes

This example shows one obvious way of transforming the data, by making both X and Y axes logarithmic.

sp.Heading = "Maybe Logs would help?";
sp.YCaption = "Price\n(£Thou)";
sp.XCaption = "Floor Area (sq ft)";

sp.YAxisStyle = YAxisStyles.LogScale|YAxisStyles.AtEndCaption;
sp.XAxisStyle = XAxisStyles.LogScale;

sp.ScatterPlotStyle = ScatterPlotStyles.GridLines;

sp.DrawScatterPlot(price,area);

Transforming, scaling or shifting the data is often an essential part of helping to see patterns. However it made very little difference in this particular example!

Adding Another Dimension

Maybe the type of house is an important factor here?

Suddenly, this makes the prediction a lot more reliable. We can see that for terrace houses (the grey squares) the relationship between area and price is quite linear and has very little scatter. Semi-detached houses all cluster at the left-hand end, apart from one huge one which we may want to disregard, as being very atypical. Detached houses follow a different model entirely, and bungalows are apparently more sensitive to area, but we have very little data for them.

sp.Heading = "Split by House Type";
sp.YAxisStyle = YAxisStyles.AtEndCaption;
sp.YCaption = "Price\n(£Thou)";
sp.YFactor = 1000;
sp.XCaption = "Floor Area (sq ft)";

housetype = new int[] {1,2,2,3,3,2,1,1,2,4,4,1,2,2,3,2,1,1,2,3,1,1,4,3,1,2,2,2,4};
sp.SplitBy(housetype);

sp.ScatterPlotStyle = ScatterPlotStyles.ModelFit;
sp.EquationStyle = EquationStyles.SpanData;
sp.SetMarkers(new Marker[]{Marker.Block,Marker.Lozenge,Marker.Triangle,Marker.Bullet});
sp.SetColors(new Color[]{Color.Gray,Color.Gray,Color.Firebrick,Color.Firebrick,
         Color.Navy,Color.Navy,Color.ForestGreen,Color.ForestGreen});
sp.SetLineStyles(LineStyle.Dash);
sp.SetPenWidths(1.2);

sp.DrawScatterPlot(price,area);

sp.SetKeyText(new string[]{"Terrace","","Semi","","Detached","","Bungalow"});

Note the ‘placeholder’ entries in the key text here. SharpPlot adds a key placeholder for each series and for each modelfit (or trendline) added to it. This allows you to add specific legends to describe the model as well as to annotate each marker. However in this case the model is ‘obvious’ and we just have empty strings for the alternate entries in the legend.

This is also the reason why the color cycle is preset with pair of matching colors – the marker takes the first of the pair and the line takes the second.

Summary

By plotting the raw data, and trying a few splits on different dimensions, you can usually begin to understand the relationships involved. SharpPlot provides some simple tools for adding fitted models and showing the user the resulting equation.


SharpPlot 3.71 User Manual: Step charts for discontinuous data

Step charts for discontinuous data

Step charts are used for two main chart-types. They are a very convenient way of plotting a timeseries where there may be an instantaneous change between values, which then stay fixed for some time – government interest-rates are typical. Filled stepcharts work well in combination with Barcharts, and they can also be used instead of the Histogram where data has been aggregated into categories of varying widths.

A Simple Stepchart

This chart-type is unusual in that the x-data typically has one more value than the y-data, giving the endpoint of the final plateau in the data.

ydata = new int[] {4,8,12,6};
steps = new int[] {1,5,7,9,14};

sp.YAxisStyle = YAxisStyles.ForceZero;
sp.Heading = "Simple Stepchart";

sp.DrawStepChart(ydata,steps);

Rainfall Totals by Month

The Stepchart is ideal for showing aggregated data where the groups have varying widths (in this case the months are quite similar, but we should still be honest about February). Monthly totals are written using value-tags on the top of each block.

months = new int[] {0,31,59,90,120,151,181,212,243,273,304,334,365};
monthnames = new string[]{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep",
         "Oct","Nov","Dec"};
rudland = new int[] {50,67,55,103,23,95,46,61,139,98,70,87};

sp.StepChartStyle = StepChartStyles.SurfaceShading|StepChartStyles.ValueTags;
sp.SetXTickMarks(months);
sp.XAxisStyle = XAxisStyles.MiddleLabels;
sp.SetXLabels(monthnames);
sp.YAxisStyle = YAxisStyles.AtEndCaption;
sp.YCaption = "mm";

sp.SetFillStyles(FillStyle.GradientBottom);

sp.DrawStepChart(rudland,months);

Note that the month boundaries have been used for the step-points and also to set the tick-marks for the X-axis.

A Discontinuous Timeseries

This chart shows the values of the UK bank-rate over the last eight years.

sp.SetPenWidths(2.5);
sp.SetColors(Color.Orange);

sp.Heading = "UK interest rates (%)";
sp.HeadingStyle = HeadingStyles.Left;
sp.SetHeadingFont("arial",16,FontStyle.Bold,Color.Black);
sp.XAxisStyle = XAxisStyles.AnnualTicks|XAxisStyles.MiddleLabels|XAxisStyles.Clipped;
sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.InvisibleAxis;
sp.YTickStyle = YTickStyles.NoTicks;
sp.YLabelFormat = "#.00";
sp.SetYRange(3,7.5);

changedates = new int[] {35582,35582,35612,35643,35726,35947,36130,36141,36160,
         36165,36192,36231,36323,36415,36495,36537,36568,36923,36951,36993,37105,
         37151,37169,37204,37658,37812,37929,38023,38113,38141,38148,38205,38387,
         38568,38580};
baserate = new double[] {6.25,6.5,6.75,7,7.25,7.5,7.25,6.75,6.25,6,5.5,5.25,5,5.25,
         5.5,5.75,6,5.75,5.5,5.25,5,4.75,4.5,4,3.75,3.5,3.75,4,4.25,4.25,4.5,4.75,
         4.75,4.5,4.5};

sp.DrawStepChart(baserate,changedates);

Note that the dates have been given in OLE-date format and the X-axis style is ‘Annual’ to have tickmarks placed at the year boundaries.

Budget as a Backcloth

This example combines a Stepchart with a standard Barchart to show the annual budget as a backdrop to the actual sales figures by month. In this case, the months all have a ‘notional’ width so no x-axis need be given for the steps.

budget = new int[] {1,3,7,6,9,8,9,7,9,10,7,5,5};
actual = new int[] {-1,2,9,5,8,9,8,6,7,9,6,9};

sp.Heading = "Sales in 2004";
sp.HeadingStyle = HeadingStyles.Left;

sp.SetColors(new Color[]{Color.Green,Color.Navy});
sp.SetFillStyles(new FillStyle[]{FillStyle.Halftone,FillStyle.GradientBottom});

sp.SetYRange(-3,10);
sp.Baseline = 0;

sp.XAxisStyle = XAxisStyles.MiddleLabels;
sp.SetXLabels(monthnames);

sp.StepChartStyle = StepChartStyles.SurfaceShading;

sp.DrawStepChart(budget);  // see Stepsuite

sp.DrawBarChart(actual);

sp.SetKeyText(new string[]{"Budget","Actual performance"});
sp.KeyStyle = KeyStyles.TopAlign|KeyStyles.RightAlign|KeyStyles.Boxed|KeyStyles.Rounded;

Note the use of a ‘baseline’ here to have the shading and bars drawn outwards from the zero-line rather than from the X-axis. The chart has been given an explicit Y-range to allow space for the extremes from both series.

Summary

The Stepchart may be used on its own, but is often most useful in combination with other chart types.


SharpPlot 3.71 User Manual: Tabulating data

Tabulating data

SharpPlot can tabulate as well as chart, but please be aware that these tables are not designed to display large amounts of complex data. They are for summaries and simple CrossTabs where a limited amount of data can be used to augment a complex chart. The examples show a table used as a chart in its own right, and some simple summaries and groupings added as ‘notes’ to typical timeseries data.

A Simple Data Table

SharpPlot treats each array-element in the argument as a column of data, and uses the X-labels as the column headers, with the Y-labels as the row-stubs. The Y-caption is used here to label the cell in the top-left corner. Note that the cell font is set by SharpPlot.SetValueFont.

column1 = new int[] {18,27,31,1,1};
column2 = new int[] {120,34,27,18,8};

sp.SetYLabels(new string[]{"North","South","East","West","Other"});
sp.SetXLabels(new string[]{"2004","2005"});

sp.YCaption = "Regional\nTotals";

sp.TableStyle = TableStyles.Boxed|TableStyles.GridLines|TableStyles.Shadowed;
sp.SetValueFont("ARB",12);
sp.ValueTagFormat = "##0.0";
sp.SetLabelFont("ARB",13);
sp.SetCaptionFont("ARB",13);

sp.DrawTable(new int[][]{column1,column2});

If a simple array of numbers is passed, it is treated as a one-column table.

Average Price by House Type

This example adds a table of average prices to the house-price data used in the ScatterPlot tutorials. Another good use of a summary table would be to show the ‘count’ as a table to allow a quick check on the number of houses in each sample.

price = new int[] {60500,47500,46000,110000,148000,65000,79950,54000,120000,85000,
         65000,55000,70000,82500,78500,49950,46950,46950,77000,102000,37500,68000,
         65000,145000,98000,75000,96500,53950,75000};
area = new int[] {1326,782,312,1460,1056,752,1120,904,1654,735,565,346,698,775,696,
         741,432,517,747,914,603,1292,551,1383,1580,754,850,518,634};
housetype = new int[] {1,2,2,3,3,2,1,1,2,4,4,1,2,2,3,2,1,1,2,3,1,1,4,3,1,2,2,2,4};

sp.Heading = "Price vs Floor Area";
sp.HeadingStyle = HeadingStyles.Right;
sp.YLabelFormat = "£##,###,##0";

sp.DrawScatterPlot(price,area);

sp.GroupBy(housetype,new string[]{"Terrace","Semi-Detached","Detached","Bungalow"},
         GroupByFunction.Average);
sp.SetXLabels("Average\nPrice");
sp.YCaption = "House type";

sp.TableStyle = TableStyles.Boxed|TableStyles.GridLines|TableStyles.Opaque;
sp.YLabelFormat = "";  // otherwise would format groupby labels
sp.ValueTagFormat = "£##,###,##0";

sp.SetTablePosition(350,180000);
sp.DrawTable(price);

Note that the table is placed using the axis co-ordinates here. It can also be placed with absolute co-ordinates (given in points) and the table-width may be given as an optional 3rd argument to scale the table to fit the available space.

Creating a CrossTab from the Barley Data

The barley yield data is a good candidate for a Cross-tab. The two methods that do this are GroupBy (to collect data into the rows) and SplitBy to spread the values across the columns.

sp.Heading = "Barley Crosstab";

sp.SplitBy(barleyfarm);
sp.GroupBy(barleyvariety,GroupByFunction.Average);

sp.TableStyle = TableStyles.GridLines;
sp.XLabelFormat = "xxxxxxxxx;";

sp.YCaption = "Average Yield";

sp.ValueTagFormat = "##0.00";
sp.ValueTagStyle = ValueTagStyles.Center;

sp.DrawTable(barleyyield);

Here it has been summarised by Variety and categorised by Year as a 2-way table. You can summarize or split by up to 2 levels here to create more complex tabulations.

Cross-tabulation with Two Levels

This example shows the same data, but split 2 ways to make a heirarchical summary. Note that a frame has already been drawn here (with the main chart heading) and the table is fitted automatically into the frame width.

sp.Heading = "Complete Barley Data Tabulation";
sp.SetMargins(36,0,0,0);
sp.DrawFrame();

sp.SplitBy(barleyfarm);
sp.SplitBy(barleyyear);
sp.GroupBy(barleyvariety);

sp.TableStyle = TableStyles.GridLines|TableStyles.Spanned|TableStyles.FitWidth;
sp.YCaption = "Yield by\nVariety";
sp.ValueTagFormat = "##0.0kg";  // Formatter
sp.ValueTagStyle = ValueTagStyles.Center;

sp.DrawTable(barleyyield);

You can also add an extra level of Grouping to have an indented 2-level summary shown in the row-stubs.

Summary

Tables may be used on their own to provide summary information, or in combination with other charts as structured notes.


SharpPlot 3.71 User Manual: Tower charts for 3D bars

Tower charts for 3D bars

Towercharts are good for visual impact, but are rarely an effective way to present numbers where the values are important. These examples parallel some of the examples in the tutorial on tables, as a Towerchart is really just a simple way to present a two-way tabulation in visual form.

A Simple Towerchart from Arrays of Data

SharpPlot expects the data as an array of arrays of values – each inner array is plotted parallel to the X-axis and they work back towards the backplane. This means that they are best drawn with the smaller values in the earlier arrays, each of which is itself arranged from larger to smaller values – this way the towers are less likely to hide each other.

towers = new int[][]{new int[]{8,7,6,5},new int[]{12,11,10,9},new int[]{16,15,14,13}};

sp.SetMargins(48,12,24,0);

sp.Heading = "Simple Towerchart";
sp.SetXLabels(new string[]{"North","South","East","West"});
sp.SetYLabels(new string[]{"Coats","Hats","Scarves"});

sp.TowerChartStyle = TowerChartStyles.WallShading;

sp.DrawTowerChart(towers);

Note that both the X and Y axes simply display the towers in sequence – there is no equivalent of XBarchart available here to allow towers to be placed in specific places on the XY grid. The axes will be automatically labelled with the tower number unless you give your own labels (as here).

Using Towers to Summarise Data

This example displays a one-way summary in a style very like the Excel Column chart. The perspective drawing has been turned off here to give the effect of an isometric projection.

housetype = new int[] {1,2,2,3,3,2,1,1,2,4,4,1,2,2,3,2,1,1,2,3,1,1,4,3,1,2,2,2,4};
price = new int[] {60500,47500,46000,110000,148000,65000,79950,54000,120000,85000,
         65000,55000,70000,82500,78500,49950,46950,46950,77000,102000,37500,68000,
         65000,145000,98000,75000,96500,53950,75000};

sp.Heading = "Maximum Price by House Type";

sp.GroupBy(housetype,GroupByFunction.Maximum);
sp.SetXLabels(new string[]{"Terrace","Semi","Detached","Bungalow"});

// Force isometric and horizontal X-Axis
sp.SetViewpoint(8,0,80);
sp.Perspective = 0;

sp.TowerChartStyle = TowerChartStyles.WallShading|TowerChartStyles.GridLines;

sp.ZFactor = 1000;
sp.ZCaption = "£Thousand";
sp.ZAxisStyle = ZAxisStyles.AtEndCaption;
sp.DrawTowerChart(price);

Note that the X-axis labels have been explicitly set here – for text categories they would be automatically created as the distinct elements in the group.

Two-way Summary shown as Towers

You can think of a Towerchart as a grouped barchart, with the splitting working away from the X-axis, rather than into collections of narrow bars.

region = new string[]{"North","North","North","North","South","South","South",
         "South","South","South","South","South"};
regions = new string[]{"South","North"};

month = new string[]{"Jan","Mar","May","Aug","Jan","Feb","Mar","May","Jun","Jul","Oct","Dec"};
sales = new int[] {3,4,3,5,4,2,5,4,3,5,4,1};
months = new string[]{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct",
         "Nov","Dec"};

sp.Heading = "Total Monthly Sales by Region";
sp.GroupBy(month,months);  // Sum is default
sp.SplitBy(region,regions);

sp.XAxisStyle = XAxisStyles.AngledLabels;
sp.YAxisStyle = YAxisStyles.AngledLabels;

sp.TowerChartStyle = TowerChartStyles.WallShading|TowerChartStyles.GridLines;
sp.DrawTowerChart(sales);

Towers are normally drawn with relatively few parallel sets of columns, so it is generally best to have the category with most entries as the ‘groups’ and the one with fewer entries as the ‘split’.

Adding Visual Pizzazz

This final chart shows some simple effects with gradient fills which can be used to add that ‘designer’ look to the chart.

towers = new int[][]{new int[]{8,7,6},new int[]{12,11,10},new int[]{16,15,14},new
         int[]{21,18,15}};

sp.SetMargins(12,6,18,0);

sp.TowerChartStyle = TowerChartStyles.WallShading|TowerChartStyles.GridLines|
         TowerChartStyles.Plain;
sp.ZAxisStyle = ZAxisStyles.ForceZero;

sp.SetTowerFillStyles(FillStyle.Saturate20,FillStyle.GradientBottomRight,FillStyle.Solid);
sp.SetWallFillStyles(FillStyle.GradientBottomRight,FillStyle.GradientBottomLeft,
         FillStyle.GradientTopLeft);
sp.SetViewpoint(22,15,50);

sp.TowerAspect = 2;
sp.BarEdgeNib = 0;

sp.DrawTowerChart(towers);

For charts rendered as vector graphics (SVG, VML etc) this adds very little to the size of the output file. For images (such as PNG) it will greatly increase the file size as the image compression will find very few areas of solid color.

Summary

The Towerchart is a good presentational tool for small amounts of data which falls naturally into categories. It is often necessary to arrange the categories to put the bigger towers at the back, as it is very easy to obscure data otherwise.


SharpPlot 3.71 User Manual: Trace charts for multiple series

Trace charts for multiple series

Trace charts (or ECG plots) are often a convenient way to add an extra dimension to a two-dimensional chart. They are similar in principle to the small multiple, but save a lot of redundant ink when all the series share the same X-axis. Trace-charts are also used as a simple way to draw Kite Diagrams, which are a common graphical tool for botanical field studies.

Several Parallel Timeseries

This chart takes the ‘delta’ of three popular stock prices and shows the daily volatility of each. Note that both BP and the Halifax Bank show the spike around day-50 (the invasion of Iraq) but Kelda (a utility stock) was completely unaffected.

sp.Heading = "Daily Volatility of 3 Stock Prices";

bp = VectorMath.Difference(new int[] {427,428,427,429,424,418,420,424,416,410,406,
         409,403,395,389,380,374,369,356,362,383,383,382,393,386,398,382,379,380,
         394,385,381,388,396,404,393,400,413,417,414,402,400,400,408,408,406,405,
         395,392,395,371,392,400,415,413,414,417,428,416,422,429,416,414,401,416,
         406,407,416,421,411,412,406,405,408,414,407,408,414,412,406,395,403,400,
         397,395,405,411,414,408,416,416,407,413,414,408,414,410,418,415,424,428,
         424,418,428,430,436,430,430,429,432,439,446,439,438,433,438,429,434,431,
         428,424,420,424,420,412,412,410,412,418,414,410,404,407,410,404,405,411,
         415,415,419,419,423,416,423,420,423,426,422,428,421,425,436,442,439,433,
         440,436,442,437,435,432,436,437,429,437,448,448,442,450,442,441,443,439,
         436,440,438,429,422,423,419,423,426,415,415,413,422,420,429,432,432,430,
         435,434,442,435,433,426,426,425,421});
kelda = VectorMath.Difference(new int[] {424,420,418,421,429,440,426,427,419,413,
         415,421,428,428,424,429,411,408,399,403,400,400,402,404,404,412,416,411,
         421,426,423,420,413,419,418,423,428,428,437,434,424,416,410,426,422,422,
         420,410,411,414,408,413,404,409,408,401,408,400,390,381,407,412,410,410,
         408,425,413,415,418,419,420,416,419,425,423,419,422,425,424,416,411,411,
         414,411,408,412,416,415,408,414,419,421,426,430,420,432,425,437,436,437,
         445,436,434,440,440,436,438,435,433,430,427,427,428,429,433,426,428,426,
         423,430,432,426,424,427,430,427,428,427,429,430,426,429,430,430,430,428,
         431,429,430,442,440,442,441,435,435,439,441,440,442,436,438,429,432,432,
         436,438,438,437,443,442,419,419,412,410,404,410,408,406,408,409,412,413,
         414,415,418,418,420,416,420,431,429,435,429,425,423,428,423,424,428,430,
         428,428,423,428,426,426,423,425,427,430});
hbos = VectorMath.Difference(new int[] {655,672,665,659,642,639,638,647,638,647,627,
         629,618,602,589,574,558,578,563,549,538,556,551,589,567,592,581,592,566,
         581,589,600,590,616,619,600,602,596,589,621,638,625,662,668,660,651,651,
         626,608,612,563,598,626,641,652,668,654,690,675,674,684,670,659,650,663,
         672,688,690,720,700,698,691,694,714,737,716,722,739,749,738,726,744,740,
         733,713,737,725,706,707,702,694,699,714,728,715,718,714,708,690,694,721,
         735,723,740,744,750,747,760,762,760,787,790,791,792,806,812,789,805,795,
         806,807,804,793,784,772,785,781,774,793,800,778,766,780,794,796,772,766,
         762,751,765,768,786,786,798,795,792,775,772,769,752,748,748,754,746,733,
         744,750,747,728,717,716,721,718,704,722,730,725,717,722,732,730,717,716,
         720,732,737,738,717,708,718,705,698,692,694,688,716,724,724,716,720,715,
         727,736,750,748,744,735,736,742,740});

sp.YAxisStyle = YAxisStyles.GridLines;
sp.IAxisStyle = IAxisStyles.PlainAxis;

sp.SetYLabels(new string[]{"Kelda","BP","HBOS"});
sp.IAllowance = 1.5;
sp.IIntercept = 0;

trace = new int[][]{kelda,bp,hbos};
sp.DrawTraceChart(trace);

If the series tend to move very closely together, you can set the Inner-axis range to quite a big number (say 1.8) to allow each series to stray into the band occupied by its neighbours. This would be typical of a multiple pen-plotter such as a seismograph.

Inventory Projection for a Tank Farm

An excellent use of the trace-chart is to show the inventory of various liquids as they move through some production process. This gives a very clear picture of what materials are available at each production stage.

sp.Heading = "Inventory in Processing Vessels";

raw = VectorMath.RunningTotal(new int[] {0,0,0,0,1,1,1,1,0,0,0,0,-1,-1,-1,0,0,0,0,1,
         1,1,1,1,0,0,0,0});
part = VectorMath.RunningTotal(new int[] {4,0,0,0,-1,-1,-1,0,0,0,0,0,1,1,1,0,0,0,0,
         1,1,1,0,0,-1,-1,-1,0});
done = VectorMath.RunningTotal(new int[] {2,0,0,0,1,1,1,0,0,0,0,0,-1,0,-1,-1,-1,0,0,
         0,0,0,0,0,1,1,1,0});

sp.IIntercept = 0;
sp.TraceChartStyle = TraceChartStyles.SurfaceShading;

sp.SetYLabels(new string[]{"Raw","Part\nDone","Finished"});
sp.SetXTickMarks(1);

sp.XAxisStyle = XAxisStyles.ArrowedAxis|XAxisStyles.CenteredCaption;
sp.XCaption = "Days forward from today";

sp.YCaption = "Vessel";
sp.YAxisStyle = YAxisStyles.AtEndCaption;

sp.SetFillStyles(FillStyle.GradientBottom);

trace = new int[][]{raw,part,done};
sp.DrawTraceChart(trace);

This variant of the chart is normally surface-shaded and scaled from ‘empty’ to ‘full’ for each vessel. The example would be a typical display from a production-planning system where the planner was scheduling the processes which moved liquids bwteen the various vessels.

The Kite Diagram

This is a very special-purpose chart, which is simply a reflected version of the surface-filled plot.

sp.Heading = "Sample Kite Chart";

oak = new int[] {0,0,1,2,2,3,3,3,2,1,1,0};
ash = new int[] {0,0,0,0,1,1,1,0,0,0,0,0};
birch = new int[] {0,1,1,1,2,2,2,2,2,2,1,1};
hazel = new int[] {0,1,1,2,2,2,1,0,0,0,0,0};

sp.YCaption = "Species\nobserved";
sp.YAxisStyle = YAxisStyles.AtEndCaption|YAxisStyles.GridLines;
sp.SetYLabels(new string[]{"Oak","Ash","Birch","Hazel"});
sp.XCaption = "Metres\nfrom\nShore";
sp.XAxisStyle = XAxisStyles.AtEndCaption|XAxisStyles.ArrowedAxis;
sp.MarginRight = 48;
sp.TraceChartStyle = TraceChartStyles.KiteDiagram;

sp.SetFillStyles(new FillStyle("25+#CCCC00"));  // NB - #.FillStyle.GradientRight + Orange
sp.SetColors(Color.ForestGreen);

trace = new int[][]{oak,ash,birch,hazel};
sp.DrawTraceChart(trace);

It is commonly used to show vegetation coverage or the results of a pollen analysis. The example shows a count of some common tree-species as we walk inland from a lake-shore into the forest.

Adding Categories

All styles of Tracechart can categorise data by cycling through colors of fill-styles.

oak = new int[] {0,0,1,2,2,3,3,3,2,1,1,0};
ash = new int[] {0,0,0,0,1,1,1,0,0,0,0,0};
birch = new int[] {0,1,1,1,2,2,2,2,2,2,1,1};
hazel = new int[] {0,1,1,2,2,2,1,0,0,0,0,0};
sycamore = new int[] {0,0,0,0,0,0,0,1,2,2,2,2};
chestnut = new int[] {0,1,1,1,2,3,3,3,3,2,1,0};

sp.YCaption = "Species";
sp.YAxisStyle = YAxisStyles.AtEndCaption|YAxisStyles.GridLines;
sp.SetYLabels(new string[]{"Oak","Ash","Birch","Hazel","Sycamore","Horse Chestnut"});

sp.XAxisStyle = XAxisStyles.ArrowedAxis;
sp.YLabelFormat = "XXXXXXXX;";
sp.MarginLeft = 48;

sp.TraceChartStyle = TraceChartStyles.KiteDiagram;
sp.IAxisStyle = IAxisStyles.PlainAxis;
sp.SetFillStyles(FillStyle.Saturate80);

sp.KeyStyle = KeyStyles.Boxed|KeyStyles.Shadowed;
native = new string[]{"Native","Native","Native","Native","Alien","Alien"};
sp.SplitBy(native);

sp.SetColors(new Color[]{Color.Green,Color.OrangeRed});
sp.SetLineStyles(LineStyle.Solid);

trace = new int[][]{oak,ash,birch,hazel,sycamore,chestnut};
sp.DrawTraceChart(trace);

The example chooses to segregate two types of tree species.

Summary

Trace charts are a surprisingly versatile way of showing a high density of information on a single chart. They are worth considering as alternatives to the standard Linegraph whenever there are many series to be compared.


SharpPlot 3.71 User Manual: Triangle plots for 3-way proportions

Triangle plots for 3-way proportions

The Triangle chart is used to analyse data where there are three important constituents, summing to unity. It is common in Geology and Chemical Engineering where a set of 3 key ingredients determines the outcome from some process.

Plotting the Proportions of 3 values

alpha = new int[] {2,3,3};
bravo = new int[] {3,2,2};
charlie = new int[] {4,4,1};

sp.SetMargins(64,18,0,0);
sp.Heading = "Proportions for 3 Samples";
sp.Subheading = "Requires 3 sets of values as equal-length vectors";

sp.TriangleStyle = (TriangleStyles.Markers|TriangleStyles.Labelled|TriangleStyles.ValueTags|TriangleStyles.GridLines);
sp.XCaption = "Alpha";
sp.YCaption = "Bravo";
sp.ZCaption = "Charlie";
sp.SetValueTags(new string[]{"S1","S2","S3"});
sp.SetMarkers(Marker.Bullet);

sp.DrawTriangle(alpha,bravo,charlie);

This chart shows the proportions of 3 constituents found in samples S1,S2 and S3. The allocation of series to chart axes is entirely arbitrary – the convention used is to work around clockwise from 12:00.

The natural data structure for this chart is a 3-column matrix, but an array of 3 data arrays (of equal lengths) is accepted.

Illustrating a Danger Zone

methane = new int[] {2,3,3,2,2};
oxygen = new int[] {3,2,2,4,3};
nitrogen = new int[] {4,4,2,2,4};

sp.SetMargins(42,12,0,0);
sp.Heading = "Explosive Mixtures";

sp.SetPenWidths(1.2);
sp.SetColors(Color.Red);
sp.SetFillStyles(FillStyle.Opacity18);

sp.TriangleStyle = (TriangleStyles.Lines|TriangleStyles.Curves|TriangleStyles.Labelled|
                    TriangleStyles.ValueTags|TriangleStyles.GridLines|TriangleStyles.Percentage|
                    TriangleStyles.Filled|TriangleStyles.SideCaptions);

sp.SetChartBackground(ColorTranslator.FromHtml("#B4C287"),FillStyle.Solid,0);
sp.SetGridLineStyle(Color.White,LineStyle.Solid,0.12);
sp.Flexibility = 12;

sp.XCaption = "Methane";
sp.YCaption = "Oxygen";
sp.ZCaption = "Nitrogen";

sp.SetValueTags(new string[]{"","Danger Area"});
sp.ValueTagStyle = (ValueTagStyles.Inside|ValueTagStyles.Opaque);

sp.DrawTriangle(new int[][]{methane,oxygen,nitrogen});

This is very typical of charts used in the chemical and oil industry, where certain combinations are either desirable or dangerous. Typically a chart such as this would be used as a basis, over which to plot a set of samples.

Note the use of ValueTags (only one is non-null) to label the outline.

See also ...

SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: Vector fields and directed graphs

Vector fields and directed graphs

This style of plot can be used in two very different ways, to show either directed graphs, or to plot vector fields as a scatter diagram. The examples illustrate both of these.

Plotting a Vector Field

This style of chart is common in oceanography or weather-forecasting. The first (xy) pair is used to plot the location of the reading, and the offset to the second pair represents the direction and value of some measured quantity like windspeed or current flow.

x1 = new int[] {77,25,43,42,93,32,81,14,64,4,71,98,22,51,89,53,24,22,55,45,48,50,59};
y1 = new int[] {17,48,55,24,52,74,31,98,70,63,63,43,7,33,72,55,81,91,83,82,65,62,89};
x2 = new int[] {93,31,51,50,114,40,99,19,78,7,86,121,28,62,108,65,30,28,67,56,58,62,72};
y2 = new int[] {24,57,65,31,63,85,41,110,83,75,75,53,12,42,84,67,93,103,97,96,78,74,101};

sp.Heading = "Map of Current Flow";
sp.VectorStyle = VectorStyles.ArrowLines;
sp.DrawVectors(x1,y1,x2,y2);

Typically the lines have arrowheads to indicate the flow direction. This chart can also be used for any kind of vector field, for example to show the slope at any point on a landscape.

Labelling the Vectors

This example adds value-tags to each vector (giving the length of the line) and shows the ‘root’ of each line as well as the length and direction.

sp.Heading = "Wind Direction and strength";
sp.VectorStyle = VectorStyles.Rooted|VectorStyles.ValueTags|VectorStyles.ArrowLines;
sp.ValueTagFormat = "##0";
sp.SetMarkers(Marker.Bullet);

sp.DrawVectors(x1,y1,x2,y2);

In most cases, you would set your own value data here as the scaling of the lines is generally quite arbitrary.

Simple Connected Graph

This chart can easily be used to draw simple diagrams, typically representing connected tasks, such as an assembly process.

// Links as arrays of (x y x y) values
data = new int[][]{new int[]{1,1,2,1},new int[]{1,2,2,2},new int[]{1,2,2,3},new
         int[]{2,1,3,2},new int[]{2,2,3,2},new int[]{2,2,3,3},new int[]{2,3,3,3},
         new int[]{3,2,4,2},new int[]{3,3,4,2}};

sp.SetPenWidths(1.4);
sp.SetMarkerScales(2);
sp.SetMarkers(Marker.Bullet);
sp.VectorStyle = VectorStyles.Terminated|VectorStyles.Rooted|VectorStyles.NoAxes;

sp.DataStyle = DataStyles.Rows;
sp.DrawVectors(data);

Alternatively, a ScatterPlot could be used to draw the nodes, and the Vector chart simply to add the map of connections.

Drawing a PERT Chart

The final example assumes that the arrows represent activities of some kind, and the diagram as a whole illustrates a project plan where activities must be carried out in the correct order.

// Nodes as two arrays
x = new int[] {1,1,2,2,2,3,3,4};
y = new int[] {1,2,1,2,3,2,3,2};

// Links as 4 arrays
x1 = new int[] {1,1,1,2,2,2,2,3,3,2};
y1 = new int[] {1,2,2,1,2,2,3,2,3,1};
x2 = new int[] {2,2,2,3,3,3,3,4,4,1};
y2 = new int[] {1,2,3,2,2,3,3,2,2,1};

sp.SetMargins(60,12,12,12);
sp.Heading = "PERT Chart with Labelled Activities";

sp.SetColors(new Color[]{Color.Navy,Color.Maroon});

// Draw the markers
sp.SetMarkers(Marker.Node);
sp.SetMarkerScales(2);
sp.SetPenWidths(2);

sp.ScatterPlotStyle = ScatterPlotStyles.NoAxes;
sp.DrawScatterPlot(y,x);

// Fill in the labelled lines
sp.VectorStyle = VectorStyles.ArrowLines|VectorStyles.Dissected|VectorStyles.ValueTags;
sp.SetValueTags(new string[]{"One","Two","Three","Four has\n<b>two</b> "+
         "lines","Five","Six","Seven\nis here","Eight","Nine","Home"});
sp.SetArrowStyle(16,24);
sp.SetValueFont("Arial",9,Color.DarkGreen);

sp.DrawVectors(x1,y1,x2,y2);

Here, the activities have been labelled, and the nodes drawn with a separate scatterplot. Notice the use of the ‘Dissected’ style to prevent the arrows from colliding where several lines converge on the same node.

Summary

This chart has several good uses on its own, but is very likely to be combined with standard LineGraphs and ScatterPlots, typically to label bunches of points using indicator lines and notes, or to connect arbitrary points on a timeseries (for example Buy and Sell points in a historical price plot).


SharpPlot 3.71 User Manual: Venn diagrams

Venn diagrams

Venn diagrams are used to summarise set membership information. SharpPlot will draw a proportional diagram for two sets (and one intersection) but for the three set case the chart is purely diagrammatic, as it is impossible to scale all the regions in the correct proportion. Diagrams for higher numbers of sets are not supported.

A Simple 2-Area Diagram

This is very typical of the type of data Venn diagrams are used for. We have a population of students, of which 12 study maths and 23 are girls. Of these, 7 study maths.

data = new int[] {23,12,7};
sp.SetMargins(12,48,0,0);
sp.VennDiagramStyle = VennDiagramStyles.ValueTags;
sp.SetValueFont("arial",18,FontStyle.Bold,Color.Maroon);

sp.SetColors(new Color[]{Color.Green,Color.Maroon});
sp.SetEdgeStyle(Color.Black,LineStyle.Solid,2);

sp.SetXLabels(new string[]{"Females","Maths Students","Female Maths Students"});
sp.SetXLabelFont("times",12,FontStyle.Bold,Color.Maroon);
sp.XLabelFormat = "XXXXXX;";

sp.DrawVennDiagram(data);

The two circles are drawn with their areas in proportion to the size of each group, and the centres are placed so that the area of overlap represents the number in the intersection.

Shading and Outlining

When you choose to fill the circles, SharpPlot picks a suitable opacity setting so that the colours combine effectively.

sp.SetMargins(12,48,0,0);
sp.VennDiagramStyle = VennDiagramStyles.Filled|VennDiagramStyles.RedrawOutline|
         VennDiagramStyles.ValueTags;
sp.SetValueFont("arial",18,FontStyle.Bold,Color.White);

sp.SetColors(new Color[]{Color.Green,Color.Maroon});
sp.SetXLabels(new string[]{"Females","Maths Students","Female Maths Students"});
sp.SetXLabelFont("times",12,FontStyle.Bold,Color.Maroon);
sp.XLabelFormat = "XXXXXX;";

sp.DrawVennDiagram(data);

In this example the outline of each circle is redrawn over the filled areas.

Combining Values and Labels

For a simple chart like this, it may be better to combine the text with the values and write everything into the circles. This has the advantage of saving space and allowing the chart to be drawn a little bigger.

data = new int[] {23,18,9};
sp.SetMargins(6,6,0,0);

sp.VennDiagramStyle = VennDiagramStyles.Filled|VennDiagramStyles.RedrawOutline|
         VennDiagramStyles.ValueTags;
sp.SetValueFont("arial",14,FontStyle.Bold,Color.White);
sp.ValueTagFormat = "XL #0";
sp.ValueLineSpacing = 100;
sp.SetColors(new Color[]{Color.Green,Color.Maroon});
sp.SetEdgeStyle(Color.Navy);
sp.SetXLabels(new string[]{"Female","Maths","Female and Maths"});
sp.XLabelFormat = "XXXXXXX;";

sp.DrawVennDiagram(data);

Note that the Value-tag format patches in the X-labels, and then the entire string is wrapped using the X-label format.

Three Areas

For the Three-area chart, it is essential to add the Value tags, as the size of the circles gives no clue to the number of members of each category.

data = new int[] {23,12,7,8,4,3,2};
sp.SetMargins(12,12,6,6);

sp.VennDiagramStyle = VennDiagramStyles.Filled|VennDiagramStyles.RedrawOutline|
         VennDiagramStyles.ValueTags;

sp.SetValueFont("arial",18,FontStyle.Bold,Color.Maroon);

sp.ValueTagStyle = ValueTagStyles.Inside;
sp.ValueLineSpacing = 100;
sp.SetColors(new Color[]{Color.Green,Color.Wheat,Color.LightBlue});

sp.SetXLabels(new string[]{"Boys","Scientists","Golfers"});
sp.SetXLabelFont("times",14,FontStyle.Bold,Color.Teal);

sp.DrawVennDiagram(data);

Here we have 23 boys and 7 golfers. 3 of the boys play golf, and 2 of the golfing boys are scientists. For realistic data, some of the areas may have no members at all, but this does not affect the way the diagram is drawn.

Summary

The Venn diagram is a very special-purpose chart, and would normally be used for illustration rather than serious data-analysis. Charts with more circles have many more possibly intersections, and are almost impossible to draw in a way which provides any useful information to the reader. For the moment, SharpPlot limits you to the simple cases.


SharpPlot 3.71 User Manual: X Bar charts for positioned bars

X Bar charts for positioned bars

Barcharts are usually drawn with a ‘logical’ X-axis. However there are times when you want to represent discrete values which occur at particular times. the XBarchart allows you to place bars exactly where you want them, and also to override the normal width for each bar.

Lottery winnings

This is a typical chart when a discrete event occurs occasionally. The data gives the year and value of the data rather than a continuous timeseries with many zero elements.

sp.Heading = "Lottery winnings";

year = new int[] {1993,1996,1998,1999,2001,2003};
won = new int[] {50,100,100,50,50,50};

sp.YAxisStyle = YAxisStyles.ForceZero;
sp.DrawXBarChart(won,year);

Using the bar widths to add Information

Supposing we sometimes were very lucky and won twice in the same year.

sp.Heading = "Lottery winnings";

year = new int[] {1993,1996,1998,1999,2001,2003};
won = new int[] {50,100,100,50,50,50};
count = new int[] {1,1,2,1,2,1};

sp.SetYTickMarks(50,4);
sp.YAxisStyle = YAxisStyles.GridLines;

sp.SetBarWidths(VectorMath.Multiply(count,0.25));

sp.DrawXBarChart(won,year);

Here the bars are drawn in proportion to the number of wins.

Summarizing Age Bands

The Histogram will summarize data into equal-width groups, and unequal groups may be represented by a filled Stepchart. The XBar offers another alternative here, as the bar-widths can be kept constant regardless of the width of the group.

sp.Heading = "Population by Age Group";
sp.XAxisStyle = XAxisStyles.MiddleLabels;
sp.SetXLabels(new string[]{"0-10","11-20","21-35","36-50","51-70","70+"});
sp.SetXTickMarks(new int[] {0,10,20,35,50,70,100});

midpoints = new int[] {5,15,27,42,60,85};
data = new double[] {12.5,14,30,28,12.5,3};

sp.DrawXBarChart(data,midpoints);

This is probably a more accurate view of the data, as the number in each sample is represented only by the height of the bar.

Faking a Grouped/Stacked Barchart

There are occasions when what you really need is a grouped barchart, with one half of the group shown as a stack of bars.

sp.Heading = "Requirement and Projected Manufacturing";

req = new int[] {30,24,22,18,24,28,21,23,40,42,66,22};  // Requirement
prd = new int[][]{new int[]{8,5,8,1,9,4,7,5,8,6,4,10},new int[]{11,11,16,11,18,24,
         14,21,17,6,18,22}};  // Production by Plant

sp.SetXLabels(new string[]{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep",
         "Oct","Nov","Dec"});
sp.XAxisStyle = XAxisStyles.MiddleLabels;
sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.ForceZero;

// Set barwidth explicitly here so we have exact positioning
sp.SetBarWidths(0.4);

xpos = VectorMath.Sum(0.3,VectorMath.Range(0,12));
sp.DrawXBarChart(req,xpos);

// Now set the style to be cumulative and draw stacked bars beside them ...
sp.DataStyle = DataStyles.Relative;
xpos = VectorMath.Sum(0.7,VectorMath.Range(0,12));

sp.DrawXBarChart(prd,xpos);

sp.SetKeyText(new string[]{"Required to\nmeet Sales","Plant-1","Plant-2"});

This example is typical of a production planning display, where the left-hand bar of each pair shows the total demand in the time period, and the right-hand is split to show supply from various production plants.

Summary

The XBarchart can be used on its own for time-based discrete series, or in combination with other charts to add blocks of color, or to fake particularly complex barcharts.

See also ...

SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: Style Examples

Style Examples

Examples of typical chart and axis styles.

AboveGrid | Above Gridlines (Y-Labels)
AltitudeShading | Altitude shading
AngledLabels | Angled Labels
AnnotateModel | Annotate Model fit
ArrowedAxis | Arrowed Axes
ArrowLines | Arrow Lines
AtEndCaption | At end Caption
BalancedAxis | Balanced Axis
Boxed | Boxed style
BoxFrame | Boxed Frame style
CellsCreated | Cells creation at data points
CenteredCaption | Centered Caption
ClampToAxis | Clamp lines to Axis range
Clipped | Clip to Axis range
ClockFace | ClockFace scaling on Polar charts
Coarse | Coarse Altitude shading
CompassPlot | Compass Axis for Polar charts
Contours | Contours on mesh surfaces
CrispEdges | Crisp edges – cancel anti-aliasing
CroppedAxes | Cropped Axes
CrossingTicks | Crossing Ticks
Curves | Curves are used to join data points
DecileWhiskers | Decile whiskers on Box plot
Dissected | Dissected Arrows
DriftMarkers | Drift Markers for Directional Min-Max
DuplicateAxes | Duplicated Axes
DuplicateTicks | Duplicated Tickmarks
Duration | Duration Label formatting
Envelope | Envelope on MinMax plots
ErrorBars | Error bars are added to MinMax plots
ExactFit | Exact fit of Axis Range
ExplodeAxes | Exploded Axes
FarthestFirst | Farthest first on Pie charts
Filled | Filled Lines
Fine | Fine Altitude shading
FlatText | Flat Text for 3D labelling
FloatingBars | Floating Bars
ForceOrigin | Force modelfit through zero
ForceZero | Force zero to include axis origin
FrameAxes | Frame Axes
GridLines | Grid lines
GrowthCurve | Growth curve
HaloMarkers | Halo Markers
HollowCenter | Hollow center on Polar charts
Horizontal | Horizontal chart
Indexed | Indexed data
InlineWithData | Inline Keys
InsideLabels | Inside Labels
InsideTicks | Inside Ticks
InvertAxis | Inverted Y-scale
InvisibleAxis | Invisible Axis
KiteDiagram | Kite diagrams
Lines | Lines are drawn between data points
Logarithmic | Logarithmic plot
LogScale | Log-scaled Axis
Markers | Markers drawn
Merged | Merged row-labels
MiddleLabels | Middle Labels – between ticks
MinorTicks | Minor Tickmarks
ModelFit | Model fit
NoAxes | No Axes are drawn
NoAxis | No Axis is drawn
NoLines | No Lines are drawn
NoMarkers | No Markers are drawn
NormalCurve | Normal curve on Histograms
NoTags | No contour line Tags
NoTicks | No Tickmarks
NoWrap | No text wrapping
OmitLastLabel | Omit last X-label
OnTopModel | On Top Model
OriginMarker | Origin marker on Polar charts
OverlayGrid | Overlayed gridlines
Parity | Parity plot
Plain | Plain Pie chart or Tower
PlainAxis | Plain Axes (no ticks or labels)
ProjectContours | Project Contours on XY-plane
RadialScaling | Markers are scaled to radius
Relative | Relative data
Risers | Risers from axis or data
Rooted | Rooted vectors
RoseDiagram | Rose diagram
Rounded | Rounded corners
Rows | Row-wise Series
ScaleBar | Scale bar for Bubble and Altitude-shaded plots
SegmentLines | Segmented lines at missing values
Shadowed | Shadowed boxes are drawn
SkipRepeats | Skip repeated values
SkipRuns | Skip runs of repeated values
SpanData | Span data range for Fitting
SpannedLabels | Spanned Labels
StackedBars | Stacked Bars
StayAtEdge | Stay at edge (Labels)
SurfaceShading | Surface fill is drawn
Synchronised | Synchronised gridlines
Terminated | Terminated Min-Max
TicksBetween | Tickmarks between Bars
TiledSurface | Tiled Response surface
TopAxis | Top X-Axis
TrendLine | Trend lines
TrendSurface | Trend surface
ValueTags | Value Tags are drawn
WallShading | Walls are shaded on 3D charts
WedgeZones | Wedge zones
XYPlot | XY Plot


SharpPlot 3.71 User Manual: Above Gridlines (Y-Labels)

Above Gridlines (Y-Labels)

Y axis labels are baselined on the gridlines rather than midlined.

sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.AboveGrid;
sp.YTickStyle = YTickStyles.NoTicks;

This would generally be used with style InsideLabels to have the labels drawn within the chart area as well as baselined on the grid.


SharpPlot 3.71 User Manual: Altitude shading

Altitude shading

Applies graded colour to tiled response surfaces or contour plots.

sp.ResponsePlotStyle = ResponsePlotStyles.AltitudeShading;

This is best used with a computed (and therefore smooth) surface and can work well as a way to show experimental results where the outcome is a function of several variables.

Shading used with Contour plots

This example shows a fitted surface which is typical of height-map data. Temperature or pressure data would also be a good candidate for this style, using one of the accepted styles of false-color banding.

See also ...

Coarse Altitude shading | Fine Altitude shading | SharpPlot Members | SharpPlot.BubbleChartStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.ContourPlotStyle Property | SharpPlot.ResponsePlotStyle Property


SharpPlot 3.71 User Manual: Angled Labels

Angled Labels

For simple XY plots you can have the X-axis labels drawn at an angle to the axis, with the angle set as you choose. The default is 34 degrees which looks reasonable for most charts and text.

For 3D charts either X labels or Y labels may be angled. In this case the labels are always drawn midlined along the projection of the corresponding tickmark or gridline.

sp.SetXLabels(new string[]{"Fat","Cat","Sat on mat"});
sp.SetYLabels(new string[]{"Here","we","go","Again"});
sp.XAxisStyle = XAxisStyles.AngledLabels;
sp.YAxisStyle = YAxisStyles.AngledLabels;

You cannot set the angle explicitly here – SharpPlot will choose the alignment for you depending on the perspective and viewpoint used.

See also ...

SharpPlot.Perspective Property | SharpPlot.XLabelAngle Property | SharpPlot.SetViewpoint Method


SharpPlot 3.71 User Manual: Annotate Model fit

Annotate Model fit

Adds a note to each regression line giving the details of the model

sp.LineGraphStyle = LineGraphStyles.ModelFit|LineGraphStyles.AnnotateModel;

Intercept and slope are shown for a linear fit, coefficients for a higher-order curve.

Equation uses the NoteFont

See also ...

Growth curve | Model fit | SharpPlot Members | SharpPlot.EquationFormat Property | SharpPlot.EquationStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Arrowed Axes

Arrowed Axes

Ends either axis with an arrowhead.

sp.XAxisStyle = XAxisStyles.ArrowedAxis;
sp.YAxisStyle = YAxisStyles.ArrowedAxis|YAxisStyles.AtEndCaption;
sp.YCaption = "Up";
sp.DrawLineGraph(col_S4,col_S2);

This style works with all the standard 2D charts. You may need to allow a little extra space for the captions, as the arrows extend the axis line slightly.


SharpPlot 3.71 User Manual: Arrow Lines

Arrow Lines

Ends each line with an arrowhead.

sp.LineGraphStyle = LineGraphStyles.ArrowLines;

This style works well with a set of separated curves (e.g. pessimistic and optimistic forecasts) and also with in-line keys.

It also applies to Risers and MinMax charts.

See also ...

SharpPlot Members | SharpPlot.DialChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.NetworkMapStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.VectorStyle Property | SharpPlot.SetArrowStyle Method


SharpPlot 3.71 User Manual: At end Caption

At end Caption

By default, SharpPlot writes the X-caption below the axis (at the right-hand end) and the Y-axis and Z-axis captions beside the axis aligned to the topmost tickmark. This style may be used to put the caption at the end of the axis instead.

sp.LineGraphStyle = LineGraphStyles.GridLines;
sp.Heading = "Both Axes have Captions at End";
sp.XAxisStyle = XAxisStyles.AtEndCaption;
sp.YAxisStyle = YAxisStyles.AtEndCaption;
sp.YCaption = "Up\nhere";
sp.XCaption = "Over\nthere";
sp.DrawLineGraph(col_S4,col_S2);

This works best with short (or multi-line) captions. The Y-caption will be wrapped into a width equal to twice the left margin.


SharpPlot 3.71 User Manual: Balanced Axis

Balanced Axis

This style constrains the computed axis range to balance about the zero line (there will be an odd number of tickmarks arranged symmetrically about zero).

sp.LineGraphStyle = LineGraphStyles.GridLines;
sp.Heading = "Vertical Axis is Balanced";

sp.YAxisStyle = YAxisStyles.ArrowedAxis|YAxisStyles.BalancedAxis|YAxisStyles.CenteredCaption;
sp.YCaption = "Variance against estimate";

This style works well with Synchronised tickmarks on a secondary axis.

See also ...

SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property


SharpPlot 3.71 User Manual: Boxed style

Boxed style

Draws a box around the entire chart, notes and keys, with optional background fill.

sp.FrameStyle = FrameStyles.Boxed;
sp.KeyStyle = KeyStyles.Boxed;
sp.NoteStyle = NoteStyles.Boxed;

The box is edged and filled using the current Frame style or Key style.

See also ...

SharpPlot Members | SharpPlot.FrameStyle Property | SharpPlot.KeyStyle Property | SharpPlot.NoteStyle Property | SharpPlot.TableStyle Property


SharpPlot 3.71 User Manual: Boxed Frame style

Boxed Frame style

For keys with an explicit frame, the default behavior for a boxed key is to draw the box around the text. This style forces the box to draw around the given frame, regardless of where the text goes.

sp.KeyStyle = KeyStyles.BoxFrame;

This style may be useful in debugging, as a way to check exactly where the frame is positioned.

See also ...

SharpPlot.SetKeyFrame Method


SharpPlot 3.71 User Manual: Cells creation at data points

Cells creation at data points

Creates a collection of rectangles (using the current cellsize) centred around each plotted point. These can then be used by sp.NewCell which will use each cell in turn as the chart frame.

sp.LineGraphStyle = LineGraphStyles.CellsCreated;

This allows you to make a scatter-plot of miniature charts, for example using geographical co-ordinates to show details of samples taken at various locations.

See also ...

SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.NetworkMapStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Centered Caption

Centered Caption

Places the axis caption opposite the middle of either axis.

sp.XAxisStyle = XAxisStyles.CenteredCaption;
sp.YAxisStyle = YAxisStyles.CenteredCaption;

sp.YCaption = "Vertical caption is here";
sp.XCaption = "Horizontal caption is here";

Clearly, this style does not make sense if you set up 2 captions (tab-separated) for the axis.


SharpPlot 3.71 User Manual: Clamp lines to Axis range

Clamp lines to Axis range

This style may be used in conjunction with ‘clipped’ to remove points outside the span of the axes, and to force any out-of-range lines to follow the edge of the chart.

sp.YAxisStyle = YAxisStyles.ClampToAxis;

It may also be used independently on the x and y-axes if required. If SurfaceShading is selected, then this style is automatically applied if you choose Clipped as the surface cannot be completed otherwise.

See also ...

SharpPlot Members | SharpPlot.YAxisStyle Property


SharpPlot 3.71 User Manual: Clip to Axis range

Clip to Axis range

This style may be used on the Linegraph or ScatterPlot to remove points outside the span of the axes, and clip any lines at the edge of the chart. Datum lines are also left undrawn if they fall beyond the axes.

sp.YAxisStyle = YAxisStyles.Clipped;

The style may also be used independently on the x and y-axes if required.

Note that if a marker survives clipping (for example it falls right on the boundary) it will normally be drawn completely, along with its value tags, even though these may fall partly outside the axis range. The only exception to this rule is for FrameAxes when clipping is strictly to the frame boundary.

See also ...

SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property


SharpPlot 3.71 User Manual: ClockFace scaling on Polar charts

ClockFace scaling on Polar charts

This style will force the polar chart to treat all x-values as times from 0:00 to 23:11. This applies to data and to tickmark settings, so that the example can be drawn with an XTick setting of (4,3) here.

sp.PolarChartStyle = PolarChartStyles.ClockFace;

Values above 24 are accepted, and simply wrap around.

See also ...

SharpPlot Members | SharpPlot.PolarChartStyle Property


SharpPlot 3.71 User Manual: Coarse Altitude shading

Coarse Altitude shading

No interpolation is done on the altitude colors, so a simple blocky chart is produced. This is much faster to render, and can be used to explore different model fits quickly.

sp.ContourPlotStyle = ContourPlotStyles.Coarse;

The density setting is used to determine the accuracy of the grid-fit as normal.


SharpPlot 3.71 User Manual: Compass Axis for Polar charts

Compass Axis for Polar charts

This style will force the polar chart to treat all x-values as degrees. This applies to data and to tickmark settings, so that the example can be drawn with an XTick setting of (45,0) here.

sp.PolarChartStyle = PolarChartStyles.CompassPlot;

Values above 360 are accepted, and simply wrap around.

See also ...

SharpPlot Members | SharpPlot.PolarChartStyle Property


SharpPlot 3.71 User Manual: Contours on mesh surfaces

Contours on mesh surfaces

Draws contour lines at each major tickmark on the Z-axis.

sp.ScatterPlotStyle = ScatterPlotStyles.Contours;

Works with the modelfit and trend styles on the Cloud charts. The contour lines will appear smoother if a highr mesh density is used (the default is to compute the fitted surface at each X and Y major tickmark).

In a ScatterPlot and BubbleChart, SetWeightings can be used to weight the height of the data points (in a BubbleChart it is the Z data by default).

See also ...

SharpPlot Members | SharpPlot.BubbleChartStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Crisp edges - cancel anti-aliasing

Crisp edges – cancel anti-aliasing

Turns off anti-aliasing on data lines.

sp.LineGraphStyle = LineGraphStyles.CrispEdges;

May be beneficial on linegraphs with mostly horizontal or vertical segments or very light lineweights.

See also ...

SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.TraceChartStyle Property


SharpPlot 3.71 User Manual: Cropped Axes

Cropped Axes

When you clip data to either the X or Y axes, SharpPlot removes data points that lie outside the range and segments any lines at the boundaries. However it does not physically crop the image, as you generally want to see all of a marker that lies right on the edge.

By setting this style, you enforce cropping at the edges, so thick angled lines are trimmed to an oblique end and markers are only partly shown. Value tags may also be partly eliminated.

sp.LineGraphStyle |= LineGraphStyles.CroppedAxes;
sp.SetXRange(10);
sp.SetYRange(100);

sp.XAxisStyle = XAxisStyles.Clipped;
sp.YAxisStyle = YAxisStyles.Clipped;

Note that the cropping is done by the graphics engine used to output the final chart. All engines except VML support cropping very well, so this style will not work as you expect in charts output to VML.

The Framed Axes style always crops, as it assumes that nothing should show outside the frame.


SharpPlot 3.71 User Manual: Crossing Ticks

Crossing Ticks

All axes are drawn with crossing tickmarks.

sp.XTickStyle = XTickStyles.CrossingTicks;
sp.YTickStyle = YTickStyles.CrossingTicks;

This style applies to the tickmarks on individual axes, not the chart as a whole.

See also ...

SharpPlot Members | SharpPlot.ITickStyle Property | SharpPlot.XTickStyle Property | SharpPlot.YTickStyle Property


SharpPlot 3.71 User Manual: Curves are used to join data points

Curves are used to join data points

Joins points using smooth curves, rather than straight lines.

sp.LineGraphStyle = LineGraphStyles.Curves;

Points are joined with computed (cubic) Bezier curves, where the smoothness is determined by the ‘flexibility’ parameter which may vary between zero (which joins the points with straight lines) to approx 12. The default value of 3 will normally give reasonable results. High values may start to draw loops and other artifacts on very noisy data series.

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Decile whiskers on Box plot

Decile whiskers on Box plot

BoxWhisker indicates deciles with dotted lines.

sp.BoxPlotStyle = BoxPlotStyles.DecileWhiskers;

This may give a clearer picture of where the ‘core’ of the distribution lies.

See also ...

SharpPlot Members | SharpPlot.BoxPlotStyle Property


SharpPlot 3.71 User Manual: Dissected Arrows

Dissected Arrows

Arrows are drawn starting and ending a little way from the nodes

sp.VectorStyle = VectorStyles.Dissected;

This is a good style for a directed graph if the nodes have already been drawn as a scatter plot.

See also ...

SharpPlot Members | SharpPlot.NetworkMapStyle Property | SharpPlot.VectorStyle Property


SharpPlot 3.71 User Manual: Drift Markers for Directional Min-Max

Drift Markers for Directional Min-Max

The ‘Drift’ style applies only to the Min-Max chart and restricts any line terminators to the 2nd set of values. This is not necessarily the ‘high’ end of the line, so you can use this option to show movement either upwards or downwards.

sp.MinMaxChartStyle = MinMaxChartStyles.DriftMarkers;

This style applies when the chart has either Terminated, ArrowLines or ErrorBars at the line ends.

See also ...

SharpPlot Members | SharpPlot.MinMaxChartStyle Property


SharpPlot 3.71 User Manual: Duplicated Axes

Duplicated Axes

This style may be used for either the X or Y axes to repeat the axis on the far edge of the chart area. Labels and tickmarks will be redrawn as for the primary axis.

sp.XAxisStyle = XAxisStyles.DuplicateAxes;
sp.YAxisStyle = YAxisStyles.DuplicateAxes;
sp.DrawLineGraph(col_S4);

The style applies to all the rectangular 2D charts.

See also ...

Duplicated Tickmarks


SharpPlot 3.71 User Manual: Duplicated Tickmarks

Duplicated Tickmarks

This style may be used for either the X or Y axes to repeat the tickmarks on the far edge of the chart area. Its main use is for charts with the FrameAxes style where it may be useful to have the ticks continued around all four sides.

sp.LineGraphStyle = LineGraphStyles.FrameAxes|LineGraphStyles.GridLines;
sp.XTickStyle = XTickStyles.DuplicateTicks;
sp.YTickStyle = YTickStyles.DuplicateTicks;
sp.DrawLineGraph(col_S4);

The style applies to all the rectangular 2D charts.

See also ...

Duplicated Axes


SharpPlot 3.71 User Manual: Duration Label formatting

Duration Label formatting

This style may be used on either the X or Y axis to format elapsed times in seconds.

sp.YAxisStyle = YAxisStyles.Duration;

XTimeFormat or YTimeFormat may be used to format the durations, with the special character ‘D’ standing for number of days (‘d’ is useless for durations because it is the day of the month).

Tickmarks, datumlines etc are given in the units of the data here, that is seconds.

See also ...

Using Date and Time axes | SharpPlot.XAxisStyle Property | SharpPlot.XTimeFormat Property | SharpPlot.YAxisStyle Property | SharpPlot.YTimeFormat Property


SharpPlot 3.71 User Manual: Envelope on MinMax plots

Envelope on MinMax plots

Shade region within Hi-Lo bounds on MinMax chart.

sp.MinMaxChartStyle = MinMaxChartStyles.Envelope;

This can be used as a backdrop to a timeseries to show ‘historic’ range.

See also ...

SharpPlot Members | SharpPlot.MinMaxChartStyle Property


SharpPlot 3.71 User Manual: Error bars are added to MinMax plots

Error bars are added to MinMax plots

Adds ‘T-pieces’ to each end of Min-max charts to make traditional-style error-bars – you can restrict the bars to the ‘far’ end of each bar with the ‘drift’ style.

sp.MinMaxChartStyle = MinMaxChartStyles.ErrorBars;
sp.BoxPlotStyle = BoxPlotStyles.ErrorBars;

The bars scale in proportion to the current pen width weight.

The effect is similar when the style is used with the Box-and-Whisker chart.

See also ...

SharpPlot Members | SharpPlot.BoxPlotStyle Property | SharpPlot.MinMaxChartStyle Property


SharpPlot 3.71 User Manual: Exact fit of Axis Range

Exact fit of Axis Range

By default SharpPlot rounds the scale to a major tickmark interval in both directions. If these ticks are well spaced out (for example annual data with 11 minor ticks at the month boundaries) it is often better just to span the range of the data.

sp.SetXTickMarks(20,3);
sp.Heading = "X-Axis Fits the Data Range Exactly";
sp.XAxisStyle = XAxisStyles.ForceZero|XAxisStyles.ExactFit;
sp.DrawLineGraph(col_S1,col_S2);

This style is often coupled with ForceZero to make the lower value round back nicely.

See also ...

SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property


SharpPlot 3.71 User Manual: Exploded Axes

Exploded Axes

This style moves the axes back from the plotting area by one major tick-mark length. It is commonly used on scatterplots where many points fall close to the axis.

sp.LineGraphStyle = LineGraphStyles.ExplodeAxes;

The style applies to all the rectangular 2D charts, and may be used on Multiples to separate the axes on the individual charts within the trellis.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.GanttChartStyle Property | SharpPlot.HistogramStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.TraceChartStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: Farthest first on Pie charts

Farthest first on Pie charts

Drawing order allows 3D extrusion.

sp.PieChartStyle = PieChartStyles.FarthestFirst;

Useful only for charts rendered as VML.

See also ...

SharpPlot Members | PieChartStyles Enumeration


SharpPlot 3.71 User Manual: Filled Lines

Filled Lines

Completes each line back to its starting point and fills the area in between.

sp.LineGraphStyle = LineGraphStyles.Filled;

You may need to construct the lines quite carefully to get the required effect.

See also ...

SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.VennDiagramStyle Property


SharpPlot 3.71 User Manual: Fine Altitude shading

Fine Altitude shading

Very detailed is done on the altitude colors, giving an illusion of smoothly graded color. This may be very slow to render in vector formats such as SVG.

sp.ContourPlotStyle = ContourPlotStyles.Fine;
sp.CloudChartStyle = CloudChartStyles.Fine;

The density setting is used to determine the accuracy of the grid-fit as normal, then each tile is divided assuming that the surface is locally linear.


SharpPlot 3.71 User Manual: Flat Text for 3D labelling

Flat Text for 3D labelling

Forces all labels and captions on 3D charts to be drawn horizontally.

sp.CloudChartStyle = CloudChartStyles.FlatText;
sp.CaptionStyle = CaptionStyles.FlatText;
sp.LabelStyle = LabelStyles.FlatText;
sp.CloudChartStyle = CloudChartStyles.FlatText;

This is recommended for VML charts which handle rotated text very badly. It may be applied individually to labels or captions.

See also ...

SharpPlot Members | SharpPlot.CaptionStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.LabelStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.XAxisStyle Property


SharpPlot 3.71 User Manual: Floating Bars

Floating Bars

Stacked barcharts are drawn omitting the first bar to give a floating effect.

sp.BarChartStyle = BarChartStyles.FloatingBars;

For horizontal floating charts it may be easier to use the Gantt chart here.

See also ...

Stacked Bars | SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: Force modelfit through zero

Force modelfit through zero

The fitted model is forced to have zero intercept on both axes.

sp.SetOrderOfFit(2,2);
sp.EquationStyle = EquationStyles.Middle|EquationStyles.Below|EquationStyles.ForceOrigin;
sp.EquationFormat = "y = C0 + C1x + C2x²";

If the order of fit is 1, this corresponds to the LNT (Linear No Threshold) model which is used by default when there is insufficient information to support a more realistic scenario.

Note that the zeroth term in the equation formatter is eliminated for you..

See also ...

Model fit | SharpPlot.EquationFormat Property | SharpPlot.SetOrderOfFit Method


SharpPlot 3.71 User Manual: Force zero to include axis origin

Force zero to include axis origin

All axes are forced to include the origin (for scatterplots and cloud charts).

sp.ScatterPlotStyle = ScatterPlotStyles.ForceZero;
sp.XAxisStyle = XAxisStyles.ForceZero;

This style also can be applied individually to each axis.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.IAxisStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.XAxisStyle Property | SharpPlot.XBarChartStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property


SharpPlot 3.71 User Manual: Frame Axes

Frame Axes

The axes are completed to form a frame around the chart. This style is supported by all the conventional 2D charts.

sp.LineGraphStyle = LineGraphStyles.FrameAxes;

This also prevents the axes from extending beyond the final tickmarks. This style is often combined with inward-pointing tickmarks. All chart elements (lines, markers etc) are clipped at the frame boundary regardless of whether Clipping is explicitly requested on any axes.

Note that the cropping is done by the graphics engine used to output the final chart. All engines except VML support cropping very well, so this style will not work as you expect in charts output to VML if any data points are outside the frame.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.GanttChartStyle Property | SharpPlot.HistogramStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.TraceChartStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: Grid lines

Grid lines

Gridlines are drawn from major tickmarks on all axes. This style is supported by all the conventional charts.

sp.LineGraphStyle = LineGraphStyles.GridLines;
sp.XAxisStyle = XAxisStyles.GridLines;

This style can also be set individually by axis.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.GanttChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.TableStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.TraceChartStyle Property | SharpPlot.XAxisStyle Property | SharpPlot.XBarChartStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property


SharpPlot 3.71 User Manual: Growth curve

Growth curve

An exponential growth curve is fitted through the data (scatterplots and linegraphs).

sp.LineGraphStyle = LineGraphStyles.GrowthCurve;

The line may be annotated with the computed growth rate.

See also ...

Annotate Model fit | Model fit | SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Halo Markers

Halo Markers

Markers have a halo drawn beneath them in the chart background colour.

sp.LineGraphStyle = LineGraphStyles.HaloMarkers;

This generally improves visibility, but can result in obscured markers in a very crowded scatterplot.

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.NetworkMapStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Hollow center on Polar charts

Hollow center on Polar charts

Polar gridlines radiate from the first tick.

sp.PolarChartStyle = PolarChartStyles.HollowCenter;

For charts with a very ‘busy’ radial grid, this reduces the dartboard effect.

See also ...

SharpPlot Members | SharpPlot.PolarChartStyle Property


SharpPlot 3.71 User Manual: Horizontal chart

Horizontal chart

BarCharts, BoxPlots, StepCharts, MinMaxCharts and Networmaps may be drawn horizontally.

sp.BarChartStyle = BarChartStyles.Horizontal;

This does NOT change the meaning of the X and Y axes, so to label the bars, you must use Y-labels here. The same applies to other chart types which support this style, for example a population pyramid may be contructed with a horizontal stepchart:

sp.StepChartStyle = StepChartStyles.Horizontal|StepChartStyles.ValueTags|StepChartStyles.SurfaceShading;
sp.ValueTagFormat = "##9.9%";
sp.YAxisStyle = YAxisStyles.MiddleLabels;

Value tags are always drawn horizontally with this chart style.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.NetworkMapStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: Indexed data

Indexed data

Data is indexed to the initial value = 100.

sp.LineGraphStyle = LineGraphStyles.Indexed;

The charted data is 100 times the ratio to the first series value.

This is often used to compare series such as currencies or share prices.

Setting YAxisStyle set to YAxisStyles.LogScale is probably appropriate when using this.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: Inline Keys

Inline Keys

The legend text is written at the right-hand end of each series.

sp.KeyStyle = KeyStyles.InlineWithData;

This style works well with arrowed lines. Note that you will need to allow sufficient space in the right margin for the legend text, and that this style should only be used if you are sure that the series are well separated vertically.

See also ...

Arrow Lines


SharpPlot 3.71 User Manual: Inside Labels

Inside Labels

Either X or Y axis labels may be written inside the chart area

sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.RightAxis|YAxisStyles.InsideLabels|YAxisStyles.AboveGrid;
sp.YTickStyle = YTickStyles.NoTicks;

This style would normally be combined with AboveGrid in the Y-Axis case or with MiddleLabels in the X-Axis case to avoid the labels colliding with gridlines.


SharpPlot 3.71 User Manual: Inside Ticks

Inside Ticks

Axis is drawn with positive (inward-pointing) ticks. This is typically used with duplicate X or Y axes or a framed chart.

sp.XTickStyle = XTickStyles.InsideTicks;

This style is always applied to the tickmarks on individual axes, rather than the chart as a whole.

See also ...

SharpPlot Members | SharpPlot.ITickStyle Property | SharpPlot.XTickStyle Property | SharpPlot.YTickStyle Property


SharpPlot 3.71 User Manual: Inverted Y-scale

Inverted Y-scale

The Y-scale is drawn down from the top.

sp.Heading = "Top X-Axis with Inverted Y-Axis";
sp.XAxisStyle = XAxisStyles.ArrowedAxis|XAxisStyles.AtEndCaption|XAxisStyles.TopAxis;
sp.YAxisStyle = YAxisStyles.ArrowedAxis|YAxisStyles.InvertAxis|YAxisStyles.AtEndCaption;
sp.YCaption = "Depth (m)";
sp.XCaption = "Distance from Shore (m)";

This style would always be used with XAxisStyle set to TopAxis – typically to plot depth below ground or sample age. Pollen diagrams are typical.


SharpPlot 3.71 User Manual: Invisible Axis

Invisible Axis

Axis is made invisible, but tickmarks, gridlines and labels are still drawn as usual.

sp.XAxisStyle = XAxisStyles.InvisibleAxis;

This style should be applied to individual axes rather than the entire chart. For Polar charts it only applies to the Y (radial) axis.

See also ...

Plain Axes (no ticks or labels) | SharpPlot Members | SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: Kite diagrams

Kite diagrams

Trace charts are mirrored and filled to make a ‘kite’ chart presentation.

sp.TraceChartStyle = TraceChartStyles.KiteDiagram;

This is commonly used to plot vegetation coverage or the results of pollen analysis.

See also ...

SharpPlot Members | SharpPlot.TraceChartStyle Property


SharpPlot 3.71 User Manual: Lines are drawn between data points

Lines are drawn between data points

Lines are drawn between data-points on linegraphs and scatterplots. This is the default for linegraphs, so style ‘NoLines’ must be used to remove them.

sp.ScatterPlotStyle = ScatterPlotStyles.Lines;

Points are connected by straight lines unless the Curves style is used. Use the TrendLine style to draw an approximate smooth curve through the data without visiting all the points.

See also ...

Curves are used to join data points | No Lines are drawn | Trend lines | SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.DialChartStyle Property | SharpPlot.GanttChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.TableStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.TraceChartStyle Property | SharpPlot.VennDiagramStyle Property | SharpPlot.XAxisStyle Property | SharpPlot.XBarChartStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property | SharpPlot.SetXDatumLines Method | SharpPlot.SetYDatumLines Method


SharpPlot 3.71 User Manual: Logarithmic plot

Logarithmic plot

This style is a quick way to get engineering graph paper.

sp.ScatterPlotStyle = ScatterPlotStyles.Logarithmic|ScatterPlotStyles.GridLines|ScatterPlotStyles.ModelFit|ScatterPlotStyles.AnnotateModel;
sp.EquationStyle = EquationStyles.Middle;
sp.EquationFormat = "Exponent = C1";

This example shows how the daily movements of stock prices typically follow a power-law, rather than being distributed in a well-behaved ‘bell curve’ distribution.

See also ...

SharpPlot.BubbleChartStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Log-scaled Axis

Log-scaled Axis

The base-10 log of the data is plotted and tickmarks are adjusted appropriately.

sp.LineGraphStyle = LineGraphStyles.GridLines;
sp.Heading = "Y-Axis uses a Logarithmic Scale";
sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.LogScale;
sp.XAxisStyle = XAxisStyles.ForceZero;
sp.DrawLineGraph(col_S1,col_S2);

If ForceZero is used on a logarithmic axis, the scale is actually forced to 1 as zero is meaningless here.

See also ...

SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property


SharpPlot 3.71 User Manual: Markers drawn

Markers drawn

Markers are drawn at datapoints on linegraphs. This is the default for ScatterPlots and CloudCharts – use style NoMarkers to cancel it.

sp.LineGraphStyle = LineGraphStyles.Markers;

You can use the BubbleChart to scale individual markers to add an extra ‘dimension’ to the data.

See also ...

Halo Markers | No Markers are drawn | SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.SetMarkers Method


SharpPlot 3.71 User Manual: Merged row-labels

Merged row-labels

Similar row-labels are merged.

sp.TableStyle = TableStyles.Merged;

This currently applies only to the Y-labels (row-stubs) on tables.

See also ...

Spanned Labels | SharpPlot Members | SharpPlot.TableStyle Property


SharpPlot 3.71 User Manual: Middle Labels - between ticks

Middle Labels – between ticks

X or Y-axis labels are place between major tickmarks..

sp.XAxisStyle = XAxisStyles.MiddleLabels;
sp.BarChartStyle = BarChartStyles.TicksBetween;

This would generally be used with the TicksBetween style on barcharts.

See also ...

Tickmarks between Bars | SharpPlot Members | SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property


SharpPlot 3.71 User Manual: Minor Tickmarks

Minor Tickmarks

This style may be used for either the X or Y axes to insert minor ticks automatically.

sp.SetYTickMarks(50);
sp.XTickStyle = XTickStyles.MinorTicks;
sp.YTickStyle = YTickStyles.MinorTicks;
sp.DrawLineGraph(col_S4);

The style applies to all the rectangular 2D charts. For more exact control, set the second element of X/Y Tickmarks to the required number of minor ticks between each major.

See also ...

SharpPlot.SetXTickMarks Method | SharpPlot.SetYTickMarks Method


SharpPlot 3.71 User Manual: Model fit

Model fit

A simple regression model is fitted to the data.

sp.LineGraphStyle = LineGraphStyles.ModelFit;

The default is a linear ‘straight-line’ fit but you can use the Order of Fit setting to fit models up to quartics. The line may be annotated with the regression coefficients. The ‘zeroth’ coefficient is the intercept value, and there will be as many further coefficients as the order of fit.

The model line consumes one line colour, style, width, and key in the cycles, in the order (data, trend, model).

Fitting 3D data

If the modelfit style is used with the cloud chart, the fit is made against both X and Y axes, and the order of fit may be set independently for either.

Here, the model is quadratic in both X and Y. Contour lines are shown, and risers have been used to show the residual values in the Z-direction.

See also ...

Annotate Model fit | Growth curve | SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.GetCoefficients Method | SharpPlot.GetFittedValues Method | SharpPlot.GetResiduals Method | SharpPlot.SetModelSpan Method


SharpPlot 3.71 User Manual: No Axes are drawn

No Axes are drawn

No axes are drawn. This is often appropriate on 3D plots, or if the chart is simply illustrating the shape of some function.

sp.LineGraphStyle = LineGraphStyles.NoAxes;

This style may be applied to individual axes if required.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.GanttChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.TraceChartStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: No Axis is drawn

No Axis is drawn

The appropriate axis is not drawn. This may be used with either X or Y axes, or may be applied to the chart as a whole.

sp.YAxisStyle = YAxisStyles.NoAxis;
sp.XTickStyle = XTickStyles.NoTicks;
sp.Heading = "Y-Axis is not Required Here";
sp.SetValueFont("Arial",14,FontStyle.Bold,Color.Green);
sp.SetLabelFont("Arial",10,FontStyle.Bold,Color.Navy);
sp.DrawBarChart(new int[] {10,26,31,42});

This style is generally used where the value tags provide sufficient information on the data.


SharpPlot 3.71 User Manual: No Lines are drawn

No Lines are drawn

No lines are drawn (this turns off the default behavior) on LineGraphs, MinMax and NetworkMap charts.

sp.LineGraphStyle = LineGraphStyles.NoLines;

This would generally be used with one of the complementary styles such as Risers or Markers. It could also be used if you only wanted to display the trendline or modelfit.

See also ...

Lines are drawn between data points | SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.NetworkMapStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property


SharpPlot 3.71 User Manual: No Markers are drawn

No Markers are drawn

No markers are drawn (turns off the default behavior) on ScatterPlots, CloudCharts and NetworkMaps.

sp.ScatterPlotStyle = ScatterPlotStyles.NoMarkers;

This would generally be used with one of the complementary styles such as Risers. It could also be used if you only wanted to display the trendline or modelfit.

See also ...

Markers drawn | SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.NetworkMapStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Normal curve on Histograms

Normal curve on Histograms

Histogram shows a fitted Normal Distribution.

sp.HistogramStyle = HistogramStyles.NormalCurve;

This can be used to check for a distribution which is statistically tractable.

See also ...

SharpPlot Members | SharpPlot.HistogramStyle Property


SharpPlot 3.71 User Manual: No contour line Tags

No contour line Tags

Contour lines are drawn without tags giving the altitude value of each line

sp.ContourPlotStyle = ContourPlotStyles.NoTags;

This style may be appropriate for Altitude-shaded charts.


SharpPlot 3.71 User Manual: No Tickmarks

No Tickmarks

No tickmarks are drawn, but labels and gridlines appear as normal at the major tick interval.

sp.XTickStyle = XTickStyles.NoTicks;
sp.YTickStyle = YTickStyles.NoTicks;

This style may be applied to individual axes if required.

See also ...

SharpPlot Members | SharpPlot.ITickStyle Property | SharpPlot.XTickStyle Property | SharpPlot.YTickStyle Property | SharpPlot.ZTickStyle Property


SharpPlot 3.71 User Manual: No text wrapping

No text wrapping

Applies to most text items – wrapping to the ‘natural’ margins is turned off.

// Turn off wrapping on heading and legend
 sp.Heading = "This text would normally be wrapped at the paper edge";
 sp.Subheading = "This text would normally be wrapped at the chart margins";
 sp.HeadingStyle = HeadingStyles.NoWrap;

 sp.SetKeyText(new string[] {"Data points are here","Fitted trend is here too"});
 sp.KeyStyle = KeyStyles.Vertical|KeyStyles.NoWrap;

Depending on the output medium chosen, this may result in text being clipped at either edge of the chart.


SharpPlot 3.71 User Manual: Omit last X-label

Omit last X-label

The rightmost X-axis label is not drawn

sp.XAxisStyle = XAxisStyles.OmitLastLabel;

This can be used to avoid text collisions which SharpPlot is not aware of.


SharpPlot 3.71 User Manual: On Top Model

On Top Model

Fitted models and trendlines are drawn after the data is plotted, and so appear on top.

sp.LineGraphStyle = LineGraphStyles.OnTopModel;

The default is to drawn the fitted curve first so that it does not hide the datapoints. This style would be used if the model was more important than the data it had been derived from.

See also ...

Model fit | Trend lines | SharpPlot Members | SharpPlot.LineGraphStyle Property


SharpPlot 3.71 User Manual: Origin marker on Polar charts

Origin marker on Polar charts

Marks the centre of polar charts with a dot.

sp.PolarChartStyle = PolarChartStyles.OriginMarker;

Useful when the chart has a filled surface which can make it hard to read the values.

See also ...

SharpPlot Members | SharpPlot.PolarChartStyle Property


SharpPlot 3.71 User Manual: Overlayed gridlines

Overlayed gridlines

Draws the gridlines ontop of the data. May be set as ‘style’, ‘xstyle’ or ‘ystyle’ to control the axis grids independently.

sp.BarChartStyle = BarChartStyles.OverlayGrid;
sp.YAxisStyle = YAxisStyles.OverlayGrid;

The example shows a typical barchart from Tufte’s book, using white gridlines to achieve the ‘dissected’ effect he recommends.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.GanttChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.XAxisStyle Property | SharpPlot.XBarChartStyle Property | SharpPlot.YAxisStyle Property


SharpPlot 3.71 User Manual: Parity plot

Parity plot

Forces a ScatterPlot to be drawn with identical x and y axes, and adds a leading diagonal axis with optional tolerance guidelines.

sp.SetMarkers(Marker.Bullet);
sp.ScatterPlotStyle = ScatterPlotStyles.Parity;
sp.Heading = "Parity Plot of Data vs Fit";
sp.ParityTolerance = 10;
sp.ParityStyle = ParityStyles.Absolute;

This chart is generally used to compare a theoretical behaviour with actual data, and to look out for values which exceed some preset tolerance. The limits may be drawn at fixed values (as here) or as percentage or ratio values.

SetAxesScales may be used with a value of 1 in conjunction of Parity to force normal axes, but then the axes may not have identical ranges.

See also ...

Balanced Axis | SharpPlot Members | SharpPlot.ParityStyle Property | SharpPlot.ParityTolerance Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.SetParityLimitStyle Method | SharpPlot.SetParityLineStyle Method | SharpPlot.SetParityZoneStyle Method


SharpPlot 3.71 User Manual: Plain Pie chart or Tower

Plain Pie chart or Tower

Pie labels are drawn without spider tags, and tower charts have all three axes drawn with the PlainAxis style.

sp.PieChartStyle = PieChartStyles.ValueTags|PieChartStyles.Plain;
sp.SetXLabels(new string[] {"Fred","Joe","Harry"});
sp.ValueTagStyle = ValueTagStyles.Inside;
sp.SetValueFont("Arial",16,FontStyle.Bold,Color.Yellow);
sp.SetLabelFont("Arial",18,Color.Black);

sp.DrawPieChart(new int[] {7,5,3});


SharpPlot 3.71 User Manual: Plain Axes (no ticks or labels)

Plain Axes (no ticks or labels)

Axes are drawn without tickmarks or labels. Gridlines will be drawn if this style is set. It is often used with X/Y styles ‘Arrowed’ when illustrating a simple curve.

sp.XAxisStyle = XAxisStyles.PlainAxis;

This style may be applied to individual axes if required.

See also ...

Invisible Axis | SharpPlot Members | SharpPlot.KeyStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: Project Contours on XY-plane

Project Contours on XY-plane

Contour lines on fitted surfaces are drawn on the xy-plane, rather than around the ‘hills’.

sp.CloudChartStyle = CloudChartStyles.ProjectContours;

You can also use contour lines on the standard 2D scatter plot to get a more detailed surface map.

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property


SharpPlot 3.71 User Manual: Markers are scaled to radius

Markers are scaled to radius

Bubblecharts normally scale so that the marker area is proportional to the data values. This style sets the marker radius in proportion to the data.

sp.BubbleChartStyle = BubbleChartStyles.RadialScaling;

This style would be correct for unfilled markers such as Lozenge or Ring.

See also ...

SharpPlot.DrawBubbleChart Method


SharpPlot 3.71 User Manual: Relative data

Relative data

Data is assumed to be relative, so the series values are accumulated as each series is plotted.

sp.DataStyle = DataStyles.Relative;

This is the default style for stacked or floating barcharts but must be set explicitly for shaded surfaces on LineGraphs. It may be used in any other chart to have the series summed.

See also ...

SharpPlot Members | DataStyles Enumeration


SharpPlot 3.71 User Manual: Risers from axis or data

Risers from axis or data

Risers are drawn from the X-axis (or XY-plane in 3D charts) to each datapoint. If a Baseline is defined, this is used as the target for the risers, rather than the axis.

sp.LineGraphStyle = LineGraphStyles.Risers;

For polar charts the risers are drawn as radial lines from the centre.

Using risers to show residuals

When a modelfit or trend surface has been used in a Scatter plot or Cloud chart (3D scatter) the risers are drawn from the regression line or fitted surface to each datapoint, rather than from the X-axis or XY-plane.

This provides a quick visual check of the residuals, and may help to locate the datapoints relative to the fitted surface in the projection of the 3D chart.

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.HistogramStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.StepChartStyle Property


SharpPlot 3.71 User Manual: Rooted vectors

Rooted vectors

The start point of each vector is marked with the current marker.

sp.VectorStyle = VectorStyles.Rooted;

This could be used (along with Terminated) to draw all the nodes on a directed graph.

See also ...

SharpPlot.VectorStyle Property


SharpPlot 3.71 User Manual: Rose diagram

Rose diagram

The Rose diagram is often used to show discrete data collected around a compass – for example orientation of pebbles in a streambed to give a feel for the direction of current flow.

sp.PieChartStyle = PieChartStyles.RoseDiagram;

It may be necessary to scale the data to fit the diagram nicely on the page.

See also ...

SharpPlot Members | PieChartStyles Enumeration


SharpPlot 3.71 User Manual: Rounded corners

Rounded corners

You can round off the corners of the chart frame, the key box and any boxed notes.

sp.KeyStyle = KeyStyles.Boxed|KeyStyles.Rounded;
sp.NoteStyle = NoteStyles.Boxed|NoteStyles.Rounded;

You may need to increase the chart margins if you use a rounded frame.

See also ...

SharpPlot Members | SharpPlot.FrameStyle Property | SharpPlot.KeyStyle Property | SharpPlot.NoteStyle Property | SharpPlot.TableStyle Property


SharpPlot 3.71 User Manual: Row-wise Series

Row-wise Series

Generally, a nested structure such as double[][] is taken to imply one series per element of the outer structure. If your data is more naturally organised the other way around, you can pass the same structure, but have the inner elements taken as the series values, effectively transposing the data matrix.

sp.DataStyle = DataStyles.Rows;

This is particularly useful when a simple vector of values represents one element from a set of different series. Because SharpPlot applies the color cycles to each series, this gives you a simple way to color the bars of a barchart individually, or have a different marker for each data value. Legend placeholders will be also created, one per item.

See also ...

SharpPlot Members | DataStyles Enumeration


SharpPlot 3.71 User Manual: Scale bar for Bubble and Altitude-shaded plots

Scale bar for Bubble and Altitude-shaded plots

Contour plots and 3D fitted surfaces may be Altitude shaded with a smooth gradient between given colors. This style adds a calibration bar in the right margin to allow you to read the data value from the color.

sp.ContourPlotStyle = ContourPlotStyles.ScaleBar;
sp.CloudChartStyle = CloudChartStyles.ScaleBar;

The labels on the bar are written with the current Key font setting, and the Z-axis caption is used to write the caption above it. Lines are drawn across the bar at the z-tickmark intervals, and the lines are drawn with the current contour style.

The style works for Cloud Chart, Contour Plot, Response Surface and Bubble Chart with AltitudeShading.

The style also works for Bubble Charts with no altitude shading, in which case the scale bar show bubble sizes.

See also ...

Altitude shading | SharpPlot Members | SharpPlot.BubbleChartStyle Property | SharpPlot.CloudChartStyle Property | SharpPlot.ContourPlotStyle Property | SharpPlot.ResponsePlotStyle Property


SharpPlot 3.71 User Manual: Segmented lines at missing values

Segmented lines at missing values

Normally, lines are continued across missing values, joining the points on each side. This style forces the line to break either side of missing data. Applies to LineGraphs and StepCharts when these are not surface shaded.

sp.LineGraphStyle = LineGraphStyles.SegmentLines;

Note that no line will be drawn unless there are at least 2 points between any run of missing values.

See also ...

SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.StepChartStyle Property


SharpPlot 3.71 User Manual: Shadowed boxes are drawn

Shadowed boxes are drawn

Adds a drop shadow to the box around the chart frame, notes, and keys.

sp.NoteStyle = NoteStyles.Shadowed;

The shadow offset will be increased in proportion to the line-weight of the box.

See also ...

SharpPlot Members | SharpPlot.FrameStyle Property | SharpPlot.KeyStyle Property | SharpPlot.NoteStyle Property | SharpPlot.TableStyle Property | SvgMode Enumeration


SharpPlot 3.71 User Manual: Skip repeated values

Skip repeated values

Multiple occurences of the same Y-value are treated as missing values.

sp.LineGraphStyle = LineGraphStyles.GridLines|LineGraphStyles.SkipRepeats|LineGraphStyles.Markers|LineGraphStyles.NoLines
sp.Heading = "Repeated Y-values are Treated as Missing";
sp.DrawLineGraph(col_SR,col_S2);

This style could be used to eliminate long runs of identical values, typical of many data-logging devices.


SharpPlot 3.71 User Manual: Skip runs of repeated values

Skip runs of repeated values

Multiple occurences of the same Y-value are treated as missing values, but the first and last of each run are retained.

sp.LineGraphStyle = LineGraphStyles.GridLines|LineGraphStyles.SkipRuns|LineGraphStyles.Markers;
sp.Heading = "Runs of Identical Y-values are Unmarked";
sp.DrawLineGraph(col_SR,col_S2);

This style could be used to eliminate long runs of identical values, typical of many data-logging devices.


SharpPlot 3.71 User Manual: Span data range for Fitting

Span data range for Fitting

The fitted line is not extended beyond the extreme points on the x-axis

// Set equation under the chart and span the reqression line
 sp.EquationStyle = EquationStyles.Middle|EquationStyles.Below|EquationStyles.SpanData;
 sp.EquationFormat = "y = C0 + C1x";

This may be a useful setting if several regressions are made through subsets of the data.

See also ...

Model fit | Trend lines | SharpPlot.SetModelSpan Method


SharpPlot 3.71 User Manual: Spanned Labels

Spanned Labels

Column headers on table charts are spanned across empty or identical cells. Where a column is spanned, the vertical grid is omitted from between the merged cells. Multi-line X-axis labels are spanned across several tickmarks to show hierarchical time periods (e.g. months, quarters, years)

sp.TableStyle = TableStyles.Spanned;
sp.XAxisStyle = XAxisStyles.SpannedLabels;

Titles will span across as many empty cells as are available. This style also applies to the horizontal axis labels.

sp.SetXLabels(col_Subsect);
sp.BarChartStyle = BarChartStyles.ForceZero|BarChartStyles.TicksBetween;
sp.SetAxisStyle(Color.Black,LineStyle.Solid,1);
sp.XAxisStyle = XAxisStyles.MiddleLabels|XAxisStyles.SpannedLabels;
sp.SetXTickLengths(new int[] {100,0,180,0,0,180});
sp.XDatumThreshold = 200;
sp.LabelLineSpacing = 1.4;

Note the use of simple HTML tags to format the lower row of labels in bold text.

See also ...

SharpPlot Members | SharpPlot.ScatterPlotStyle Property | SharpPlot.TableStyle Property


SharpPlot 3.71 User Manual: Stacked Bars

Stacked Bars

Barcharts will accumulate and stack multiple data series.

sp.BarChartStyle = BarChartStyles.StackedBars;

To have the first bar not drawn, use the ‘floating’ style here.

See also ...

Floating Bars | SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: Stay at edge (Labels)

Stay at edge (Labels)

When axes are placed explicitly in the chart area, it is often better to have labels and captions remain where they were.

sp.Heading = "The Y-caption & Labels Stay out of the Chart";
sp.LineGraphStyle = LineGraphStyles.GridLines;
sp.XIntercept = 40;
sp.YIntercept = 100;
sp.YAxisStyle = YAxisStyles.AtEndCaption|YAxisStyles.StayAtEdge;
sp.XAxisStyle = XAxisStyles.StayAtEdge;

This style applies to both X and Y axes.


SharpPlot 3.71 User Manual: Surface fill is drawn

Surface fill is drawn

Line, Step and Polar charts are shaded down to the X-axis or in to the centre.

sp.LineGraphStyle = LineGraphStyles.SurfaceShading;

If a chart Baseline is set, this is used as the target for the surface fill rather than the X-axis. Surface fills look good with markers turned off and maybe with Risers (as here).

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.HistogramStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.PolarChartStyle Property | SharpPlot.StepChartStyle Property | SharpPlot.TraceChartStyle Property


SharpPlot 3.71 User Manual: Synchronised gridlines

Synchronised gridlines

Applies only to a secondary Y-axis.The tickmarks are constrained to line up with the ticks on the primary axis and the gridlines are not drawn.

sp.XAxisStyle = XAxisStyles.OmitLastLabel;
sp.YAxisStyle = YAxisStyles.BalancedAxis|YAxisStyles.CenteredCaption;

sp.YCaption = "Variance against estimate";
sp.DrawLineGraph(arr_1,col_S2);

sp.NewYAxis();
sp.YAxisStyle = YAxisStyles.Synchronised|YAxisStyles.BalancedAxis;
sp.DrawLineGraph(arr_2);

This style is often used in conjunction with balanced y-axes to get a matched zero-line down the middle of the chart.

See also ...

SharpPlot.NewYAxis Method


SharpPlot 3.71 User Manual: Terminated Min-Max

Terminated Min-Max

The ‘terminated’ style will apply the current markers to each end of the Min-Max chart as an alternative to ErrorBars or ArrowLines. Solid markers such as the lozenge or various sizes of circle work best here.

sp.MinMaxChartStyle = MinMaxChartStyles.Terminated;

You can additionally use the DriftMarkers style to have the markers only placed at the ‘far’ end of each line.

See also ...

Drift Markers for Directional Min-Max | Rooted vectors | SharpPlot Members | SharpPlot.MinMaxChartStyle Property | SharpPlot.VectorStyle Property


SharpPlot 3.71 User Manual: Tickmarks between Bars

Tickmarks between Bars

Tickmarks are place in the gaps between the bars, rather than on the bars themselves.

sp.BarChartStyle = BarChartStyles.TicksBetween;

This style works well with the MiddleLabels style of axis labels.

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.BoxPlotStyle Property | SharpPlot.XBarChartStyle Property


SharpPlot 3.71 User Manual: Tiled Response surface

Tiled Response surface

Response surfaces are tiled, rather than being drawn as an open mesh.

sp.ResponsePlotStyle = ResponsePlotStyles.TiledSurface;

This works well when used to plot a computed function of 2 variables.

See also ...

Altitude shading | SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.ResponsePlotStyle Property


SharpPlot 3.71 User Manual: Top X-Axis

Top X-Axis

The X-axis is drawn at the top.

sp.Heading = "Top X-Axis with Inverted Y-Axis";
sp.XAxisStyle = XAxisStyles.ArrowedAxis|XAxisStyles.AtEndCaption|XAxisStyles.TopAxis;
sp.YAxisStyle = YAxisStyles.ArrowedAxis|YAxisStyles.InvertAxis|YAxisStyles.AtEndCaption;
sp.YCaption = "Depth (m)";
sp.XCaption = "Distance from Shore (m)";

This style would generally be used with YAxisStyle set to InvertAxis – typically to plot depth below ground or sample age. Pollen diagrams are typical.


SharpPlot 3.71 User Manual: Trend lines

Trend lines

An exponentially-weighted smooth line is drawn through the data.

sp.LineGraphStyle = LineGraphStyles.TrendLine;

The trend line consumes one line colour, style, width, and key in the cycles, in the order (data, trend, model).

The degree of smoothing may be adjusted with the Flexibility setting.

See also ...

Model fit | SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: Trend surface

Trend surface

You can use the gaussian fitting process with 3D data to put a trend surface through a set of spot-height values.

This can be a useful way to visualise a landscape given a series of discrete altitude values. Contours are drawn at the Z-tickmarks if style Contours is set, and if style Risers is selected, the risers are drawn from the surface rather than from the XY-plane.

See also ...

Model fit | SharpPlot.Flexibility Property


SharpPlot 3.71 User Manual: Value Tags are drawn

Value Tags are drawn

Data values are written next to each marker, or on top (or inside) each bar.

sp.LineGraphStyle = LineGraphStyles.ValueTags;

The detailed placement may be adjusted with the Value style setting which also allows the tags to be drawn opaque (as shown on the bars) or transparent.

See also ...

SharpPlot Members | SharpPlot.ValueTagAngle Property | SharpPlot.ValueTagFormat Property | SharpPlot.SetValueFont Method | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: Walls are shaded on 3D charts

Walls are shaded on 3D charts

The XZ, YZ and XY planes of 3D charts are shaded to form walls and a floor.

sp.TowerChartStyle = TowerChartStyles.WallShading;

This usually improves the readability of 3D charts as it gives a better sense of perspective.

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.ResponsePlotStyle Property | SharpPlot.TowerChartStyle Property | SharpPlot.SetTowerFillStyles Method


SharpPlot 3.71 User Manual: Wedge zones

Wedge zones

Dialchart warning zones are drawn as a complete wedge from the centre, rather than an annular segment.

sp.DialChartStyle = DialChartStyles.WedgeZones;

The example also shows the ArrowLines style of pointer.

See also ...

SharpPlot Members | SharpPlot.DialChartStyle Property | SharpPlot.PolarChartStyle Property


SharpPlot 3.71 User Manual: XY Plot

XY Plot

Example

sp.LineGraphStyle = LineGraphStyles.XYPlot;

Linegraphs

The first item of the data array is taken as the X-values. This has the same effect as passing one less column and setting the X-values with the second argument. The default is to assume that all columns of data represent sets of Y-values to be plotted against (1..n) as separate timeseries.

arr_X = new int[] {1,83,14,48,9,67};
arr_Y = new int[] {5,9,13,27,41,47};
data = new int[][]{arr_X,arr_Y};
sp.LineGraphStyle = LineGraphStyles.XYPlot;
sp.DrawLineGraph(data);

Cloud charts (3D scatter)

In this case, the first 2 items are taken as the X and Y values. Columns from 3 onwards are taken as independent data series, giving Z values. This allows you to call Cloud charts passing a single 3-element array of arrays rather that using the xValues and yValues arguments to set the values on the X and Y axes.

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.LineGraphStyle Property | SharpPlot.MinMaxChartStyle Property | SharpPlot.PolarChartStyle Property


SharpPlot 3.71 User Manual: SharpLeaf Tutorials

SharpLeaf Tutorials

The SharpLeaf class is a reporting engine that allows automated typesetting, tabulation, and inclusion of graphics into page-based reports.

You can look at a first example for a simple command-line program to make a report. If you need to write the script in APL or VB, have a look a the Language tutorial to see how to translate C# samples into APL or VB scripts.

Topics

Document Layout Tutorials
Tutorials to use DocumentLayout classes to create master page definitions for SharpLeaf
Text Flow Tutorials
Tutorial to flow content into SharpLeaf reports.
Table Tutorials
Tutorials to use Tables for inclusion into SharpLeaf reports.
Visual Glossaries
Here are a few illustrated glossaries of terms useful to the SharpLeaf user.


SharpPlot 3.71 User Manual: Document Layout Tutorials

Document Layout Tutorials

Tutorials to use DocumentLayout classes to create master page definitions for SharpLeaf

Simple DocumentLayouts
A minimal document layout with a single page definition with a simple frame and a page counter.
Advanced DocumentLayouts
Examples of multi-frame and multi-page document layouts.


SharpPlot 3.71 User Manual: Simple DocumentLayouts

Simple DocumentLayouts

A minimal document layout with a single page definition with a simple frame and a page counter.

The following script uses the aplparas variable.

  // A5 Landscape paper
   page = new PageLayout(PaperSize.Landscape(PaperSize.A5));
  // Use half-inch margin all around (invisible frame with no gutter)
   page.Add(new Frame("Main",36,36,-36,-36));
  // Use default font for page counter
   font = new FontType();
  // Page counter in center of bottom margin
   page.Add(new TextBlock("{page}/{pages}",font,36,-18,-36,-18,Alignment.Center,
            VerticalAlignment.Middle,false));

  // Our document layout has a single page definition - which applies to all pages
   layout = new DocumentLayout(page);

   lf = new SharpLeaf(layout);
  // Start flowing text using all default settings
   lf.AddParagraphs(aplparas);

See also ...

SharpLeaf Tutorials | Advanced DocumentLayouts | PageLayout Glossary


SharpPlot 3.71 User Manual: Advanced DocumentLayouts

Advanced DocumentLayouts

Examples of multi-frame and multi-page document layouts.

Using two frames per page

   paper = PaperSize.Landscape(PaperSize.A5);
   left = 36;
   right = -36;
   top = 36;
   bottom = -48;  // Leave more room at bottom for footer
   center = 0.5 * paper[0];
   cl = center - 24;
   cr = center + 24;  // gap around center

   leftframe = new Frame("LeftFrame",left,top,cl,bottom);  // Left-hand frame
   rightframe = new Frame("RightFrame",cr,top,right,bottom);  // Right-hand frame
   rule = new Rule(center,top,center,bottom,1,Color.Gray);  // Rule between frames
   footfont = new FontType("Times",12,FontStyle.Bold,Color.Gray);  // Footer font
  // Page footer with page count, 12 point below bottom
   footer = new TextBlock("Page {page}/{pages}",footfont,left,bottom + 12,right,bottom
            + 12,Alignment.Center,VerticalAlignment.Top,false);

   page = new PageLayout(paper);
  // Page frames are taken in the order in which they are added
   page.Add(new PageElement[] {leftframe,rightframe,rule,footer});

  // Take a deep copy as of now to ignore further changes to page and its children
   layout = new DocumentLayout(page.Clone());

   lf = new SharpLeaf(layout);
   lf.AddParagraphs(aplparas);

Using alternate page definitions

  // Let's modify the footer alignment to alternate between left and right pages
   footer.Alignment = Alignment.Left;
   leftpage = page.Clone();  // Modify page and freeze
   footer.Alignment = Alignment.Right;
   rightpage = page.Clone();  // Modify page and freeze

  // Use alternating page definitions, starting with a right page
   layout=new DocumentLayout(new PageLayout[] {rightpage,leftpage});

   lf = new SharpLeaf(layout);
   lf.AddParagraphs(aplparas);

Adding special element to first page

   sender = "John Smallcroft\n9256, Downside Close\nButthillbury\nLostshire NW82 "+
            "9ZP\nUnited Kingdom";
   recipient = "Bernard Petitgruet\n137, Impasse des oubliettes\n98350 St-Trou-lès-Oies\nFrance";

  // Let's modify our page to make the first page layout with addresses and a logo
  // Put a logo on top-left corner
   page.Add(new ImageBlock("dyalog.jpg","dyalog.jpg",left,top,72,72));
   addressfont = new FontType();  // Default font
  // Sender address (fixed) on top-right corner with no wrapping
   page.Add(new TextBlock(sender,addressfont,right,top,right,top,Alignment.Right,
            VerticalAlignment.Top,false));
// Recipient address - Frame to be flowed without clip nor skip, so that text
            // overflows if necessary
   page.Add(new Frame("Recipient",left,144,right,200,false,false,false));
  // First page is a right page - remember we have touched it earlier
   footer.Alignment = Alignment.Right;
   top = 230;
  // Bring frames and rule down to leave space for addresses
   leftframe.SetCoordinates(left,top,cl,bottom);
   rightframe.SetCoordinates(cr,top,right,bottom);
   rule.SetCoordinates(center,top,center,bottom);
  // Need to be explicit about Frame order because Recipient was added after the others
   page.FrameList = new string[]{"Recipient","LeftFrame","RightFrame"};
   firstpage = page.Clone();  // Take deep copy of our new page definition

  // Remember that the first page is a right page
   layout=new DocumentLayout(new PageLayout[] {firstpage,leftpage,rightpage});
   layout.Repeat = 2;  // Repeat only the last two pages of the layout

   lf = new SharpLeaf(layout);
   lf.AddParagraphs(recipient);
   lf.NextFrame();
   lf.AddParagraphs(aplparas);

See also ...

PageLayout Glossary


SharpPlot 3.71 User Manual: Text Flow Tutorials

Text Flow Tutorials

Tutorial to flow content into SharpLeaf reports.

Flowing Paragraphs
The most straightforward way to flow text into a SharpLeaf document is to attach ParagraphStyles to text paragraphs.
Widow and Orphan Control
SharpLeaf provides simple ParagraphStyle settings to prevent odd paragraph splitting across page or frame boundary.
Advanced Text Control
SharpLeaf allows fine character-level control of the output, at the cost of a slightly more complex API than simply SharpLeaf.AddParagraphs.
Text Inclusions
Objects can be included into the text flow so that text wraps nicely around it.


SharpPlot 3.71 User Manual: Flowing Paragraphs

Flowing Paragraphs

The most straightforward way to flow text into a SharpLeaf document is to attach ParagraphStyles to text paragraphs.

   page = new PageLayout(PaperSize.Landscape(PaperSize.A5));
   page.Add(new Frame("Main",36,36,-36,-36));  // Half-inch margin all around
   layout = new DocumentLayout(page);

   body = new ParagraphStyle();
   body.Font = new FontType("Times",12);
   body.IndentFirst = 36;
   body.SpaceAfter = -1;  // Equivalent of one empty line of text

   bullet = body.Clone();  // Take deep copy as of now
   bullet.SpaceBetween = false;  // No space between bullet list items
   bullet.SetBullet("{1}.");  // Use numbered bullets
   bullet.BulletIndent = body.IndentFirst;  // Use same indent for bullets
   bullet.IndentFirst = 0;  // Unset the IndentFirst inherited from body

   title = new ParagraphStyle();
   title.Font = new FontType("Garamond",15,FontStyle.Bold,Color.Navy);
   title.IndentLeft = body.IndentFirst;  // Use same indent for titles
   title.SpaceBefore = -1;  // Leave room before a title - unless at top of frame
   title.SpaceAfter = -1;  // Leave room after a title
   title.BookmarkLevel = 1;  // Automatically bookmark titles at top level

   lf = new SharpLeaf(layout);

   para = "Here's a dummy paragraph of text. As the qualifier suggests its content is "+
            "not particularly interesting, but it still reaches its goal of being long "+
            "enough to take up more than one line.";
   paras = new string[]{para,para};
   list = new string[]{"First item on list","Another item here","And a last one there"};

  // Flow paragraphs with their styles
   lf.AddParagraphs("First title",title);
   lf.AddParagraphs(paras,body);
   lf.AddParagraphs(list,bullet);
   lf.AddParagraphs(para,body);
   lf.AddParagraphs("Second title",title);
   lf.AddParagraphs(paras,body);

See also ...

Text Flow Tutorials | Paragraph Glossary | SharpLeaf.Style Property | SharpLeaf.AddParagraphs Method | ParagraphStyle.Members


SharpPlot 3.71 User Manual: Widow and Orphan Control

Widow and Orphan Control

SharpLeaf provides simple ParagraphStyle settings to prevent odd paragraph splitting across page or frame boundary.

Keeping lines together

The Keep property of a ParagraphStyle determines the minimum number of lines that can be on their own at the start or end of a paragraph, when a frame skip occurs.

  // Disable widow/orphan control (the default value anyway)
   lf.Style.Keep=1;

The default setting produces a single line on its own at the top of the second frame.

  // Enable widow/orphan control, forbidding one line on its own
   lf.Style.Keep=2;

Setting the Keep to two make the text flow slightly nicer, as the penultimate line is pushed onto the second frame although it could fit in the first.

  // Enable widow/orphan control, forbidding one or two lines on their own
   lf.Style.Keep=3;

In this case it is impossible to keep 3 lines together on each side of the frame skip, so the whole paragraph is started on the next frame. This is why Keep values are generally low – they quickly produce a lot of blank space at the end of frames.

Ensuring space available at the start of end of a paragraph

Here’s a example of a Title paragraph that fits right at the bottom of a frame. Its subject paragraph ends up on the next frame.

The Keep setting will not address this problem as no paragraph is split across frames. The ParagraphStyle class provides two properties that address it:

  • SpaceStarting: Space to bottom of frame that should be available at the start of the paragraph.
  • SpaceFollowing: Space to bottom of frame that should be available after the end of the paragraph.

See the visual glossary for an illustration.

  // Skip to next frame if less than 4 lines available at title font from start of paragraph
   title.SpaceStarting = -4;

Now a frame skip occurs to ensure that the Title paragraph has some room to flow a few paragraph lines right below it.

In the case of small paragraphs such as titles, the two properties are nearly equivalent. But they can be also be used on normal paragraphs that should be attached to upcoming inclusions. In the case of SpaceFollowing on long paragraphs, the frame skip will happen Keep lines before the end of the paragraph.

See also ...

Text Flow Tutorials | Flowing Paragraphs | Paragraph Glossary | SharpLeaf.Style Property | ParagraphStyle.Keep Property | ParagraphStyle.SpaceFollowing Property | ParagraphStyle.SpaceStarting Property


SharpPlot 3.71 User Manual: Advanced Text Control

Advanced Text Control

SharpLeaf allows fine character-level control of the output, at the cost of a slightly more complex API than simply SharpLeaf.AddParagraphs.

Character-level control

Text and Paragraphs settings can be changed in-flight in several ways:

  • Changing the SharpLeaf.Style property between calls to Add methods
  • Changing settings of the ParagraphStyle instance that was passed to SharpLeaf.Style
  • Calling the Sharpleaf.PushStyle/SharpLeaf.PopStyle methods

Style modifications can also be passed as string specifications that match the result produced by ParagraphStyle.ToString method (see ParagraphStyle constructor, ParagraphStyle.Set, SharpLeaf.PushStyle, SharpLeaf.AddParagraphs

   lf.Style = style = new ParagraphStyle();  // Keep a handle to the current paragraph style
   style.SpaceBefore = -0.5;
   style.SpaceAfter = -0.5;  // Half a line pitch around each paragraph
   style.Font = font = new FontType("Times",24);

   lf.AddText("We can put normal text, ");
   newfont = new FontType("Arial",36,FontStyle.Italic|FontStyle.Bold|
            FontStyle.Underline,Color.Fuchsia);
   style.Font = newfont;  // Replace the ParagraphStyle's property
   lf.AddText("then change the font");
   style.Font = font;  // Replace again back to previous
   lf.AddText(" then back up the change to normal font.");

   lf.NextLine();
// Without the NextLine call, in-flight paragraph style modification would affect the
            // previous (unfinished) line.
   lf.PushStyle(newstyle = style.Clone());  // Non-destructive, temporary style modification
   newstyle.Alignment = Alignment.Center;
   newstyle.Set("IndentLeft=72 IndentRight=72");  // Specify modification as string
   lf.AddText("We can change other paragraph settings in-flight too.");
   lf.PopStyle();  // Back up the temporary style modification
   lf.NextParagraph();

   lf.PushStyle("FontName=\"Arial\" FontColor=DarkGreen");  // Specify modification as string
   lf.AddText("Text can be ");
   lf.AddSuperscript("superscripted");
   lf.AddText(" and ");
   lf.AddSubscript("subscripted");
   lf.AddText(" and");
   lf.AddSuperscript("both");
   lf.AddSubscript("at once");
   lf.AddText('.');
   lf.NextParagraph();
   lf.PopStyle();

   lf.CapFont = new FontType("Old English Text MT",12,FontStyle.Regular,Color.Navy);
   lf.SetCap(2);  // Set up a dropped capital on two lines
   box = new BoxStyle(2,Color.Firebrick,LineStyle.Dash,24);
   lf.PushStyle();  // Temporarily copy current style
   lf.Style.HorizontalGap = 24;
            // Use horizontal gutter of 24 points between text and box - Vertical
            // gutter of the box is provided by the paragraph's SpaceBefore and
            // SpaceAfter because we start/stop boxing on paragraph boundaries;
   lf.SetBox(box);  // Start boxing
   lf.AddParagraphs("And finally, we can set up a dropped capital to show how the text "+
            "nicely wraps around it, and set up boxing around the paragraph.");
   lf.SetBox();  // Stop boxing
   lf.PopStyle();

HTML tags

HTML-formatted text can be input into SharpLeaf through the SharpLeaf.AddHtml method. See that entry for list of supported tags.

   lf.AddHtml("<p> HTML &amp;entities; and basic tags are supported: ");
   lf.AddHtml("<b><i><u><strike><pre>font "+
            "styles</pre></strike></u></i></b>, ");
   lf.AddHtml("and<sup>superscripts</sup><sub>subscripts</sub>, ");
   lf.AddHtml("<a href=\"www.sharpplot.com\">hyperlinks</a>, ");
   style.BulletIndent = 72;  // HTML bulleted lists uses that - we don't want the default 0
   lf.AddHtml("and even bulleted lists: <ol> <li> Item 1 <li> Item 2 "+
            "</ol>");
   lf.AddHtml("</p> <hr> <p> Along with paragraph separators, "+
            "horizontal rules, and line <br> breaks. </p>");

Soft Hyphens

Soft Hyphens can be used when paragraph wrapping is turned on, to specify that hyphenated wrapping is acceptable at those points. The default character is ‘’ (Unicode 0xAD – codepoint 173), but can be changed through the SharpLeaf.SoftHyphen property.

   for (int ct = 1; ct <= 13; ct++) {
     lf.AddText("a sample paragraph ");  // No soft hyphen
   }
   lf.NextParagraph();
   for (int ct = 1; ct <= 13; ct++) {
     lf.AddText("a sample paragraph ");  // Soft hyphens
   }

As you can see, the paragraph is less ragged and take smaller a space.

Non-breakable Spaces

Non-breakable space can be used when paragraph wrapping is turned on, to specify that wrapping should not occur at those points. The standard character is ‘ ’ (Unicode 0xA0 – codepoint 160).

   for (int ct = 1; ct <= 7; ct++) {
    // Normal spaces
     lf.AddText("Mr. Doe has 10 oz of «play dough». ");
   }
   lf.NextParagraph();
   for (int ct = 1; ct <= 7; ct++) {
    // Non-breakable space after title, before unit, and within quotes
     lf.AddText("Mr. Doe has 10 oz of «play dough». ");
   }

As you can see, using it produces more ragged paragraphs.

See also ...

Text Flow Tutorials | Paragraph Glossary | Font Glossary | SharpLeaf Members


SharpPlot 3.71 User Manual: Text Inclusions

Text Inclusions

Objects can be included into the text flow so that text wraps nicely around it.

The following script uses the aplparas variable.

   page = new PageLayout(PaperSize.Landscape(PaperSize.A5));
   page.Add(new Frame("MainFrame",36,36,-36,-36));  // Half-inch margin
   layout = new DocumentLayout(page);

   lf = new SharpLeaf(layout);
  // half a line pitch around each paragraph
   lf.Style.SpaceBefore=-0.5;
   lf.Style.SpaceAfter=-0.5;

   heading = "Figures";
   series = new string[]{"Home","Overseas"};
   years = new string[]{"2013","2014","2015"};
   data = new double[][]{new double[]{50.2,56.4,55},new double[]{21,23.7,19.1}};

   tb = new Table();
   tb.SetTitles(1,1);
   tb.AddRowCells(heading);
   tb.AddRowCells(series);
   tb.NextEmptyRow(1);
   tb.AddColumns(years);
   tb.SetCellAlignment(Alignment.Decimal);
   tb.AddColumns(data);

   sp = new SharpPlot(192,144);
   sp.Gutter = 0;
   sp.FrameStyle = FrameStyles.Boxed;
   sp.MarginBottom = 30;
   sp.Heading = heading;
   sp.SetXLabels(years);
   sp.SetKeyText(series);
   sp.DrawBarChart(data);
   sp.DrawKey();

   lf.IncludeImage("dyalog.jpg","dyalog.jpg",BoxFlow.Center,36);
   lf.IncludeSpace(lf.Style.SpaceAfter);
   lf.IncludeRule(1,144);  // Include a 1-point thick, 2-inch wide rule
   lf.AddParagraphs(aplparas[0]);
   lf.IncludeChart(sp,BoxFlow.Right);  // Include chart at real size
   lf.IncludeSpace(36,-3);  // Knock out blank space, 36-point wide on three lines of text
   lf.AddParagraphs(aplparas[1]);
   lf.IncludeTable(tb,BoxFlow.Left,150);  // Include table at 150-point width
   lf.AddParagraphs(aplparas[2]);

Advanced examples of table inclusions can illustrate better the mindset of inclusions.

See also ...

Text Flow Tutorials | SharpLeaf.IncludeChart Method | SharpLeaf.IncludeImage Method | SharpLeaf.IncludeRule Method | SharpLeaf.IncludeSpace Method | SharpLeaf.IncludeTable Method | SharpLeaf.NextClear Method | ParagraphStyle.HorizontalGap Property | BoxFlow Enumeration


SharpPlot 3.71 User Manual: Table Tutorials

Table Tutorials

Tutorials to use Tables for inclusion into SharpLeaf reports.

Filling cells of a Table
The Table class provides simple methods to input data into table cells.
Table Appearance
The Table class provides fine control over the appearance of the table box, grid, and cells. A table may also be annotated by a heading, subheading, caption, and footnote.
Sizing Columns and Rows
There are several strategies to size columns and rows of a Table.
Splitting Blocks of Columns
There are several strategies to scale or split a table when it is larger than the available frame width.
Table Cyclic Settings
Column-wise, row-wise, and cell-wise settings are cycled through as we append cells to the Table.


SharpPlot 3.71 User Manual: Filling cells of a Table

Filling cells of a Table

The Table class provides simple methods to input data into table cells.

   tb = new Table();
  // Append along current row
   tb.AddRowCells("Title");
   tb.AddRowCells(new string[]{"Column 1","Column 2","Column 3"});
  // Jump to next row, pointing at column 1
   tb.NextRow(1);
  // Append column from current cell and move on to original row on next column
   tb.AddColumns(new string[]{"Row 1","Row 2","Row 3","Row 4"});
  // Append rows from current cell, and move on to orignal column on next row
   tb.AddRows(new int[][]{new int[]{101,201,301},new int[]{102,202,302}});
  // Jump after the last row that is not empty from column 2 on (no-op here)
   tb.NextEmptyRow(2);
  // Append another row
   tb.AddRows(new string[]{"N/A","N/A","N/A"});
  // Jump after the last row that is not empty from column 1 on (that is completely empty)
   tb.NextEmptyRow(1);
  // Append a new row title
   tb.AddRowCells("Totals");
  // Append the new row's data
   tb.AddRowCells(new int[] {103,403,603});

   lf.IncludeTable(tb);  // Take frame width by default

See also ...

Table Tutorials | SharpLeaf.IncludeTable Method | Table Members


SharpPlot 3.71 User Manual: Table Appearance

Table Appearance

The Table class provides fine control over the appearance of the table box, grid, and cells. A table may also be annotated by a heading, subheading, caption, and footnote.

   tb = new Table();

   tb.Heading = "Table Heading";
   tb.HeadingFont = new FontType("Times",36,FontStyle.Bold);
   tb.Footnote = "Table footnote";
   tb.FootnoteAlignment = Alignment.Right;  // use default font

   tb.SetTitles(1,1);  // 1 column and 1 row of titles
   tb.SetOffset(1,0);  // Offset table box to exclude 1 column and 0 row
   tb.SetCellMargins(10);  // Let's decide that the default 4 is a bit cramped
   tb.Box = new BoxStyle(3,Color.Navy,LineStyle.Solid,10,Color.Navy,FillStyle.Saturate10,true);
   tb.SetColumnGrid(0);  // Disable column grid
  // 1-point navy grid every other row (first grid line is below first row)
   tb.SetRowGrid(new int[]{1,0},new Color[]{Color.Navy,Color.Transparent});
   tb.AddRows(new string[]{"","Column 1","Column 2","Column 3"});
   tb.AddColumns(new string[]{"Row 1","Row 2","Row 3","Row 4"});
   tb.AddRows(new int[][]{new int[]{101,201,301},new int[]{102,202,302},new int[]{103,
            203,303},new int[]{104,204,304}});

   box = new BoxStyle(3,Color.Firebrick,LineStyle.Solid,0,Color.Firebrick,
            FillStyle.Saturate10,false);
   tb.SetCellBox(box,3,4);  // Special cell box at column 3, row 4

   lf.IncludeTable(tb);

See also ...

Table Tutorials | SharpLeaf.IncludeTable Method | Table Members


SharpPlot 3.71 User Manual: Sizing Columns and Rows

Sizing Columns and Rows

There are several strategies to size columns and rows of a Table.

   table = new string[][] {new string[]{"Sales","Jan","Feb","Mar","Apr","May","Jun",
            "Jul","Aug","Sep","Oct","Nov","Dec","Notes"},new string[]{"Suspenders",
            "36","59","20","45","63","50","26","10","50","64","60","68",""},new
            string[]{"Pillows","78","66","72","27","74","44","21","46","62","48","39",
            "90",""},new string[]{"Garden gnomes","13","15","10","14","14","19","18",
            "16","12","12","11","11","Febrile activity over the last few years — new "+
            "strategy required"},new string[]{"Hair curlers","49","25","40","31","61",
            "64","58","32","66","28","33","48",""},new string[]{"Pop corn","56","96",
            "-","35","46","85","56","65","86","56","84","39","Temporary closure in "+
            "March"},new string[]{"Door mats","70","67","57","55","42","71","78","56",
            "78","63","56","77",""},new string[]{"Firecrackers","86","51","12","23",
            "41","44","81","47","22","47","51","90","Unresolved legal issues in some "+
            "countries\nExtremely seasonal activity"},new string[]{"Lemon squeezers",
            "23","27","28","43","12","33","47","48","34","17","19","26",""}};
   tb = new Table();
  // Columns share the width evenly by default, and cell content takes as much height as needed
   tb.AddRows(table);

The default behaviour is not quite right in this case. Let’s change the columns widths so that row titles auto-fit, data is fixed witdth, and last column takes remaining space

   tb = new Table();
  // Auto-fit first column, fixed-size widths for data, last column takes remaining width
   colwidths = new int[] {0,27,27,27,27,27,27,27,27,27,27,27,27,-1};
  // Row heights will be the minimum required to fit cell content within column widths
   tb.SetColumnWidths(colwidths);
   tb.AddRows(table);

This is better. Now, the default way to handle row size is to take as much height as necessary to wrap all the cell contents at their column width. We can impose a limit if cell content is unknown. It is not a problem in this example, but let’s still have a look at what happens.

   tb = new Table();
   tb.SetColumnWidths(colwidths);
  // Impose a maximum row height - tail of cell content might be clipped off
   tb.SetRowMaxHeights(30);
   tb.AddRows(table);

Now only the leading content of the cell is displayed, and in our example, the last line of the second-to-last row notes has disappeared. A finer strategy to prevent the leading cell content to always win over the trailing cell content is to format cell content with newlines and disable cell wrapping.

   tb = new Table();
   tb.SetColumnWidths(colwidths);
  // Another strategy : clip without wrapping - only explicit newlines will take height
   tb.SetCellWrap(false);
   tb.AddRows(table);

At that point, leading line content wins over the trailing line content, although if there are too many lines for the maximum row height, the last few lines will disappear – and there’s nothing we can do about it apart from raising the maximum row height.

See also ...

Table Tutorials | Table Glossary | SharpLeaf.IncludeTable Method | Table Members


SharpPlot 3.71 User Manual: Splitting Blocks of Columns

Splitting Blocks of Columns

There are several strategies to scale or split a table when it is larger than the available frame width.

Target Width and Column Widths

In the table sizing tutorial we’ve seen that relative-sized columns (negative column widths) share the width that’s left from the fixed-size (positive column widths) and auto-fit (zero column widths), once we’ve substracted them from the target width (which defaults to the available frame width).

   table = new string[][] {new string[]{"Sales","Jan","Feb","Mar","Apr","May","Jun",
            "Jul","Aug","Sep","Oct","Nov","Dec","Notes"},new string[]{"Suspenders",
            "36","59","20","45","63","50","26","10","50","64","60","68",""},new
            string[]{"Pillows","78","66","72","27","74","44","21","46","62","48","39",
            "90",""},new string[]{"Garden gnomes","13","15","10","14","14","19","18",
            "16","12","12","11","11","Febrile activity"},new string[]{"Hair curlers",
            "49","25","40","31","61","64","58","32","66","28","33","48",""},new
            string[]{"Pop corn","56","96","N/A","35","46","85","56","65","86","56",
            "84","39","Temporary closure in March"},new string[]{"Door mats","70","67",
            "57","55","42","71","78","56","78","63","56","77",""},new
            string[]{"Firecrackers","86","51","12","23","41","44","81","47","22","47",
            "51","90","Seasonal activity"},new string[]{"Lemon squeezers","23","27",
            "28","43","12","33","47","48","34","17","19","26",""}};

   tb = new Table();
   tb.SetTitles(1,1);
  // Auto-fit first column, fixed-size widths for data, last column takes remaining width
   tb.SetColumnWidths(new int[] {0,30,30,30,30,30,30,30,30,30,30,30,30,-1});
   tb.AddRows(table);

   lf.IncludeTable(tb);  // Target frame width with no scaling

A couple of things to observe in this example:

  • The table doesn’t fit the default target width (which is the frame width) so it is split into two blocks of columns
  • Titles are repeated on all blocks
  • Last column was down-sized to its minimum width because other columns already have eaten more than the target width.

At that point we could try and force the fit, using the fourth argument of the SharpLeaf.IncludeTable method:

   lf.IncludeTable(tb,BoxFlow.Paragraph,-1,true);  // Force table to fit one frame width

Scaling to fit the target width doesn’t solve the problem of the last column width – because the other columns still overflow the target width. What we really need a bigger target width

   lf.IncludeTable(tb,BoxFlow.Paragraph,-2);  // Target width of two frames, not forcing the fit

There is no guarantee that table fits the target width without some scaling (see the SharpLeaf.IncludeTable documentation). In this case, it’s because column widths do not exactly add up to block width, and because the table is not scaled down to fit the width.

Forcing the fit to the target width

   lf.IncludeTable(tb,BoxFlow.Paragraph,-2,true);  // Force table to fit two frame widths

This is becoming nice – two-frame width allows the relative-sized column to have enough width, and the table is slightly scaled down for the columns to fit exactly on two frames. Notice that in some cases, the blocks may have un-even widths, for example column widths of {50,-1,50} with a blockwidth of 100 and a targetwidth of 200.

But now that our table is split into blocks, we want to repeat the notes column on all blocks.

   tb = new Table();
   tb.SetTitles(1,1);
  // Auto-fit first column, fixed-size widths for data, last column takes remaining width
   tb.SetColumnWidths(new int[] {0,30,30,30,30,30,30,30,30,30,30,30,30,-1});
   tb.AddRows(table);
   tb.SetColumnRetain(-1);  // Retain last column (on top of first which is a title)

   lf.Style.SpaceAfter=12; // add 12 points between table block (thanks to BoxFlow.Paragraph);
   lf.IncludeTable(tb,BoxFlow.Paragraph,-2,true);

Since the un-repeated columns have the same width, they split more nicely into blocks, but again, in the general case, columns may not always divide blocks evenly.

Scaling the Table

In some cases, we may prefer to force scaling down the table so that relative-sized columns have enough width AND the whole table fit the target width. This is achieved by the scaling factor argument of the IncludeTable method:

  // Another strategy to fit one frame width is to scale by a factor of 0.5
   lf.IncludeTable(tb,BoxFlow.Paragraph,-1,true,-1,0.5);
  // We can then split it into two blocks using half the frame width
   lf.IncludeTable(tb,BoxFlow.Right,-1,true,-0.5,0.5);
   lf.AddParagraphs("Scaling the table should be done with care because the table "+
            "fonts may become much smaller than the paragraph font…");

See also ...

Table Tutorials | SharpLeaf.IncludeTable Method | Table Members


SharpPlot 3.71 User Manual: Table Cyclic Settings

Table Cyclic Settings

Column-wise, row-wise, and cell-wise settings are cycled through as we append cells to the Table.

Table Cyclic Settings

  • Column-wise: SetColumWidths, SetColumMinWidths, SetColumMaxWidth, SetColumBefore, SetColumAfter, SetColumGrid, SetColumnMerge
  • Row-wise: SetRowHeights, SetRowMinHeights, SetRowMaxHeights, SetRowBefore, SetRowAfter, SetRowGrid, SetRowMerge
  • Cell-wise: SetCellFont, SetCellBox, SetCellClip, SetCellWrap, SetCellFillChar, SetCellAlignment, SetCellVerticalAlignment

When a setting is changed, the argument is used as a cycle, starting at current cell, and will be applied whenever we create a cell or change the content of an existing one.

Cell-wise settings can be set for as a scalar (for all future cells), as vector (along with a boolean flag specifying whether it is a row-wise or a column-wise cycle), or as a matrix (for tiling with a rectangular array of settings).

Column-wise and Row-wise settings can be set as scalar (for all future columns/rows), or as a vector to cycle through. For convenience, the default behaviour is that the setting is applied only the first time we create a cell in that row/column – otherwise things get pretty complicated when we re-visit columns in future rows or rows in future columns if we used several cycles (see example below). The ColumnOverwrite and RowOverwrite may be set to true (temporarily or not), to force the overwrite the column/row settings when creating or changing a cell.

Example

   quarters = new string[]{"Q1","Q1","Q1","Q2","Q2","Q2","Q3","Q3","Q3","Q4","Q4","Q4"};
   months = new string[]{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct",
            "Nov","Dec"};
   entries = new string[]{"Suspenders","Pillows","Garden gnomes","Hair curlers","Pop "+
            "corn","Door mats","Firecrackers","Lemon squeezers"};
   notes = new string[]{"","","Febrile activity","","Temporary closure in March","",
            "Seasonal activity",""};
   figures = new string[][] {new string[]{"36.1","59.5","20.6","45","63.7","50","26.1",
            "10.9","50.6","64.6","60.2","68.1"},new string[]{"78.3","66.9","72.4",
            "27.4","74","44.4","21.4","46","62.5","48.4","39.7","90"},new
            string[]{"13.1","15.8","10.35","14.5","14.7","19.9","18","16.3","12.2",
            "12.2","11","10.15"},new string[]{"49.1","25.5","40.8","31.5","61","64.2",
            "58.1","32.5","66.9","28.1","33.4","48.2"},new string[]{"56.5","96","-",
            "35.4","46.7","85.7","56.4","65.2","86","56.8","84.9","39.3"},new
            string[]{"70.6","67.6","57.4","55","42.8","71.3","78.3","56.5","78.9",
            "63.3","56.1","77.1"},new string[]{"86","51.1","12.05","23.8","41.5",
            "44.7","81.4","47.9","22.6","47.9","51.9","90"},new string[]{"23.4","27.2",
            "28.6","43.3","12.2","33.1","47.6","48.9","34.1","17.8","19.1","26.5"}};

   titlefont = new FontType("Times",10,FontStyle.Bold);
   entryfont = new FontType("Times",10);
   figfont = new FontType("Arial",8);
   notefont = new FontType("Times",8);

  // Table-wide settings
   tb = new Table();
  // Set up row and column grid for whole table
   tb.SetRowGrid(new double[] {0,0.1,0,0,0,0.1,0,0,0});
            // no gridline after first row, then every fourth row (last row has table
            // box)
   tb.SetColumnGrid(0);  // disable vertical grid
  // Set column-wise cell box for whole table
   box0 = new BoxStyle(0,Color.Transparent,LineStyle.Invisible,0,Color.LightGray,
            FillStyle.Solid,false);
   box1 = new BoxStyle(0,Color.Transparent,LineStyle.Invisible,0,Color.LightBlue,
            FillStyle.Solid,false);
   box2 = new BoxStyle(0,Color.Transparent,LineStyle.Invisible,0,Color.PaleGreen,
            FillStyle.Solid,false);
   box3 = new BoxStyle(0,Color.Transparent,LineStyle.Invisible,0,
            Color.LightGoldenrodYellow,FillStyle.Solid,false);
   box4 = new BoxStyle(0,Color.Transparent,LineStyle.Invisible,0,Color.Tan,
            FillStyle.Solid,false);
   tb.SetCellBox(new BoxStyle[]{box0,box1,box1,box1,box2,box2,box2,box3,box3,box3,box4,
            box4,box4,box0},true);
  // Similarly, we could call SetColumnWidths for the whole table at once,
  // but we're going to do it as we go through columns for the first time,
  // just to emphase that column and row settings are not overwritten by default

  // Fill the first row
   tb.SetRowMerge(true);  // Merge quarters horizontally
   tb.SetCellFont(titlefont);  // Font for next cells
   tb.SetCellAlignment(Alignment.Left);  // Merged cells will be centered
// This is the first time we go through columns, so their column settings will be
            // carved in stone as we go
// (unless we later call SetColumnOverwrite(true) before adding cell content to some
            // existing columns)
   tb.SetColumnWidths(0);  // First column is auto-fit
   tb.AddRowCells("Sales");
   tb.SetColumnWidths(30);  // Data columns have fixed width
   tb.AddRowCells(quarters);
   tb.SetColumnWidths(-1);  // Last column takes remaining width
   tb.AddRowCells("Notes");
  // The default SetColumnOverwite(false) ensures that the current SetColumnWidths cycle
  // won't overwrite previous columns widths as we re-visit them in other rows.

  // Fill the second row
   tb.NextRow(1);  // Next row, first column
   tb.SetRowMerge(false);  // Disable row merging for the rest of the table
   tb.SetCellAlignment(Alignment.Center);
   tb.AddRowCells("");
   tb.AddRowCells(months);
   tb.AddRowCells("");

  // Fill the first column
   tb.NextRow(1);  // Next row, first column
   tb.SetCellFont(entryfont);  // Font for next cells
   tb.SetCellAlignment(Alignment.Left);
   tb.SetCellFillChar('.');  // Set up fill character for row titles
   tb.AddColumns(entries);  // Flow row titles (and move on to start of next column)
   tb.SetCellFillChar(' ');  // Disable fill character for the rest of the table

  // Flow figures
   tb.SetCellFont(figfont);
   tb.SetCellAlignment(Alignment.Decimal);
   tb.AddRows(figures);  // Will move cell pointer to next row

  // Finish with a column of notes
   tb.NextEmptyColumn(3);  // Next empty column starting at third row
   tb.SetCellAlignment(Alignment.Left);
   tb.SetCellFont(notefont);
   tb.AddColumnCells(notes);

   lf.IncludeTable(tb);

See also ...

Table Tutorials | Table Glossary | Table Members


SharpPlot 3.71 User Manual: Visual Glossaries

Visual Glossaries

Here are a few illustrated glossaries of terms useful to the SharpLeaf user.

PageLayout Glossary
Page Layout settings are illustrated here.
Paragraph Glossary
Paragraph terms are illustrated here.
Table Glossary
Table settings are illustrated here.
Font Glossary
Font terms are illustrated here


SharpPlot 3.71 User Manual: PageLayout Glossary

PageLayout Glossary

Page Layout settings are illustrated here.

Quick links

PageLayout | PageLayout.Size | PaperSize

Frame | Frame.Gutter | TextBlock | Rule | Box | ImageBlock

See also ...

Document Layout Tutorials | Visual Glossaries | DocumentLayout Classes | PageElement Abstract Class


SharpPlot 3.71 User Manual: Paragraph Glossary

Paragraph Glossary

Paragraph terms are illustrated here.

Quick links

Frame Class | Frame.Gutter | Frame.XClip | Frame.YClip

SharpLeaf Class | SharpLeaf.FrameLeft | SharpLeaf.FrameTop | SharpLeaf.FrameHeight | SharpLeaf.FrameWidth

ParagraphStyle.IndentLeft | ParagraphStyle.IndentFirst | ParagraphStyle.IndentRight | ParagraphStyle.BulletIndent

ParagraphStyle.SpaceBefore | ParagraphStyle.SpaceAfter | ParagraphStyle.SpaceStarting | ParagraphStyle.SpaceFollowing

See also ...

Visual Glossaries | Flowing Paragraphs | Advanced Text Control | ParagraphStyle.Members


SharpPlot 3.71 User Manual: Table Glossary

Table Glossary

Table settings are illustrated here.

Quick links

Box | SetTitles | SetOffset

Heading | Subheading | Caption | Footnote

SetColumnGrid | SetRowGrid

SetColumnBefore | SetColumnAfter SetColumnWidths | SetColumnMinWidths | SetColumnMaxWidths

SetRowBefore | SetRowAfter | SetRowHeights | SetRowMinHeights | SetRowMaxHeights

SetColumnMerge | SetRowMerge

SetCellAlignment | SetCellVerticalAlignment

SetCellFont | SetCellBox | SetCellWrap

SetCellClip SetCellFillChar

See also ...

Visual Glossaries | Sizing Columns and Rows | Table Cyclic Settings | SharpLeaf.IncludeTable Method | Table Members


SharpPlot 3.71 User Manual: Font Glossary

Font Glossary

Font terms are illustrated here

See also ...

Visual Glossaries | Table.SetCellFont Method | FontType.Members | FontType.FontType Constructor | ParagraphStyle.Font Property | TextBlock.Font Property


SharpPlot 3.71 User Manual: SharpPlot Class

SharpPlot Class

SharpPlot is a comprehensive library of business and scientific charts.

public class SharpPlot

Example

A simple SharpPlot chart is created in four steps:

  1. Set up the drawing area
  2. Set up any properties (like headings and labels)
  3. Call one of the many Draw methods to build the chart
  4. Render or Save the result to your chosen format.

SharpPlot sp = new SharpPlot(180,120); // paper size in points
sp.SetMargins(12,12,18,4); // reduce default margins
data = new int[] {18,27,31,12,19,23};
sp.DrawBarChart(data);     // draw chart
Bitmap bmp = sp.RenderBitmap(72); // render at one pixel per point

The first three step can be iterated to create more complex charts. There are many more example charts in the SharpPlot Tutorials section of this guide.

Constructors

  • public SharpPlot();
  • public SharpPlot(double width, double height);
  • public SharpPlot(double[] papersize);

SharpPlot Methods

AddAttributes | Insert arbitrary content in the XML output for known text items
AddBookmark | Bookmark this page with name, level, openflag and weblink
AddComment | Insert a note with optional id and compression switch
AddEffect | Allow user to associate arbitrary SVG/XAML with any standard text item or subitem
AddHints | Apply an array of hints to a set of text items
AddHyperlinks | Apply an array of links to a set of text items
AddJavaPrologue | Include the definition of a JavaScript function in the output chart
AddTableShading | Add a combination of Color and Fill to an individual table cell
AddTips | Apply an array of tips to a set of text items
DefineFont | Create a definition for a font, including CSS details and PostScript name
DrawBarChart | Draws a grouped or stacked barchart from an array of arrays of values
DrawBoxPlot | Construct compound box-whisker plot from a data array and two integer category arrays
DrawBubbleChart | Scatterplot from 2 arrays of data with markers scaled by 3rd array
DrawCloudChart | 3D Scatter from x,y and multiple z values
DrawContourPlot | Contour plot from 3 arrays of double values
DrawDialChart | Draw a dial or gauge from data and pointer radii
DrawFrame | Draw current frame, with any fixed text such as headings and footnotes
DrawGanttChart | Gantt chart from 3 double arrays of Y-values, X-start and X-end values
DrawHistogram | Construct a histogram from a floating-point vector
DrawImage | Add an image to a chart
DrawKey | This will draw and clear any pending keys, using the current setting of key text.
DrawLineGraph | Construct plot from array of arrays of y values and x-values
DrawMinMaxChart | Create hi-lo plot from arrays of max,min and optional axis values
DrawMultiple | Multiple plot from double array of arrays of y-values versus double x-values
DrawNetworkMap | Draw a network of nodes and their link strengths
DrawNote | Write text note given text, position, angle and maximum width
DrawPieChart | Piechart from data and sector explosions
DrawPolarChart | Polar plot from multiple series and times or angles
DrawPolygon | Draw polygon from x and y coordinates, with optional Color, FillStyle, line width and LineStyle
DrawResponsePlot | Draw 3D grid, and construct surface from multiple vectors of zValues giving rows and columns
DrawScatterPlot | Make a scatter plot from x and y data
DrawStepChart | Stepped line from arrays of height data and step-start values
DrawTable | Build a table from an array of arrays of strings, giving cells in columns
DrawTowerChart | Tower chart from an array of arrays of height values
DrawTraceChart | Draw a set of parallel traces from an array of arrays of Y-values and an array of X-values
DrawTreeMap | Draw a treemap of a vector of items (may be paired with depth vector or a triplet of value,depth,altitude)
DrawTriangle | Construct triangle chart from data (3 series giving proportions or counts)
DrawVectors | Vector plot from 4 series of x y x y
DrawVennDiagram | Draw a Venn diagram using supplied membership data
DrawXBarChart | XBarchart from multiple data series and x-values
FindExtremes | Determines the extreme values from an array of data, allowing for the ‘Curves’ style
GetAltitudeColors | Get the array of colors used in Altitude Colors
GetCharsets | Return the list of used characters for each used font
GetCoefficients | Coefficients of model fit
GetColors | Get the array of colors used by upcoming series
GetFillStyles | Get an array of fill-styles used by upcoming series
GetFittedValues | Fitted values from model
GetITickPositions | Calculated Inner ticks
GetKeyBoxes | Get bounding boxes of the latest round of drawn Keys
GetKeyIndices | Get int[] setting for Key indices
GetLabelMask | Label mask
GetLineStyles | Get the array of line-styles to be used by upcoming series.
GetMarkerColors | Get the array of colors used in Marker Colors
GetMarkers | Get the array of markers for upcoming series
GetNetworkMapLinkArc | NetworkMap Link Arc
GetNetworkMapSelfArc | NetworkMap Self Arc
GetPaperSize | Get paper size as a 2-item double vector (width height)
GetPenWidths | Get the array of line-widths for upcoming series
GetResiduals | Residuals from modelfit
GetTextSize | Get text width and height in points
GetTrellisBoxes | Get the current trellis boxes as a list of (x y x y) coordinates
GetViewpoint | Get 3D viewpoint given a set of roll,pitch,yaw values in degrees
GetXTickPositions | Calculated X tickmarks
GetYTickPositions | Calculated Y tickmarks
GetZTickPositions | Calculated Z tickmarks
GroupBy | Group by unique values
IncludeSource | Add arbitrary (SVG/EPS) content to beginning or end of output stream
MapCoords | Maps a matched pair of (x,y) co-ordinate arrays to points
NewCell | Move to the next cell in the current trellis.
NewFrame | Clear the area for a new chart with new frame size and position.
NewPage | Move on to next page
NewYAxis | Partial reset to allow independent secondary Y-axis
NextNote | Returns the correct position for the next note text allowing given extra space in pts
ReadComment | Recover comments saved to file in any output format or passed as a string
ReadPdfStream | Recover any page from an encoded PDF
RedrawAxes | Overdraws the axes with optional framing
RenderAnimatedSvg | Return chart rendered as animated SVG, with one frame per page
RenderBitmap | Return completed chart rendered through raster engine as a Bitmap object
RenderChartLog | Return completed chart as a readable log
RenderDocument | Return completed chart as a Document instance
RenderEps | Return completed chart rendered as Encapsulated PostScript
RenderImageMap | Return tags to make an HTML imagemap for completed chart
RenderJsonChartMap | Return JSON arrays to make a map for entire chart
RenderMetafile | Return or stream completed chart as one of the Extended Metafile formats
RenderPS | Return completed chart rendered as raw PostScript
RenderPageMap | Return an instance of the PageMap class to allow active graphics applications with completed chart
RenderPdf | Return completed chart as a PDF stream
RenderSvg | Return completed chart rendered as SVG
RenderVml | Return completed chart as a VML string
RenderXaml | Return completed chart rendered as a XAML Canvas
Reset | Clear SharpPlot taking optional paper size (width,height in pts)
ResetKey | Removes any accumulated key definitions
ResetProperties | All properties except trellis definitions are returned to default values.
SaveAnimatedGif | Save chart rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save chart to named file as animated SVG, with one frame per page
SaveChartLog | Save completed chart as a readable log file
SaveEps | Save completed chart to named file as Encapsulated PostScript
SaveImage | Save completed chart rendered through raster engine as an image file
SavePS | Save completed chart to named file as raw PostScript
SavePdf | Save completed chart to named file as PDF
SaveSvg | Save completed chart to named file as SVG
SaveVml | Save chart to named file as VML, optionally wrapped into HTML
SaveXaml | Save completed chart to named file as a XAML Canvas
SetAltitudeColors | Set Altitude Colors
SetArrowStyle | Set Arrow format from Arrow size, with optional sweep angle and fill pattern
SetAxesScales | Set Axes scales given an array of numbers or a single value
SetAxisStyle | Set Axis format from any reasonable combination of lineColor, lineStyle and lineWidth
SetBackground | Set Paper from any reasonable combination of fillColor, fillStyle and edgeWidth
SetBarWidths | Set Bar widths given an array of numbers or a single value
SetBaselineStyle | Set Baseline format from any reasonable combination of lineColor, lineStyle and lineWidth
SetCaptionFont | Set Caption font from a combination of fontname, size, style, colour
SetCellSize | Set Cellsize (width,height) from a single value or X value and Y value pair
SetChartBackground | Set Chart background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetChartName | Assign a non-default name to the current chart
SetColors | Set a color or an array of colors to be used by upcoming series
SetContourStyle | Set Contour format from any reasonable combination of lineColor, lineStyle and lineWidth
SetContourTagFont | Set ContourTag font from a combination of fontname, size, style, colour
SetDataWindow | Set Window for data given an array of values or a single value
SetDatumLineStyle | Set DatumLine style from any reasonable combination of lineColor, lineStyle and lineWidth
SetDatumLineTags | Set Datumline tags from a delimited string or a string array
SetDatumTagFont | Set DatumTag font from a combination of fontname, size, style, colour
SetEdgeStyle | Set Edge format from any reasonable combination of lineColor, lineStyle and lineWidth
SetEffects | Set Effect cycle – string or string array
SetEquationNumericFormat | Set Equation numeric format from a simple string or an array of strings
SetEquationPosition | Set Equation position from a single value or X value and Y value pair
SetFillStyles | Set a fill-style or an array of fill-styles for use by upcoming series Set an array of fill-styles for use by upcoming series
SetFootnoteFont | Set Footnote font from a combination of fontname, size, style, colour
SetFrameBackground | Set Frame background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetGridLineStyle | Set Gridline format from any reasonable combination of lineColor, lineStyle and lineWidth
SetHeadingFont | Set Heading font from a combination of fontname, size, style, colour
SetHeadingNudge | Set Heading nudge(x,y) from given displacements
SetIDataRange | Set Inner data range given an array of numbers or a single value
SetILabelFont | Set Inner label font from a combination of fontname, size, style, colour
SetILabels | Set Inner axis labels from a simple string or an array of strings
SetIRange | Set Inner axis range range given maximum and optional minimum values
SetITickMarks | Set Inner axis tick marks given an array of numbers or a single value
SetIZones | Set Inner axis zones given one or more Zone definitions
SetKeyBackground | Set Key background fill from any reasonable combination of fillColor, fillStyle and edgeWidth
SetKeyFont | Set Key font from a combination of fontname, size, style, colour
SetKeyFrame | Key frame (ltwh in pts) Frame given top corner and size
SetKeyIndices | Set Key indices given an array of values or a single value
SetKeyNudge | Set Key box nudge from given displacements
SetKeyText | Set Legend texts for key from a delimited string or a string array
SetLabelFont | Set Label font from a combination of fontname, size, style, colour
SetLabelMask | Set Label mask from a mask (always treated as flags)
SetLineStyles | Set a Line-style or an array of line-styles to be used by upcoming series.
SetMargins | Set chart margins individually or as a group
SetMarkerColors | Set Marker Colors
SetMarkerScales | Set Marker scales given an array of numbers or a single value
SetMarkers | Set up a marker or an array of markers for upcoming series
SetModelSpan | Set Modelfit span range given maximum and optional minimum values
SetNetworkMapLinkArc | Set NetworkMap Link Arc given an array of numbers or a single value
SetNetworkMapSelfArc | Set NetworkMap Self Arc given an array of numbers or a single value
SetNewline | Set Newline to any single character
SetNoteBackground | Set Note background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetNoteFont | Set Note font from a combination of fontname, size, style, colour
SetNoteNudge | Set Note nudge from given displacements
SetOrderOfFit | Order of fit for x and y axes (3D charts or contour plots)
SetPageLabels | Set Page-labels from a simple string or an array of strings
SetParityLimitStyle | Set Parity limit style from any reasonable combination of lineColor, lineStyle and lineWidth
SetParityLineStyle | Set Parity axis style from any reasonable combination of lineColor, lineStyle and lineWidth
SetParityZoneStyle | Set Parity zone style from any reasonable combination of fillColor, fillStyle and edgeWidth
SetPenWidths | Set a line-width or an array of line-widths for use by upcoming data series
SetPieCenter | Set Pie centre (xy) from a single value or X value and Y value pair
SetSelection | Set Selection mask for data from a mask (always treated as flags)
SetSeriesNames | Assign a list of names to the upcoming data series
SetSubheadingFont | Set Subheading font from a combination of fontname, size, style, colour
SetTablePosition | Set Table position and size from x,y and optional width and height
SetTowerFillStyles | Tower ptns (top,face,edge) for Walls and towers (single value sets all three)
SetTrellis | Makes a trellis specification from a cell count or cell layout
SetValueFont | Set Value tag font from a combination of fontname, size, style, colour
SetValueNudge | Set Value nudge from a pair of displacements or matching arrays
SetValueTags | Set Value tags from a delimited string or a string array
SetViewpoint | Set 3D viewpoint given a set of roll,pitch,yaw values in degrees
SetWallFillStyles | Wall patterns (YZ,XZ,XY) for Walls and towers (single value sets all three)
SetWeightings | Set Weights for modelfit given an array of numbers or a single value
SetXCaptionFont | Set X Caption font from a combination of fontname, size, style, colour
SetXDataRange | Set X data range given an array of numbers or a single value
SetXDatumLines | Set X datum line(s) given an array of numbers or a single value
SetXGridLines | Set X gridline(s) given an array of numbers or a single value
SetXLabelFont | Set X label font from a combination of fontname, size, style, colour
SetXLabelNudge | Set X-label nudge from given displacements
SetXLabels | Set X labels from a delimited string or a string array
SetXRange | Set X axis range range given maximum and optional minimum values
SetXTickLengths | Set X tick lengths given an array of numbers or a single value
SetXTickMarks | Define X tick marks as intervals or an explicit array giving irregular settings
SetXZones | Set X zone given one or more Zone definitions
SetYCaptionFont | Set Y Caption font from a combination of fontname, size, style, colour
SetYDataRange | Set Y data range given an array of numbers or a single value
SetYDatumLines | Set Y datum line(s) given an array of numbers or a single value
SetYGridLines | Set Y gridline(s) given an array of numbers or a single value
SetYLabelFont | Set Y label font from a combination of fontname, size, style, colour
SetYLabelNudge | Set Y-label nudge from given displacements
SetYLabels | Set Y labels from a delimited string or a string array
SetYRange | Set Y axis range range given maximum and optional minimum values
SetYTickLengths | Set Y-tick lengths given an array of numbers or a single value
SetYTickMarks | Define Y tick marks as intervals or an explicit array giving irregular settings
SetYZones | Set Y zone given one or more Zone definitions
SetZCaptionFont | Set Z Caption font from a combination of fontname, size, style, colour
SetZDataRange | Set Z data range given an array of numbers or a single value
SetZDatumLines | Set Z datum line(s) given an array of numbers or a single value
SetZLabelFont | Set Z label font from a combination of fontname, size, style, colour
SetZLabels | Set Z labels from a simple string or an array of strings
SetZRange | Set Z axis range range given maximum and optional minimum values
SetZTickMarks | Define Z tick marks as intervals or an explicit array giving irregular settings
SetZZones | Set Z zone given one or more Zone definitions
SplitBy | Split by unique values
UseCmyk | Use a color defined by 4 inks (Cyan, Magenta, Yellow, Black) rather than RGB intensities (Red, Green, Blue)

SharpPlot Instance Properties

AltitudeMatrixStyle | AltitudeMatrix style
Backlog | Logging of API calls
BarChartStyle | Barchart style
BarEdgeNib | Bar edge line-width
BarLimit | Maximum bars allowed (deprecated – use TileLimit instead)
Baseline | Baseline for shading
BoxPlotStyle | Boxplot style
BubbleChartStyle | Bubblechart style
CaptionLineSpacing | Caption linespacing
CaptionStyle | Caption style
ChartChanged | Chart changed delegate
ClassInterval | Class interval
CloudChartStyle | Cloudchart style
ContourPlotStyle | Contourplot style
Correlation | Get Correlation of model fit (ReadOnly)
DataStyle | Data style
DatumTagFormat | Datum tag format
DatumTagStyle | Datum tag style
DialChartStyle | Dialchart style
Equation | Get Equation text (ReadOnly)
EquationFormat | Equation format
EquationIndex | Equation index
EquationStyle | Equation style
Flexibility | Flexibility
Footnote | Footnote text
FootnoteLineSpacing | Footnote linespacing
FootnoteStyle | Footnote style
FrameStyle | Frame style
GanttChartStyle | Ganttchart style
Gap | Inter-bar gap
GroupGap | Inter-group gap
Gutter | Gutter
Heading | Heading text
HeadingLineSpacing | Heading linespacing
HeadingStyle | Heading style
HistogramStyle | Histogram style
IAllowance | Inner axis allowance
IAxisStyle | Inner axis style
IIntercept | Inner axis intercept
ILabelFormat | Inner axis picture format
ITickStyle | Inner axis tickmark style
IndexOrigin | Index origin
InnerGap | Get Interbar spacing (ReadOnly)
Jitter | Jitter
KeyFormat | Key picture format
KeyGap | Key gap
KeyLimit | Keys used in this legend
KeyLineSpacing | Key linespacing
KeyStyle | Key style
LabelLineSpacing | Label linespacing
LabelStyle | Label style
LineGraphStyle | Linegraph style
LineLimit | Maximum lines allowed
MarginBottom | Bottom margin (pts)
MarginLeft | Left margin (pts)
MarginRight | Right margin (pts)
MarginTop | Top margin (pts)
MarkerLimit | Maximum markers allowed
MeshDensity | Density of mesh
MinMaxChartStyle | MinMax style
MissingColor | Color for MissingValue
MissingValue | Missing value indicator
ModelFitKey | Modelfit gets a key
NetworkMapStartAngle | NetworkMap Start Angle
NetworkMapStyle | NetworkMap style
NotApplicableText | "Not Applicable" Filler
NoteLineSpacing | Note linespacing
NoteStyle | Note style
Page | Number of current page, starting at 1 (ReadOnly)
Pages | Number of non-empty pages of the report so far (ReadOnly)
ParityStyle | Parity style
ParityTolerance | Parity limit as percentage
Perspective | 3D perspective
PieChartStyle | Piechart style
PieRadius | Pie radius
PieStartAngle | Pie start angle
PixelLimit | Maximum pixels allowed
PolarChartStyle | Polarchart style
ResetOption | Reset options
ResponsePlotStyle | Response style
ScalebarStyle | Scalebar style
ScatterPlotStyle | Scatterplot style
SeriesKey | Series gets a key
SoftHyphen | Soft hyphen
StepChartStyle | Stepchart style
Subheading | Subheading text
TableStyle | Tablechart style
Tease | Tease
TextLimit | Maximum text items allowed
TickMarkWidth | Tickmark width
TileLimit | Maximum tiles allowed
TitleBar | Title bar text
TowerAspect | Tower aspect
TowerChartStyle | Towerchart style
TowerLimit | Tower limit (deprecated – use TileLimit instead)
TraceChartStyle | Traceplot style
TreeMapStyle | TreeMap style
TrellisStyle | Trellis style
TrendLineKey | Trendline gets a key
TriangleStyle | Triangle style
ValueLineSpacing | Value linespacing
ValueTagAngle | Value tag angle (degrees)
ValueTagFormat | Value picture format
ValueTagStyle | Value tag style
VectorStyle | Vector style
VennDiagramStyle | VennDiagram style
Version | Get SharpPlot Version
VmlHeader | Standard header code for VML webpage
WalkSort | Get Walksort for trees (ReadOnly)
XAxisLength | Get Calculated X Axis length (ReadOnly)
XAxisStyle | X axis style
XBarChartStyle | X-Bar style (shared)
XCaption | X captions (left,right)
XCaptionFormat | X Caption format
XDateFormat | Date picture (X axis)
XDatumThreshold | X datum threshold
XFactor | X labelling factor
XGridThreshold | X grid threshold
XIntercept | X intercept (Y target)
XLabelAngle | X label angle (degrees)
XLabelFormat | X picture format
XTickStyle | X tickmark style
XTimeFormat | Time fmt (X-axis) HH:MM
XTrackFormat | X-tracker format
YAxisLength | Get Calculated Y axis length (ReadOnly)
YAxisStyle | Y axis style
YCaption | Y captions (bottom,top)
YCaptionFormat | Y Caption format
YDateFormat | Date picture (Y axis)
YDatumThreshold | Y datum threshold
YFactor | Y labelling factor
YGridThreshold | Y grid threshold
YIntercept | Y intercept (X target)
YLabelFormat | Y picture format
YTickStyle | Y tickmark style
YTimeFormat | Time fmt (Y-axis) HH:MM
YTrackFormat | Y-tracker format
ZAxisStyle | Z axis style
ZCaption | Z caption (top only)
ZCaptionFormat | Z Caption format
ZFactor | Z labelling factor
ZLabelFormat | Z picture format
ZTickStyle | Z tickmark style

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: SharpPlot Members

SharpPlot Members

Constructors

  • public SharpPlot();
  • public SharpPlot(double width, double height);
  • public SharpPlot(double[] papersize);

SharpPlot Instance Properties

AltitudeMatrixStyle | AltitudeMatrix style
Backlog | Logging of API calls
BarChartStyle | Barchart style
BarEdgeNib | Bar edge line-width
BarLimit | Maximum bars allowed (deprecated – use TileLimit instead)
Baseline | Baseline for shading
BoxPlotStyle | Boxplot style
BubbleChartStyle | Bubblechart style
CaptionLineSpacing | Caption linespacing
CaptionStyle | Caption style
ChartChanged | Chart changed delegate
ClassInterval | Class interval
CloudChartStyle | Cloudchart style
ContourPlotStyle | Contourplot style
Correlation | Get Correlation of model fit (ReadOnly)
DataStyle | Data style
DatumTagFormat | Datum tag format
DatumTagStyle | Datum tag style
DialChartStyle | Dialchart style
Equation | Get Equation text (ReadOnly)
EquationFormat | Equation format
EquationIndex | Equation index
EquationStyle | Equation style
Flexibility | Flexibility
Footnote | Footnote text
FootnoteLineSpacing | Footnote linespacing
FootnoteStyle | Footnote style
FrameStyle | Frame style
GanttChartStyle | Ganttchart style
Gap | Inter-bar gap
GroupGap | Inter-group gap
Gutter | Gutter
Heading | Heading text
HeadingLineSpacing | Heading linespacing
HeadingStyle | Heading style
HistogramStyle | Histogram style
IAllowance | Inner axis allowance
IAxisStyle | Inner axis style
IIntercept | Inner axis intercept
ILabelFormat | Inner axis picture format
ITickStyle | Inner axis tickmark style
IndexOrigin | Index origin
InnerGap | Get Interbar spacing (ReadOnly)
Jitter | Jitter
KeyFormat | Key picture format
KeyGap | Key gap
KeyLimit | Keys used in this legend
KeyLineSpacing | Key linespacing
KeyStyle | Key style
LabelLineSpacing | Label linespacing
LabelStyle | Label style
LineGraphStyle | Linegraph style
LineLimit | Maximum lines allowed
MarginBottom | Bottom margin (pts)
MarginLeft | Left margin (pts)
MarginRight | Right margin (pts)
MarginTop | Top margin (pts)
MarkerLimit | Maximum markers allowed
MeshDensity | Density of mesh
MinMaxChartStyle | MinMax style
MissingColor | Color for MissingValue
MissingValue | Missing value indicator
ModelFitKey | Modelfit gets a key
NetworkMapStartAngle | NetworkMap Start Angle
NetworkMapStyle | NetworkMap style
NotApplicableText | "Not Applicable" Filler
NoteLineSpacing | Note linespacing
NoteStyle | Note style
Page | Number of current page, starting at 1 (ReadOnly)
Pages | Number of non-empty pages of the report so far (ReadOnly)
ParityStyle | Parity style
ParityTolerance | Parity limit as percentage
Perspective | 3D perspective
PieChartStyle | Piechart style
PieRadius | Pie radius
PieStartAngle | Pie start angle
PixelLimit | Maximum pixels allowed
PolarChartStyle | Polarchart style
ResetOption | Reset options
ResponsePlotStyle | Response style
ScalebarStyle | Scalebar style
ScatterPlotStyle | Scatterplot style
SeriesKey | Series gets a key
SoftHyphen | Soft hyphen
StepChartStyle | Stepchart style
Subheading | Subheading text
TableStyle | Tablechart style
Tease | Tease
TextLimit | Maximum text items allowed
TickMarkWidth | Tickmark width
TileLimit | Maximum tiles allowed
TitleBar | Title bar text
TowerAspect | Tower aspect
TowerChartStyle | Towerchart style
TowerLimit | Tower limit (deprecated – use TileLimit instead)
TraceChartStyle | Traceplot style
TreeMapStyle | TreeMap style
TrellisStyle | Trellis style
TrendLineKey | Trendline gets a key
TriangleStyle | Triangle style
ValueLineSpacing | Value linespacing
ValueTagAngle | Value tag angle (degrees)
ValueTagFormat | Value picture format
ValueTagStyle | Value tag style
VectorStyle | Vector style
VennDiagramStyle | VennDiagram style
Version | Get SharpPlot Version
VmlHeader | Standard header code for VML webpage
WalkSort | Get Walksort for trees (ReadOnly)
XAxisLength | Get Calculated X Axis length (ReadOnly)
XAxisStyle | X axis style
XBarChartStyle | X-Bar style (shared)
XCaption | X captions (left,right)
XCaptionFormat | X Caption format
XDateFormat | Date picture (X axis)
XDatumThreshold | X datum threshold
XFactor | X labelling factor
XGridThreshold | X grid threshold
XIntercept | X intercept (Y target)
XLabelAngle | X label angle (degrees)
XLabelFormat | X picture format
XTickStyle | X tickmark style
XTimeFormat | Time fmt (X-axis) HH:MM
XTrackFormat | X-tracker format
YAxisLength | Get Calculated Y axis length (ReadOnly)
YAxisStyle | Y axis style
YCaption | Y captions (bottom,top)
YCaptionFormat | Y Caption format
YDateFormat | Date picture (Y axis)
YDatumThreshold | Y datum threshold
YFactor | Y labelling factor
YGridThreshold | Y grid threshold
YIntercept | Y intercept (X target)
YLabelFormat | Y picture format
YTickStyle | Y tickmark style
YTimeFormat | Time fmt (Y-axis) HH:MM
YTrackFormat | Y-tracker format
ZAxisStyle | Z axis style
ZCaption | Z caption (top only)
ZCaptionFormat | Z Caption format
ZFactor | Z labelling factor
ZLabelFormat | Z picture format
ZTickStyle | Z tickmark style

SharpPlot Methods

AddAttributes | Insert arbitrary content in the XML output for known text items
AddBookmark | Bookmark this page with name, level, openflag and weblink
AddComment | Insert a note with optional id and compression switch
AddEffect | Allow user to associate arbitrary SVG/XAML with any standard text item or subitem
AddHints | Apply an array of hints to a set of text items
AddHyperlinks | Apply an array of links to a set of text items
AddJavaPrologue | Include the definition of a JavaScript function in the output chart
AddTableShading | Add a combination of Color and Fill to an individual table cell
AddTips | Apply an array of tips to a set of text items
DefineFont | Create a definition for a font, including CSS details and PostScript name
DrawBarChart | Draws a grouped or stacked barchart from an array of arrays of values
DrawBoxPlot | Construct compound box-whisker plot from a data array and two integer category arrays
DrawBubbleChart | Scatterplot from 2 arrays of data with markers scaled by 3rd array
DrawCloudChart | 3D Scatter from x,y and multiple z values
DrawContourPlot | Contour plot from 3 arrays of double values
DrawDialChart | Draw a dial or gauge from data and pointer radii
DrawFrame | Draw current frame, with any fixed text such as headings and footnotes
DrawGanttChart | Gantt chart from 3 double arrays of Y-values, X-start and X-end values
DrawHistogram | Construct a histogram from a floating-point vector
DrawImage | Add an image to a chart
DrawKey | This will draw and clear any pending keys, using the current setting of key text.
DrawLineGraph | Construct plot from array of arrays of y values and x-values
DrawMinMaxChart | Create hi-lo plot from arrays of max,min and optional axis values
DrawMultiple | Multiple plot from double array of arrays of y-values versus double x-values
DrawNetworkMap | Draw a network of nodes and their link strengths
DrawNote | Write text note given text, position, angle and maximum width
DrawPieChart | Piechart from data and sector explosions
DrawPolarChart | Polar plot from multiple series and times or angles
DrawPolygon | Draw polygon from x and y coordinates, with optional Color, FillStyle, line width and LineStyle
DrawResponsePlot | Draw 3D grid, and construct surface from multiple vectors of zValues giving rows and columns
DrawScatterPlot | Make a scatter plot from x and y data
DrawStepChart | Stepped line from arrays of height data and step-start values
DrawTable | Build a table from an array of arrays of strings, giving cells in columns
DrawTowerChart | Tower chart from an array of arrays of height values
DrawTraceChart | Draw a set of parallel traces from an array of arrays of Y-values and an array of X-values
DrawTreeMap | Draw a treemap of a vector of items (may be paired with depth vector or a triplet of value,depth,altitude)
DrawTriangle | Construct triangle chart from data (3 series giving proportions or counts)
DrawVectors | Vector plot from 4 series of x y x y
DrawVennDiagram | Draw a Venn diagram using supplied membership data
DrawXBarChart | XBarchart from multiple data series and x-values
FindExtremes | Determines the extreme values from an array of data, allowing for the ‘Curves’ style
GetAltitudeColors | Get the array of colors used in Altitude Colors
GetCharsets | Return the list of used characters for each used font
GetCoefficients | Coefficients of model fit
GetColors | Get the array of colors used by upcoming series
GetFillStyles | Get an array of fill-styles used by upcoming series
GetFittedValues | Fitted values from model
GetITickPositions | Calculated Inner ticks
GetKeyBoxes | Get bounding boxes of the latest round of drawn Keys
GetKeyIndices | Get int[] setting for Key indices
GetLabelMask | Label mask
GetLineStyles | Get the array of line-styles to be used by upcoming series.
GetMarkerColors | Get the array of colors used in Marker Colors
GetMarkers | Get the array of markers for upcoming series
GetNetworkMapLinkArc | NetworkMap Link Arc
GetNetworkMapSelfArc | NetworkMap Self Arc
GetPaperSize | Get paper size as a 2-item double vector (width height)
GetPenWidths | Get the array of line-widths for upcoming series
GetResiduals | Residuals from modelfit
GetTextSize | Get text width and height in points
GetTrellisBoxes | Get the current trellis boxes as a list of (x y x y) coordinates
GetViewpoint | Get 3D viewpoint given a set of roll,pitch,yaw values in degrees
GetXTickPositions | Calculated X tickmarks
GetYTickPositions | Calculated Y tickmarks
GetZTickPositions | Calculated Z tickmarks
GroupBy | Group by unique values
IncludeSource | Add arbitrary (SVG/EPS) content to beginning or end of output stream
MapCoords | Maps a matched pair of (x,y) co-ordinate arrays to points
NewCell | Move to the next cell in the current trellis.
NewFrame | Clear the area for a new chart with new frame size and position.
NewPage | Move on to next page
NewYAxis | Partial reset to allow independent secondary Y-axis
NextNote | Returns the correct position for the next note text allowing given extra space in pts
ReadComment | Recover comments saved to file in any output format or passed as a string
ReadPdfStream | Recover any page from an encoded PDF
RedrawAxes | Overdraws the axes with optional framing
RenderAnimatedSvg | Return chart rendered as animated SVG, with one frame per page
RenderBitmap | Return completed chart rendered through raster engine as a Bitmap object
RenderChartLog | Return completed chart as a readable log
RenderDocument | Return completed chart as a Document instance
RenderEps | Return completed chart rendered as Encapsulated PostScript
RenderImageMap | Return tags to make an HTML imagemap for completed chart
RenderJsonChartMap | Return JSON arrays to make a map for entire chart
RenderMetafile | Return or stream completed chart as one of the Extended Metafile formats
RenderPS | Return completed chart rendered as raw PostScript
RenderPageMap | Return an instance of the PageMap class to allow active graphics applications with completed chart
RenderPdf | Return completed chart as a PDF stream
RenderSvg | Return completed chart rendered as SVG
RenderVml | Return completed chart as a VML string
RenderXaml | Return completed chart rendered as a XAML Canvas
Reset | Clear SharpPlot taking optional paper size (width,height in pts)
ResetKey | Removes any accumulated key definitions
ResetProperties | All properties except trellis definitions are returned to default values.
SaveAnimatedGif | Save chart rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save chart to named file as animated SVG, with one frame per page
SaveChartLog | Save completed chart as a readable log file
SaveEps | Save completed chart to named file as Encapsulated PostScript
SaveImage | Save completed chart rendered through raster engine as an image file
SavePS | Save completed chart to named file as raw PostScript
SavePdf | Save completed chart to named file as PDF
SaveSvg | Save completed chart to named file as SVG
SaveVml | Save chart to named file as VML, optionally wrapped into HTML
SaveXaml | Save completed chart to named file as a XAML Canvas
SetAltitudeColors | Set Altitude Colors
SetArrowStyle | Set Arrow format from Arrow size, with optional sweep angle and fill pattern
SetAxesScales | Set Axes scales given an array of numbers or a single value
SetAxisStyle | Set Axis format from any reasonable combination of lineColor, lineStyle and lineWidth
SetBackground | Set Paper from any reasonable combination of fillColor, fillStyle and edgeWidth
SetBarWidths | Set Bar widths given an array of numbers or a single value
SetBaselineStyle | Set Baseline format from any reasonable combination of lineColor, lineStyle and lineWidth
SetCaptionFont | Set Caption font from a combination of fontname, size, style, colour
SetCellSize | Set Cellsize (width,height) from a single value or X value and Y value pair
SetChartBackground | Set Chart background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetChartName | Assign a non-default name to the current chart
SetColors | Set a color or an array of colors to be used by upcoming series
SetContourStyle | Set Contour format from any reasonable combination of lineColor, lineStyle and lineWidth
SetContourTagFont | Set ContourTag font from a combination of fontname, size, style, colour
SetDataWindow | Set Window for data given an array of values or a single value
SetDatumLineStyle | Set DatumLine style from any reasonable combination of lineColor, lineStyle and lineWidth
SetDatumLineTags | Set Datumline tags from a delimited string or a string array
SetDatumTagFont | Set DatumTag font from a combination of fontname, size, style, colour
SetEdgeStyle | Set Edge format from any reasonable combination of lineColor, lineStyle and lineWidth
SetEffects | Set Effect cycle – string or string array
SetEquationNumericFormat | Set Equation numeric format from a simple string or an array of strings
SetEquationPosition | Set Equation position from a single value or X value and Y value pair
SetFillStyles | Set a fill-style or an array of fill-styles for use by upcoming series Set an array of fill-styles for use by upcoming series
SetFootnoteFont | Set Footnote font from a combination of fontname, size, style, colour
SetFrameBackground | Set Frame background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetGridLineStyle | Set Gridline format from any reasonable combination of lineColor, lineStyle and lineWidth
SetHeadingFont | Set Heading font from a combination of fontname, size, style, colour
SetHeadingNudge | Set Heading nudge(x,y) from given displacements
SetIDataRange | Set Inner data range given an array of numbers or a single value
SetILabelFont | Set Inner label font from a combination of fontname, size, style, colour
SetILabels | Set Inner axis labels from a simple string or an array of strings
SetIRange | Set Inner axis range range given maximum and optional minimum values
SetITickMarks | Set Inner axis tick marks given an array of numbers or a single value
SetIZones | Set Inner axis zones given one or more Zone definitions
SetKeyBackground | Set Key background fill from any reasonable combination of fillColor, fillStyle and edgeWidth
SetKeyFont | Set Key font from a combination of fontname, size, style, colour
SetKeyFrame | Key frame (ltwh in pts) Frame given top corner and size
SetKeyIndices | Set Key indices given an array of values or a single value
SetKeyNudge | Set Key box nudge from given displacements
SetKeyText | Set Legend texts for key from a delimited string or a string array
SetLabelFont | Set Label font from a combination of fontname, size, style, colour
SetLabelMask | Set Label mask from a mask (always treated as flags)
SetLineStyles | Set a Line-style or an array of line-styles to be used by upcoming series.
SetMargins | Set chart margins individually or as a group
SetMarkerColors | Set Marker Colors
SetMarkerScales | Set Marker scales given an array of numbers or a single value
SetMarkers | Set up a marker or an array of markers for upcoming series
SetModelSpan | Set Modelfit span range given maximum and optional minimum values
SetNetworkMapLinkArc | Set NetworkMap Link Arc given an array of numbers or a single value
SetNetworkMapSelfArc | Set NetworkMap Self Arc given an array of numbers or a single value
SetNewline | Set Newline to any single character
SetNoteBackground | Set Note background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetNoteFont | Set Note font from a combination of fontname, size, style, colour
SetNoteNudge | Set Note nudge from given displacements
SetOrderOfFit | Order of fit for x and y axes (3D charts or contour plots)
SetPageLabels | Set Page-labels from a simple string or an array of strings
SetParityLimitStyle | Set Parity limit style from any reasonable combination of lineColor, lineStyle and lineWidth
SetParityLineStyle | Set Parity axis style from any reasonable combination of lineColor, lineStyle and lineWidth
SetParityZoneStyle | Set Parity zone style from any reasonable combination of fillColor, fillStyle and edgeWidth
SetPenWidths | Set a line-width or an array of line-widths for use by upcoming data series
SetPieCenter | Set Pie centre (xy) from a single value or X value and Y value pair
SetSelection | Set Selection mask for data from a mask (always treated as flags)
SetSeriesNames | Assign a list of names to the upcoming data series
SetSubheadingFont | Set Subheading font from a combination of fontname, size, style, colour
SetTablePosition | Set Table position and size from x,y and optional width and height
SetTowerFillStyles | Tower ptns (top,face,edge) for Walls and towers (single value sets all three)
SetTrellis | Makes a trellis specification from a cell count or cell layout
SetValueFont | Set Value tag font from a combination of fontname, size, style, colour
SetValueNudge | Set Value nudge from a pair of displacements or matching arrays
SetValueTags | Set Value tags from a delimited string or a string array
SetViewpoint | Set 3D viewpoint given a set of roll,pitch,yaw values in degrees
SetWallFillStyles | Wall patterns (YZ,XZ,XY) for Walls and towers (single value sets all three)
SetWeightings | Set Weights for modelfit given an array of numbers or a single value
SetXCaptionFont | Set X Caption font from a combination of fontname, size, style, colour
SetXDataRange | Set X data range given an array of numbers or a single value
SetXDatumLines | Set X datum line(s) given an array of numbers or a single value
SetXGridLines | Set X gridline(s) given an array of numbers or a single value
SetXLabelFont | Set X label font from a combination of fontname, size, style, colour
SetXLabelNudge | Set X-label nudge from given displacements
SetXLabels | Set X labels from a delimited string or a string array
SetXRange | Set X axis range range given maximum and optional minimum values
SetXTickLengths | Set X tick lengths given an array of numbers or a single value
SetXTickMarks | Define X tick marks as intervals or an explicit array giving irregular settings
SetXZones | Set X zone given one or more Zone definitions
SetYCaptionFont | Set Y Caption font from a combination of fontname, size, style, colour
SetYDataRange | Set Y data range given an array of numbers or a single value
SetYDatumLines | Set Y datum line(s) given an array of numbers or a single value
SetYGridLines | Set Y gridline(s) given an array of numbers or a single value
SetYLabelFont | Set Y label font from a combination of fontname, size, style, colour
SetYLabelNudge | Set Y-label nudge from given displacements
SetYLabels | Set Y labels from a delimited string or a string array
SetYRange | Set Y axis range range given maximum and optional minimum values
SetYTickLengths | Set Y-tick lengths given an array of numbers or a single value
SetYTickMarks | Define Y tick marks as intervals or an explicit array giving irregular settings
SetYZones | Set Y zone given one or more Zone definitions
SetZCaptionFont | Set Z Caption font from a combination of fontname, size, style, colour
SetZDataRange | Set Z data range given an array of numbers or a single value
SetZDatumLines | Set Z datum line(s) given an array of numbers or a single value
SetZLabelFont | Set Z label font from a combination of fontname, size, style, colour
SetZLabels | Set Z labels from a simple string or an array of strings
SetZRange | Set Z axis range range given maximum and optional minimum values
SetZTickMarks | Define Z tick marks as intervals or an explicit array giving irregular settings
SetZZones | Set Z zone given one or more Zone definitions
SplitBy | Split by unique values
UseCmyk | Use a color defined by 4 inks (Cyan, Magenta, Yellow, Black) rather than RGB intensities (Red, Green, Blue)


SharpPlot 3.71 User Manual: SharpPlot Constructor

SharpPlot Constructor

Initialize a new instance of the SharpPlot class with default paper size (432 pts wide by 324 points high):

public SharpPlot();

Overloads

  • public SharpPlot();
  • public SharpPlot(double width, double height);
  • public SharpPlot(double[] papersize);

Examples

Constructor for SharpPlot taking paper size (width,height in pts) which determines the SVG viewbox, the size of an image rendered at default dpi, and so on.

sp = new SharpPlot(600,300);

This will also set the default chart frame to (0,300,600,300) to occupy all the available area. Call NewFrame to create a chart frame anywhere within the defined area of the paper.

Paper size can be specified as double[] {width,height} as produced by the PaperSize structure.

sp = new SharpPlot(PaperSize.Landscape(PaperSize.A5)));

Uses a Landscape A5 paper.

See also ...

SharpPlot.Reset Method | SharpPlot.SetBackground Method


SharpPlot 3.71 User Manual: Constructor Method

Constructor Method

Use default paper size (6 by 4.5 inches).

public SharpPlot();

See also ...

SharpPlot Members | SharpPlot Constructor


SharpPlot 3.71 User Manual: Constructor Method (Double,Double)

Constructor Method (Double,Double)

Use specified paper size in points.

public SharpPlot(
    double width,
    double height
);

See also ...

SharpPlot Members | SharpPlot Constructor


SharpPlot 3.71 User Manual: Constructor Method (Double[])

Constructor Method (Double[])

Use specified paper size in points as {width,height} (see PaperSize structure).

public SharpPlot(
    double[] papersize
);

See also ...

SharpPlot Members | SharpPlot Constructor


SharpPlot 3.71 User Manual: SharpPlot Properties

SharpPlot Properties

The properties of the SharpPlot class are listed below.

SharpPlot Instance Properties

AltitudeMatrixStyle | AltitudeMatrix style
Backlog | Logging of API calls
BarChartStyle | Barchart style
BarEdgeNib | Bar edge line-width
BarLimit | Maximum bars allowed (deprecated – use TileLimit instead)
Baseline | Baseline for shading
BoxPlotStyle | Boxplot style
BubbleChartStyle | Bubblechart style
CaptionLineSpacing | Caption linespacing
CaptionStyle | Caption style
ChartChanged | Chart changed delegate
ClassInterval | Class interval
CloudChartStyle | Cloudchart style
ContourPlotStyle | Contourplot style
Correlation | Get Correlation of model fit (ReadOnly)
DataStyle | Data style
DatumTagFormat | Datum tag format
DatumTagStyle | Datum tag style
DialChartStyle | Dialchart style
Equation | Get Equation text (ReadOnly)
EquationFormat | Equation format
EquationIndex | Equation index
EquationStyle | Equation style
Flexibility | Flexibility
Footnote | Footnote text
FootnoteLineSpacing | Footnote linespacing
FootnoteStyle | Footnote style
FrameStyle | Frame style
GanttChartStyle | Ganttchart style
Gap | Inter-bar gap
GroupGap | Inter-group gap
Gutter | Gutter
Heading | Heading text
HeadingLineSpacing | Heading linespacing
HeadingStyle | Heading style
HistogramStyle | Histogram style
IAllowance | Inner axis allowance
IAxisStyle | Inner axis style
IIntercept | Inner axis intercept
ILabelFormat | Inner axis picture format
ITickStyle | Inner axis tickmark style
IndexOrigin | Index origin
InnerGap | Get Interbar spacing (ReadOnly)
Jitter | Jitter
KeyFormat | Key picture format
KeyGap | Key gap
KeyLimit | Keys used in this legend
KeyLineSpacing | Key linespacing
KeyStyle | Key style
LabelLineSpacing | Label linespacing
LabelStyle | Label style
LineGraphStyle | Linegraph style
LineLimit | Maximum lines allowed
MarginBottom | Bottom margin (pts)
MarginLeft | Left margin (pts)
MarginRight | Right margin (pts)
MarginTop | Top margin (pts)
MarkerLimit | Maximum markers allowed
MeshDensity | Density of mesh
MinMaxChartStyle | MinMax style
MissingColor | Color for MissingValue
MissingValue | Missing value indicator
ModelFitKey | Modelfit gets a key
NetworkMapStartAngle | NetworkMap Start Angle
NetworkMapStyle | NetworkMap style
NotApplicableText | "Not Applicable" Filler
NoteLineSpacing | Note linespacing
NoteStyle | Note style
Page | Number of current page, starting at 1 (ReadOnly)
Pages | Number of non-empty pages of the report so far (ReadOnly)
ParityStyle | Parity style
ParityTolerance | Parity limit as percentage
Perspective | 3D perspective
PieChartStyle | Piechart style
PieRadius | Pie radius
PieStartAngle | Pie start angle
PixelLimit | Maximum pixels allowed
PolarChartStyle | Polarchart style
ResetOption | Reset options
ResponsePlotStyle | Response style
ScalebarStyle | Scalebar style
ScatterPlotStyle | Scatterplot style
SeriesKey | Series gets a key
SoftHyphen | Soft hyphen
StepChartStyle | Stepchart style
Subheading | Subheading text
TableStyle | Tablechart style
Tease | Tease
TextLimit | Maximum text items allowed
TickMarkWidth | Tickmark width
TileLimit | Maximum tiles allowed
TitleBar | Title bar text
TowerAspect | Tower aspect
TowerChartStyle | Towerchart style
TowerLimit | Tower limit (deprecated – use TileLimit instead)
TraceChartStyle | Traceplot style
TreeMapStyle | TreeMap style
TrellisStyle | Trellis style
TrendLineKey | Trendline gets a key
TriangleStyle | Triangle style
ValueLineSpacing | Value linespacing
ValueTagAngle | Value tag angle (degrees)
ValueTagFormat | Value picture format
ValueTagStyle | Value tag style
VectorStyle | Vector style
VennDiagramStyle | VennDiagram style
Version | Get SharpPlot Version
VmlHeader | Standard header code for VML webpage
WalkSort | Get Walksort for trees (ReadOnly)
XAxisLength | Get Calculated X Axis length (ReadOnly)
XAxisStyle | X axis style
XBarChartStyle | X-Bar style (shared)
XCaption | X captions (left,right)
XCaptionFormat | X Caption format
XDateFormat | Date picture (X axis)
XDatumThreshold | X datum threshold
XFactor | X labelling factor
XGridThreshold | X grid threshold
XIntercept | X intercept (Y target)
XLabelAngle | X label angle (degrees)
XLabelFormat | X picture format
XTickStyle | X tickmark style
XTimeFormat | Time fmt (X-axis) HH:MM
XTrackFormat | X-tracker format
YAxisLength | Get Calculated Y axis length (ReadOnly)
YAxisStyle | Y axis style
YCaption | Y captions (bottom,top)
YCaptionFormat | Y Caption format
YDateFormat | Date picture (Y axis)
YDatumThreshold | Y datum threshold
YFactor | Y labelling factor
YGridThreshold | Y grid threshold
YIntercept | Y intercept (X target)
YLabelFormat | Y picture format
YTickStyle | Y tickmark style
YTimeFormat | Time fmt (Y-axis) HH:MM
YTrackFormat | Y-tracker format
ZAxisStyle | Z axis style
ZCaption | Z caption (top only)
ZCaptionFormat | Z Caption format
ZFactor | Z labelling factor
ZLabelFormat | Z picture format
ZTickStyle | Z tickmark style

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Backlog Property

SharpPlot.Backlog Property

Enable logging of all SharpPlot API calls (disabled by default).

public bool Backlog {get; set;}

Example

sp.Backlog = true;

Description

All API calls (methods and properties setters) and their arguments will be inserted as human-readable comments into all vectorial output files (and not only the chart log).

The main purpose is to be able to re-create the exact script that built a chart, just from an output file, which otherwise might be hard to do if the software that elaborated the chart is complex.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: BarChartStyle Property

SharpPlot.BarChartStyle Property

Set Barchart style as any combination of allowed styles.

public BarChartStyles BarChartStyle {get; set;}

Example

sp.BarChartStyle = BarChartStyles.RelativeData | BarChartStyles.Horizontal;

Options

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FloatingBars | Floating bars (lowest bar of stack not drawn)
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
Logarithmic | Bars are drawn logarithmically
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
StackedBars | Stacked barcharts (data is accumulated)
TicksBetween | Tickmarks are drawn between bars or groups of bars
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawBarChart Method


SharpPlot 3.71 User Manual: BarEdgeNib Property

SharpPlot.BarEdgeNib Property

This property is deprecated, use SetEdgeStyle instead.

Set edge line-width for barcharts, gantt charts and Boxplots.

public double BarEdgeNib {get; set;}

Example

By default, all bars are edged in black with a 0.4pt line. To change this (or remove the edge)

sp.BarEdgeNib = 2.3;
sp.BarEdgeNib = 0;

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: Baseline Property

SharpPlot.Baseline Property

Set baseline to set a reference line from which the bars on barcharts hang, or from which surface charts are shaded.

public double Baseline {get; set;}

Example

sp.Baseline = 10;

The baseline is drawn with the current setting of the axis attributes, typically a black, medium-weight line. A typical use is for variance plots, where the bars are expected to run up and down from a zero line. For horizontal barcharts, the baseline is drawn vertically at the given x-value, and the bars are drawn left and right of it.

See also ...

SharpPlot Members | SharpPlot.SetBaselineStyle Method


SharpPlot 3.71 User Manual: BoxPlotStyle Property

SharpPlot.BoxPlotStyle Property

Set Boxplot style as any combination of allowed styles.

public BoxPlotStyles BoxPlotStyle {get; set;}

Example

sp.BoxPlotStyle = BoxPlotStyles.DecileWhiskers;

Options

CroppedAxes | Crops all chart elements at the axis boundary
DecileWhiskers | BoxWhisker indicates deciles with dotted lines
ErrorBars | Shows errorbars on Hi-Lo charts and boxplots
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Boxes are drawn horizontally
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
Plain | Omits median line from boxplots
TabularData | Array elements represent categories of data, not categorisations
TicksBetween | Tickmarks are drawn between bars or groups of bars

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: BubbleChartStyle Property

SharpPlot.BubbleChartStyle Property

Set Bubblechart style to any combination of flags.

public BubbleChartStyles BubbleChartStyle {get; set;}

Example

sp.BubbleChartStyle = BubbleChartStyles.Exploded;

Options

AltitudeShading | Altitude shading is used with contour plots, bubble charts and response surfaces
AnnotateModel | Annotate model with computed equation
Clipped | Clip axes and all lines and markers at chart edge
Contours | Draw contour lines across data points
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Lines | Datapoints are connected with lines
Logarithmic | All chart axes are drawn logarithmically
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoMarkers | Do not draw markers at data points
OnTopModel | Modelfit is drawn ontop of data
OverlayGrid | Gridlines are drawn ontop of data
RadialScaling | Bubble charts scale using radius rather than area
ScaleBar | Atlitude-shaded bubble chart adds a nominal Z-Axis
ValueTags | Value tags are written for data items


SharpPlot 3.71 User Manual: CaptionLineSpacing Property

SharpPlot.CaptionLineSpacing Property

Set Caption linespacing for multiline axis captions.

public double CaptionLineSpacing {get; set;}

Example

sp.CaptionLineSpacing = 120;

The pitch may be given as a percentage, a factor of the font size, or an absolute distance in points. The default value is 110% of the font size, use negative values here to have the number treated as points regardless.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: CaptionStyle Property

SharpPlot.CaptionStyle Property

Set Caption style to any allowed combination.

public CaptionStyles CaptionStyle {get; set;}

Example

sp.CaptionStyle = CaptionStyles.Flat;

Captions on 3D charts are normally angled to match the slope of the axis. The text may be more readable at small sizes if written horizontally.

Options

FlatText | Flat text is used for 3D captions
LeftAlign | Left aligned caption
NoWrap | Captions are not wrapped automatically.
RightAlign | Right aligned caption

See also ...

SharpPlot Members | SharpPlot.XCaption Property | SharpPlot.YCaption Property | SharpPlot.ZCaption Property


SharpPlot 3.71 User Manual: ChartChanged Property

SharpPlot.ChartChanged Property

Set ChartChanged delegate to run any suitable function.

public ChartChangedDelegate ChartChanged {get; set;}

Example

sp.ChartChanged += ChartWatcher;

SharpPlot will call your chosen delegate (which is passed the current instance as argument) whenever a redraw is required. This occurs whenever any of the DrawXxx functions is run, as well as at calls such as Reset.


SharpPlot 3.71 User Manual: ClassInterval Property

SharpPlot.ClassInterval Property

Set the Class interval for histograms.

A positive value gives the arithmetic interval between histogram bins (their width).

A negative values indicate the number of bins across the X axis.

The default is 0, letting SharpPlot make an intelligent judgement depending on the data you pass to DrawHistogram.

Intervals generally include their lower bound and exclude their upper bound, excepted for the last interval which includes the maximum value when ClassInterval is negative.

public double ClassInterval {get; set;}

Example

sp.ClassInterval = 10; // group data modulo ten
sp.SetXTickMarks(10); // set tickmarks accordingly

See also ...

SharpPlot Members | SharpPlot.DrawHistogram Method


SharpPlot 3.71 User Manual: CloudChartStyle Property

SharpPlot.CloudChartStyle Property

Set Cloudchart style to any allowed combination.

public CloudChartStyles CloudChartStyle {get; set;}

Example

sp.CloudChartStyle = CloudChartStyles.Risers | CloudChartStyles.Walls;

Options

AltitudeShading | Altitude shading is used with cloud chart
Contours | Draw contour lines across data points
ContourTags | Contour lines are tagged with height values
Curves | Points are joined with smooth curves rather than straight lines
Fine | Altitude shading interpolated in fine detail (slow for vectorial rendering)
FlatText | Flat labels and captions are used on 3D charts
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers (improves 3D effect on Cloud charts)
Indexed | Data is indexed to the initial value = 100
Lines | Datapoints are connected with lines
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoMarkers | No markers are drawn (turns off default)
ProjectContours | Contours are drawn on the xy-plane in 3D charts
Risers | Draw risers to data points from axis or fitted model
ScaleBar | Altitude-shaded cloud chart adds a nominal Z-Axis
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
TiledSurface | Tile surfaces on response plots
TrendSurface | Compute trend surface (2D Gaussian smooth)
WallShading | Shade walls on all 3D charts
XYPlot | First column gives the X-values for LinePlot

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: ContourPlotStyle Property

SharpPlot.ContourPlotStyle Property

Set Contour plot style to any combination of flags.

public ContourPlotStyles ContourPlotStyle {get; set;}

Example

sp.ContourPlotStyle = ContourPlotStyles.ForceZero|ContourPlotStyles.GridLines;

Options

AltitudeShading | Altitude shading is used with contour plot
Clipped | Clip axes and all lines and markers at chart edge
Coarse | No refinement is done to colors on altitude-shaded plots
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
Fine | Altitude shading interpolated in fine detail (slow for vectorial rendering)
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Lines | Datapoints are connected with lines
NoAxes | No axes are drawn on the chart
NoMarkers | Markers are not drawn at data points
NoTags | Contour lines are not tagged with height values
OverlayGrid | Gridlines are drawn ontop of data
ScaleBar | Altitude-shaded contour plot adds a nominal Z-Axis
ValueTags | Value tags are written for data items


SharpPlot 3.71 User Manual: Correlation Property (ReadOnly)

SharpPlot.Correlation Property (ReadOnly)

Get Correlation of model fit (ReadOnly).

public double Correlation {get;}

Example

double r2 = sp.Correlation^2; // squared correlation

See also ...

Annotate Model fit | SharpPlot Members | SharpPlot.GetCoefficients Method | SharpPlot.GetFittedValues Method | SharpPlot.GetResiduals Method


SharpPlot 3.71 User Manual: DataStyle Property

SharpPlot.DataStyle Property

Set the data style to any combination of flags.

public DataStyles DataStyle {get; set;}

Example

sp.DataStyle = DataStyles.Relative;

Options

Relative | Relative data (values are accumulated)
Rows | Series are presented in rows, not columns


SharpPlot 3.71 User Manual: DatumTagFormat Property

SharpPlot.DatumTagFormat Property

Set picture format for Datumline tags.

public string DatumTagFormat {get; set;}

Example

sp.DatumTagFormat = "##0%";

To show the numbers with a trailing % symbol and not more than 3 digits.

See also ...

SharpPlot Members | SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: DatumTagStyle Property

SharpPlot.DatumTagStyle Property

Datum tag style.

public DatumTagStyles DatumTagStyle {get; set;}

Options

AtEnd | All tags are written centered at the chosen end of the line
Bottom | X-Tags are moved to the bottom of the line
Left | Y-Tags are moved to the left end of the line
Right | Y-Tags are moved to the right end of the line
Top | X-Tags are moved to the top of the line

See also ...

SharpPlot Members | SharpPlot.SetDatumLineTags Method | DatumTagStyles Enumeration


SharpPlot 3.71 User Manual: DialChartStyle Property

SharpPlot.DialChartStyle Property

Set Dialchart style.

public DialChartStyles DialChartStyle {get; set;}

Example

sp.DialChartStyle = DialChartStyles.WedgeZones;

Options

Anticlockwise | Scale on dialchart runs from right to left
ArrowLines | Draw arrows at ends of lines
WedgeZones | Use wedge zones on dialcharts rather than annular zones

See also ...

SharpPlot Members | SharpPlot.DrawDialChart Method


SharpPlot 3.71 User Manual: Equation Property (ReadOnly)

SharpPlot.Equation Property (ReadOnly)

Get Equation text, as formatted.

public string Equation {get;}

Example

string mynote = sp.Equation;

This could be used to create a note from the text of a regression equation rather than have SharpPlot annotate the line.

See also ...

Annotate Model fit | SharpPlot Members | SharpPlot.EquationFormat Property | SharpPlot.EquationStyle Property | SharpPlot.GetCoefficients Method | SharpPlot.GetFittedValues Method | SharpPlot.GetResiduals Method


SharpPlot 3.71 User Manual: EquationFormat Property

SharpPlot.EquationFormat Property

Set Equation formatter.

public string EquationFormat {get; set;}

Example

sp.EquationFormat = "Time = C0 + C1speed";

Simple Regression

The template is scanned for the strings C0,C1,C2 and so on, depending on the order of fit used. In the example, if the intercept was 2.3 and the slope was 0.42 the equation would read “Time = 2.3 + 0.42speed”. The “+” symbol in the template is a placeholder for the sign, so a negative slope would give a “-” sign here.

If a coefficient is zero, the matching term is omitted completely, so the above template could read “Time = 0.5speed” if the line went exactly through the origin.

You can use the special placeholder CC for correlation coefficient, and R2 for squared correlation coefficient, for example:

sp.EquationFormat = "Time = C0 + C1speed\nCorrelation = R2";

The formatted equation may be written on the fitted line, positioned according to the equation style, or recovered after the line has been drawn by referencing the “Equation” property. This may then be used as part of a note, or placed in the key text.

Multiple Regression

Note that for multiple regressions (Cloud charts and Scatterplots with the ‘contour’ option) the coefficients are generated in the order Int,x1,x2,...,y1,y2,...,y4 depending on the order of fit chosen for x and y. Set the EquationStyle to ‘forceOrigin’ to cut out the constant term and force the fit through the origin. In this case, the only way to display the equation is by referencing the ‘equation’ property and using this in a note or as part of the key.

Equation Font

Equation uses the NoteFont

See also ...

Formatting text with simple HTML tags | Annotate Model fit | SharpPlot Members | SharpPlot.Equation Property (ReadOnly) | SharpPlot.EquationStyle Property | SharpPlot.SetEquationNumericFormat Method


SharpPlot 3.71 User Manual: EquationIndex Property

SharpPlot.EquationIndex Property

Explicit position of equation along model line, from 1 to 100 (0 to unspecify it).

This is particularly useful when the model line is shorter than the X range with the SpanData style.

public int Equation {get; set;}

Example

sp.EquationIndex = 50; // halfway

See also ...

Annotate Model fit | SharpPlot.EquationStyle Property | SharpPlot.SetEquationPosition Method


SharpPlot 3.71 User Manual: EquationStyle Property

SharpPlot.EquationStyle Property

When the equation of a curve is written on the line (chart style ModelFit+AnnotateModel) the default is to place it above the curve, at the right-hand end. The placement and appearance can be modified with this property.

public EquationStyles EquationStyle {get; set;}

Example

sp.EquationStyle = EquationStyles.Middle;

Options

Absolute | Position is interpreted in points
AtEnd | Outside the line at the right-hand end
Below | Below the line
ForceOrigin | Force fitted line through the origin
Left | Left end of fitted line
LinearFit | Force a linear equation even if we have logarithmic axes
Middle | Middle of fitted line
Opaque | Opaque background to text
Percentage | Position is interpreted in percentage of axes
SpanData | Fitted line spans data range, not X-axis
Straddle | Straddling the line

See also ...

Annotate Model fit | SharpPlot Members | SharpPlot.Equation Property (ReadOnly) | SharpPlot.EquationIndex Property | SharpPlot.SetEquationPosition Method


SharpPlot 3.71 User Manual: Flexibility Property

SharpPlot.Flexibility Property

When you use the ‘Trend’ style to draw an approximate curve through a scatter of points, it uses a default ‘flex’ value of 3 which actually sets the rate of die-away of the gaussian weighting used to emphasise nearby points.

public double Flexibility {get; set;}

A value of 0 will just draw an average (all points are weighted equally). A value of 100 will effectively force the line to visit every point. You will need to experiment with particular datasets to find the value that best hides the noise and reveals the underlying pattern in the data.

Example

sp.Flexibility = 4;

Technical data

For the statistically-minded, who want to know how this actually works!

It is a Gaussian-weighted moving average. The ‘Flexibility’ sets the exponent of the gaussian, so the way SharpPlot calculates it is to divide the x-axis range arbitrarily into 100 parts and for each point compute a y-value by adding up all the y-values from the data, weighted by the x-distance expressed as a classic ‘bell-curve’ function.

I think the more traditional approach is to use an inverse exponential weighting based on the absolute distance, but this ‘peaks’ very sharply and also tends to ‘whiplash’ at the ends, whereas the gaussian is more flat-topped, so the trend is effectively an average of nearby points with far-away points included but heavily discounted.

Basically, it just looks better for most reasonable timeseries!

Note that for very small datasets (below about 10 points) the weighting is adjusted to prevent the curve simply forming plateaux at each data point. This adjustment is simply to maintain visual consistency, and has no mathematical significance whatsoever.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: Footnote Property

SharpPlot.Footnote Property

Set Footnote text. This is wrapped into the entire width of the paper.

public string Footnote {get; set;}

Example

sp.Footnote = "Some Text";

Typically, this would be used to note the file name used for the chart data, the date and time of preparation, and so on. By default, it is drawn in the lower left corner of the chart area, but you can also choose centred or right alignment by setting the footnote style.

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.FootnoteLineSpacing Property | SharpPlot.FootnoteStyle Property | SharpPlot.SetNewline Method


SharpPlot 3.71 User Manual: FootnoteLineSpacing Property

SharpPlot.FootnoteLineSpacing Property

Set Footnote linespacing for multi-line notes.

public double FootnoteLineSpacing {get; set;}

Example

sp.FootnoteLineSpacing = 150;

The pitch may be given as a percentage, a factor of the font size, or an absolute distance in points. The default value is 110% of the font size, use negative values here to have the number treated as points regardless.

See also ...

SharpPlot Members | SharpPlot.Footnote Property


SharpPlot 3.71 User Manual: FootnoteStyle Property

SharpPlot.FootnoteStyle Property

Set Footnote style.

public FootnoteStyles FootnoteStyle {get; set;}

Example

sp.FootnoteStyle = FootnoteStyles.Center;

The footer is always written along the very bottom of the chart area. Use style ‘Ruled’ to rule across the entire chart area, just above the footer.

Options

Center | Centered footnote
NoWrap | Footers are not wrapped automatically.
Right | Right-aligned footnote
RuledAbove | Footnote is ruled above

See also ...

SharpPlot Members | SharpPlot.Footnote Property


SharpPlot 3.71 User Manual: FrameStyle Property

SharpPlot.FrameStyle Property

Set Frame style (typically boxed or opaque).

public FrameStyles FrameStyle {get; set;}

Example

sp.FrameStyle = FrameStyles.Boxed;

The ‘boxed’ style simply draws a box around the entire chart area, with a small allowance (default 4 points) as gutter so that a trellis of boxed charts has some space between the cells. You can choose to shadow the box by adding ‘shadowed’ as well as ‘boxed’ to the style.

Options

Boxed | Boxed frame
Filled | Filled with background colour
Rounded | Rounded corners
Shadowed | Shadowed box

See also ...

SharpPlot Members | SharpPlot.Gutter Property | SharpPlot.DrawFrame Method | SharpPlot.SetFrameBackground Method


SharpPlot 3.71 User Manual: GanttChartStyle Property

SharpPlot.GanttChartStyle Property

Set Ganttchart style to any combination of flags.

public GanttChartStyles GanttChartStyle {get; set;}

Example

sp.GanttChartStyle = GanttChartStyles.GridLines;

Options

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawGanttChart Method


SharpPlot 3.71 User Manual: Gap Property

SharpPlot.Gap Property

To set the gap between bars in the same group (default 0.618 of the bar width):

public double Gap {get; set;}

Example

sp.Gap = 0.5;

The gap is given as the fraction of a bar width. If the barchart is stacked (i.e. there are no groups) this sets the gap between bars. Small negative values are acceptable here, say -0.1 to give slightly overlapping bars. For tower charts it sets the gap between towers, and 0 is the smallest reasonable value.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GroupGap Property

SharpPlot.GroupGap Property

Sets the gap between groups of bars or towers (default 1.618 of the bar width).

public double GroupGap {get; set;}

Example

sp.GroupGap = 2;

The gap is given as the fraction of a bar width. If the barchart is stacked (i.e. there are no groups) this has no effect.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: Gutter Property

SharpPlot.Gutter Property

When drawing chart borders, SharpPlot defaults to moving 4 points in from the edges to draw the boundary line. This is reduced in proportion to the chart size, but when it appears as a gap between tiles created with the ‘Trellis’ property, it may be excessive for a collection of very small plots. To over-ride this:

public double Gutter {get; set;}

Example

sp.Gutter = 2;

To have all the small charts abutting, set the gutter to 0.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: Heading Property

SharpPlot.Heading Property

Set Heading text. This is centred over the top of the chart, and wrapped within the chart margins.

public string Heading {get; set;}

Example

sp.Heading = "Main Chart Title";

It is centred by default above the chart. New lines are generally forced with “\n” in the text, but you can choose your own line-break character if this is inconvenient.

You can also make a second heading line in a different font by specifying a subhead:

sp.SubHeading = "This is a subordinate heading";

Heading and subhead share the same placement, but you can set the subhead font independently.

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.HeadingLineSpacing Property | SharpPlot.HeadingStyle Property | SharpPlot.Subheading Property | SharpPlot.SetNewline Method


SharpPlot 3.71 User Manual: HeadingLineSpacing Property

SharpPlot.HeadingLineSpacing Property

Set Heading linespacing.

public double HeadingLineSpacing {get; set;}

Example

sp.HeadingLineSpacing = 140;

The pitch may be given as a percentage, a factor of the font size, or an absolute distance in points. The default value is 120% of the font size.

See also ...

SharpPlot Members | SharpPlot.Heading Property


SharpPlot 3.71 User Manual: HeadingStyle Property

SharpPlot.HeadingStyle Property

Set Heading style.

public HeadingStyles HeadingStyle {get; set;}

Example

sp.HeadingStyle = HeadingStyles.Left;

Use style ‘ruled’ to rule across the entire chart area, just below the heading.

Options

Bottom | Bottom-aligned heading
Left | Left-aligned heading
NoWrap | Headings are not wrapped automatically.
Opaque | Opaque background to heading text
Right | Right-aligned heading
RuledBelow | Heading is ruled below

See also ...

SharpPlot Members | SharpPlot.Heading Property


SharpPlot 3.71 User Manual: HistogramStyle Property

SharpPlot.HistogramStyle Property

Set Histogram style.

public HistogramStyles HistogramStyle {get; set;}

Example

sp.HistogramStyle = HistogramStyles.SurfaceShading;

You can superimpose a fitted Normal distribution, or add other control limits.

Options

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Mean | Histogram marks the mean value with a datumline
NormalCurve | Histogram shows a fitted Normal Distribution
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SDev1 | Histogram marks 1 StdDev with a datumline
SDev2 | Histogram marks 2 StdDev with a datumline
SDev3 | Histogram marks 3 StdDev with a datumline
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawHistogram Method


SharpPlot 3.71 User Manual: IAllowance Property

SharpPlot.IAllowance Property

This sets the ‘allowance’ (default 0.8) as a fraction of the space between adjacent trace lines (determined by the major Y-ticks). A value of 1 allows the trace lines to range exactly between adjacent Y-tickmarks.

public double IAllowance {get; set;}

Example

sp.IAllowance = 1.2;

This may be set to a value >1 if you have a set of lines which move along very nearly parallel to one another like an ECG or seismograph trace. However this only works well with a plain inner axis as otherwise the ticks and labels collide.

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: IAxisStyle Property

SharpPlot.IAxisStyle Property

Set I axis style to any combination of flags.

public IAxisStyles IAxisStyle {get; set;}

Example

sp.IAxisStyle = IAxisStyles.Plain;

Options

ExactFit | Exact fit (no extra ticks added)
ForceZero | Force zero in axis
GridLines | Draw gridlines parallel to inner axis
NoLabels | No Labels
PlainAxis | Plain axis (no ticks or labels)

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: IIntercept Property

SharpPlot.IIntercept Property

Set the point where the Inner-axis crosses the Y-axis:

public double IIntercept {get; set;}

Example

sp.IIntercept = 0;

This will move each Inner-axis from its default position to cross the Y-axis at zero.


SharpPlot 3.71 User Manual: ILabelFormat Property

SharpPlot.ILabelFormat Property

You can format the inner-axis labels with a simple picture format.

public string ILabelFormat {get; set;}

Example

sp.ILabelFormat = "#0∘";

This will show a degree symbol after each number, which would be appropriate for temperature data.

See also ...

Using Picture Formatters | SharpPlot Members


SharpPlot 3.71 User Manual: IndexOrigin Property

SharpPlot.IndexOrigin Property

The Index origin property allows you to set the ‘index origin’ of a generated x-scale. This is 1 by default, but could be 0 which is good for surface filled charts as the auto-ranging of the axis often forces it to include 0, and the surface looks ugly when it does not fill right back to the y-axis.

public double IndexOrigin {get; set;}

Example

sp.IndexOrigin = 0;

Although 1 and 0 are the normal values, IndexOrigin can take any integer (such as 36967 which is the OLE date value for 17th March, 2001) for date labelled axes where the data is daily from a given start date. To have the data-points set midway between ticks, use a value of 0.5 here and set the tick interval on the X-axis to 1.

See also ...

SharpPlot Members | SharpPlot.SetXTickMarks Method


SharpPlot 3.71 User Manual: InnerGap Property (ReadOnly)

SharpPlot.InnerGap Property (ReadOnly)

Get Interbar spacing (in X-axis co-ordinates) to allow over-plotting of a grouped barchart with a secondary plot.

public double InnerGap {get;}

Example

double mygap = sp.InnerGap;

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: ITickStyle Property

SharpPlot.ITickStyle Property

Set Inner tickmark style.

public ITickStyles ITickStyle {get; set;}

Example

sp.ITickStyle = ITickStyles.CrossingTicks;

The ‘Crossing’ style works well here when combined with the default ‘Outside’ on the outer Y-axis. You might also consider ‘Inside’ which will label the inner axis down the inside of the Y-axis, so keeping the outer and inner labels well separated. For qualitative data (common on Kite charts) style ‘Noticks’ works best.

Options

CrossingTicks | Ticks cross the axis
InsideTicks | Ticks are drawn inside the axis
NoTicks | No ticks are drawn

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: Jitter Property

SharpPlot.Jitter Property

Set random nudge in points for X-Y charts.

When an X-Y plot (typically a scatter plot) has repeated (X-Y) values, markers just draw exactly on top of each other.

Jitter allows to nudge them by pseudo-random values, so that it can be easily estimated how many markers collide on the same point. The nudges are pseudo-random so that they will be the same if you redraw the chart.

public double Jitter {get; set;}

Example

sp.Jitter = 2;    // nudge markers by approximately 2 points

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: KeyFormat Property

SharpPlot.KeyFormat Property

Set a picture format for key text.

public string KeyFormat {get; set;}

Example

sp.KeyFormat = "XXXXXXXX;";

To force the text to wrap into the space allowed for 8 ‘X’ characters. If the picture does not end with a semi-colon, the text will be truncated if necessary and terminated with an ellipsis character (→) to indicate that it has been clipped.

If you set Keytext to a an array of numbers (perhaps the categories represent numeric product codes) you can give a normal numeric formatter here such as “P0000” to create the text for the legend.

See also ...

Using Picture Formatters | SharpPlot Members | SharpPlot.SetKeyText Method


SharpPlot 3.71 User Manual: KeyGap Property

SharpPlot.KeyGap Property

Sets the space between legend entries in a vertical key.

public double KeyGap {get; set;}

Example

sp.KeyGap = 1.5;

The gap may be given as a percentage, a factor of the font size, or an absolute distance in points. The default value is 132% of the font size.

See also ...

SharpPlot Members | SharpPlot.KeyLineSpacing Property | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: KeyLimit Property

SharpPlot.KeyLimit Property

Set a maximum number of legend items to appear when a legend is next created.

public int KeyLimit {get; set;}

Example

sp.KeyLimit = 2;

This can be used to restrict the number of key items output (setting it to zero prevents the legend from being drawn) when a legend is created. This may be automatic (legends are flushed when the finished chart is rendered) or explicit (by a call to DrawKey).

The KeyStyle property may be used to reposition the legend frame between each call, for example to have the key split between two regions, top left and top right.

Resetting this to the default value of -1 will cause the remaining key items to be output at the next opportunity. To prevent SharpPlot from flushing unwanted items when the chart is rendered, call ResetKey to remove any pending items.

See also ...

SharpPlot.KeyStyle Property | SharpPlot.DrawKey Method | SharpPlot.ResetKey Method


SharpPlot 3.71 User Manual: KeyLineSpacing Property

SharpPlot.KeyLineSpacing Property

Sets the line-spacing for multi-line key entries.

public double KeyLineSpacing {get; set;}

Example

sp.KeyLineSpacing = 120;

The pitch may be given as a percentage, a factor of the font size, or an absolute distance in points. The default value is 110% of the font size, use negative values here to have the number treated as points regardless.

See also ...

SharpPlot Members | SharpPlot.KeyGap Property | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: KeyStyle Property

SharpPlot.KeyStyle Property

Set the Key style to any combination of flags.

public KeyStyles KeyStyle {get; set;}

Example

sp.KeyStyle = KeyStyles.Vertical;

Markers are normally included in keys if they are shown on each line – they can be omitted with style ‘plain’. When you use sp.DrawKey to place the key explicitly, the keys are normally positioned relative to the current (x,y) axes (style ‘Relative’) but you can choose to use absolute coordinates here, in which case you give the position of the key in Points from the chart origin (where the Axes would normally cross).

Any of the key layouts may be used with the autofit style. This starts with the type-size you specify and progressively reduces the font until the entire key fits into the available key frame. This may be a useful option if you are generating the key text from descriptions on a database, and hence do not know in advance how much space to allow for the key.

You would often want the ‘reversed’ ordering for stacked barcharts or surface charts. In this case the ‘reversed,vertical’ style means that the boxes in the key match the ordering of the bars or surfaces.

The ‘inline’ style is only used for LineGraphs. It writes the key text immediately to the right of the last point on the line, so is appropriate for timeseries data with well-separated lines. It may be necessary to increase the space in the right margin to make room for long series names.

Options

Absolute | Position is interpreted in points
AutofitText | Shrink text to fit within given frame
Baseline | Baselined legend (on first line of text)
BottomAlign | Vertically bottom aligned key frame
Boxed | Boxed key
BoxFrame | Box given frame instead of text
CenterAlign | Horizontally center aligned key frame
InlineWithData | Legends are written inline with data
LeftAlign | Horizontally left aligned key frame
MiddleAlign | Vertically middle aligned key frame
NoKey | No key (always omit key)
NoWrap | Key text is not wrapped to margin
Percentage | Position is interpreted in percentage of axes
Plain | Plain (no markers) key
Reversed | Reversed order of legend items
RightAlign | Horizontally right aligned key frame
Rounded | Rounded key box
Shadowed | Shadowed key box
TopAlign | Vertically top aligned key frame
Vertical | Vertically arranged legend

See also ...

SharpPlot Members | SharpPlot.DrawKey Method | SharpPlot.SetKeyFrame Method


SharpPlot 3.71 User Manual: LabelLineSpacing Property

SharpPlot.LabelLineSpacing Property

Set Label linespacing as a percentage of standard.

public double LabelLineSpacing {get; set;}

Example

sp.LabelLineSpacing = 120;

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: LabelStyle Property

SharpPlot.LabelStyle Property

Set Label style

public LabelStyles LabelStyle {get; set;}

Example

sp.LabelStyle = LabelStyles.FlatText;

To blank behind axis labels (useful if you have intercept axes and grid lines) set the label style to ‘opaque’:

sp.LabelStyle = LabelStyles.Opaque;

Labels are written by default to the left of the primary Y-axis and to the right of the secondary. Use style ‘centred’ to have them written (centre-aligned) on top of the axis. This would normally be used with the ‘opaque’ setting to make a white knockout over the axis line in which to write the text. Similarly, use style ‘middle’ to place the labels over the X-axis rather than below it.

sp.LabelStyle = LabelStyles.Opaque | LabelStyles.Middle;

Labels on 3D charts are normally angled to match the slope of the axis. The text may be more readable at small sizes if written horizontally, right-aligned to the tickmarks.

sp.LabelStyle = LabelStyles.FlatText;

will achieve this effect.

Options

Center | Centered (on y-axis) labels
FlatText | Flat text is used for 3D labels
LeftAlign | Left-align coltitles on table charts
Middle | Middled (on x-axis) labels
NoWrap | Labels are not wrapped automatically.
Opaque | Opaque background to label text
RightAlign | Right-align coltitles on table charts

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: LineGraphStyle Property

SharpPlot.LineGraphStyle Property

Set Linegraph style to any combination of flags.

public LineGraphStyles LineGraphStyle {get; set;}

Example

sp.LineGraphStyle = LineGraphStyles.XYPlot;

Options

AnnotateModel | Annotate model with computed equation
ArrowLines | Draw arrows at ends of lines
CellsCreated | Make cells at each marker for miniature plots
Clipped | Clip axes and all lines and markers at chart edge
CrispEdges | Turns off anti-aliasing on data lines
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
Filled | Lines are completed back to the start and shaded inside the region created
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
GrowthCurve | Growth curve (exponential) is computed
HaloMarkers | Halo all markers
Indexed | Data is indexed to the initial value = 100
Markers | Markers are drawn at data points
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
OnTopModel | Modelfit is drawn ontop of data
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SegmentLines | Break lines at missing values rather than drawing across the gap
SkipRepeats | Repeated y-values are eliminated (treated as missing values)
SkipRuns | Runs of identical y-values are eliminated (preserves the first and last of each run)
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
TrendLine | Compute trend line (Gaussian smooth)
ValueTags | Value tags are written for data items
XYPlot | First column gives the X-values for LinePlot

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: LineLimit Property

SharpPlot.LineLimit Property

Set maximum number of lines elements (including curves) allowed to be drawn (defaults to 100,000).

SharpPlot will throw a CausewayLimitException if the limit is exceeded.

This parameter prevents a chart running forever if you accidentally plot a silly amount of data.

Setting the limit to 0 disables it.

public int LineLimit {get; set;}

Example

sp.LineLimit = 0;

See also ...

SharpPlot Members | SharpPlot.MarkerLimit Property | SharpPlot.PixelLimit Property | SharpPlot.TextLimit Property | SharpPlot.TileLimit Property


SharpPlot 3.71 User Manual: MarginBottom Property

SharpPlot.MarginBottom Property

Set Bottom margin (pts).

public double MarginBottom {get; set;}

Example

sp.MarginBottom = 36;

This allows space (in points) for the X-axis caption, and the chart legend if you leave it in its default position.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: MarginLeft Property

SharpPlot.MarginLeft Property

Set Left margin (pts)

public double MarginLeft {get; set;}

Example

sp.MarginLeft = 48;

This allows space (in points) for the Y-axis labels and caption. If you have very large values to show here, you will almost certainly need to increase this value.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: MarginRight Property

SharpPlot.MarginRight Property

Set Right margin (pts)

public double MarginRight {get; set;}

Example

sp.MarginRight = 48;

This allows space (in points) from the end of the X-axis to the edge of the chart region. It is set by default to a small value, so you will need to increase it (say to 48 points) if you have a duplicate or right-hand Y-axis.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: MarginTop Property

SharpPlot.MarginTop Property

Set Top margin (pts)

public double MarginTop {get; set;}

Example

sp.MarginTop = 36;

This allows space (in points) for the chart heading and sub-heading. You will probably need to increase it if you have a heading that spans more than 2 lines. If you use left or right aligned headings for Pie or Polar charts, you can probably reduce this to zero as the headings will not clash with the chart in this case.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: MarkerLimit Property

SharpPlot.MarkerLimit Property

Set maximum number of markers allowed to be drawn (defaults to 10,000).

SharpPlot will throw a CausewayLimitException if the limit is exceeded.

This parameter prevents a chart running forever if you accidentally plot a silly amount of data.

Setting the limit to 0 disables it.

public int MarkerLimit {get; set;}

Example

sp.MarkerLimit = 0;

See also ...

SharpPlot Members | SharpPlot.LineLimit Property | SharpPlot.PixelLimit Property | SharpPlot.TextLimit Property | SharpPlot.TileLimit Property


SharpPlot 3.71 User Manual: MeshDensity Property

SharpPlot.MeshDensity Property

Set Density of mesh for response plots and contouring.

public double MeshDensity {get; set;}

Example

sp.MeshDensity = 2;

This will compute contours at double the normal frequency, giving a more accurate picture, but increasing the size of the finished graphic and the run-time needed to generate it.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: MinMaxChartStyle Property

SharpPlot.MinMaxChartStyle Property

Set MinMax style to any combination of flags.

public MinMaxChartStyles MinMaxChartStyle {get; set;}

Example

sp.MinMaxChartStyle = MinMaxChartStyles.Envelope;

Options

ArrowLines | Draw arrows at ends of lines
Clipped | Clip axes and lines and markers at chart edge
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
DriftMarkers | Mark only the far end of bounds (2nd series)
Envelope | Shade region within bounds
ErrorBars | Show errorbars on ranges
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
OverlayGrid | Gridlines are drawn ontop of data
Terminated | Draw current marker on both bounds
ValueTags | Value tags are written for data items
XYPlot | First column gives the X-values for LinePlot

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: MissingValue Property

SharpPlot.MissingValue Property

Tells SharpPlot to ignore specific values in data series.

public double MissingValue {get; set;}

Example

sp.MissingValue = 0;

The default setting is 32768. The effect of setting it to zero is to make line graphs skip over zero values, rather than drawing an annoying line down to the axis wherever zero is hit. When you plot an array of data with differing numbers of elements, SharpPlot automatically pads the shorter series with the current missing-value setting.

sp.MissingValue = -99;

This might be appropriate for data from some logging device, where negative numbers indicate various error conditions.

By default, line-graphs simply ‘bridge’ the missing points by joining the points on either side. Use the segmented lines style to have the line broken wherever data is missing.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: ModelFitKey Property

SharpPlot.ModelFitKey Property

Tells SharpPlot to include or omit the legend placeholder when generating a fitted curve. The default setting is to include it.

public bool ModelFitKey {get; set;}

Example

sp.ModelFitKey = false;

You can omit the legend entry by giving it an empty string, but this may be more convenient.

See also ...

SharpPlot Members | SharpPlot.TrendLineKey Property


SharpPlot 3.71 User Manual: NetworkMapStartAngle Property

SharpPlot.NetworkMapStartAngle Property

NetworkMap Start Angle, in clockwise degrees from 12:00

public double NetworkMapStartAngle {get; set;}

Example

sp.NetworkMapStartAngle = 90; // start at 03:00

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: NetworkMapStyle Property

SharpPlot.NetworkMapStyle Property

Set flags for DrawNetworkMap styles.

public NetworkMapStyles NetworkMapStyle {get; set;}

Example

sp.NetworkMapStyle = NetworkMapStyles.FixedArcs|NetworkMapStyles.ArrowLines;

Options

ArrowLines | Draw arrows at the end of links
CellsCreated | Make cells at each node for miniature plots
Clipped | Clip axes and all lines and markers at chart edge
CounterClockwise | Links go counter-clockwise
CroppedAxes | Crops all chart elements at the axis boundary
Dissected | Links are spaced away from nodes
ExplodeAxes | Axes are set back from the plotting area
FixedArcs | Fixed link arc radius
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Horizontal | Node series are laid out horizontally
NoAxes | No axes are drawn on the chart
NoLines | Links are not drawn
NoLinkKey | Do not output key for links
NoMarkers | Nodes are not drawn
NoNodeKey | Do not output key for nodes
OnTopMarkers | Force drawing nodes over links
OverlayGrid | Gridlines are drawn ontop of data
RoundLines | Links are drawn with round ends
SplitByDestination | Link aspects are split by destination node
SplitByLink | SplitBy applies to individual links rather than nodes
SplitByOrigin | Link aspects are split by origin node
ValueTags | Value tags are written for links
Vertical | Node series are laid out vertically

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: NotApplicableText Property

SharpPlot.NotApplicableText Property

Set “Not Applicable” Filler. By default, tables show missing values as “ – “ which may be reset with this property.

public string NotApplicableText {get; set;}

Example

sp.NotApplicableText = "n/a";

This will be shown in the case of a Cross-tab where no data is found for the particular combination of group and category which intersects at each cell.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: NoteLineSpacing Property

SharpPlot.NoteLineSpacing Property

Set the line-spacing for multi-line notes.

public double NoteLineSpacing {get; set;}

Example

sp.NoteLineSpacing = 150;

The pitch may be given as a percentage, a factor of the font size, or an absolute distance in points. The default value is 120% of the font size.

See also ...

SharpPlot Members | SharpPlot.DrawNote Method


SharpPlot 3.71 User Manual: NoteStyle Property

SharpPlot.NoteStyle Property

Set Note style to any combination of flags.

public NoteStyles NoteStyle {get; set;}

Example

sp.NoteStyle = NoteStyles.Boxed;

Normally, notes are positioned relative to the current (x,y) axes (style ‘Relative’) but you can choose to use absolute coordinates here, in which case you give the position of the note in Points from the chart origin (the position where the axes would normally cross). For multi-line notes, the position gives the start of the baseline of the first line of the text unless you set it explicitly with styles such as Middle|Center which will use the note-boundingbox as a reference to compute the center.

To include a defined effect (such as an SVG shadow filter or animation) to the text:

sp.AddEffect(ScriptTarget.Notes,"<animate .... />"

You can add multiple effects to apply several filters or animations to the note. This could be used to have a note slide in from the side, then change colour or fade out.

Options

Absolute | Position is interpreted in points
Baseline | Baselined note box (on first line of text)
Bottom | Vertically bottom-aligned note text
Boxed | Boxed notes
CenterAlign | Horizontally centered note text
Cropped | Eliminates entire note if text will be clipped
Middle | Vertically middle-aligned note text
Opaque | Opaque text for notes
Percentage | Position is interpreted in percentage of axes
RightAlign | Horizontally right aligned note text
Rounded | Rounded box
Shadowed | Shadowed box
TopAlign | Vertically top aligned note text

See also ...

SharpPlot Members | SharpPlot.DrawNote Method


SharpPlot 3.71 User Manual: Page Property (ReadOnly)

SharpPlot.Page Property (ReadOnly)

Number of current page (starting at 1).

public int Page {get;}

Example

int curpage = sp.Page;

See also ...

SharpPlot Members | SharpPlot.Pages Property (ReadOnly) | SharpPlot.NewPage Method


SharpPlot 3.71 User Manual: Pages Property (ReadOnly)

SharpPlot.Pages Property (ReadOnly)

Number of non-empty pages of the report so far.

public int Pages {get;}

Example

int pages = sp.Pages;

See also ...

SharpPlot Members | SharpPlot.Page Property (ReadOnly) | SharpPlot.NewPage Method


SharpPlot 3.71 User Manual: ParityStyle Property

SharpPlot.ParityStyle Property

Set ParityPlot style as any combination of allowed styles.

public ParityStyles ParityStyle {get; set;}

Example

sp.ParityStyle = ParityStyles.Percentage;

Options

Absolute | Tolerances are given as constant values
Percentage | Tolerances are given as percentages
Proportion | Tolerances are given as a proportion of the prediction

See also ...

Parity plot | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: ParityTolerance Property

SharpPlot.ParityTolerance Property

This sets the tolerance limits for the parity style of scatterplot.

public double ParityTolerance {get; set;}

Example

sp.ParityTolerance = 10;

The default parity style is to treat the value as a percentage band, but you may also use ratio and absolute numbers here.

See also ...

Parity plot


SharpPlot 3.71 User Manual: Perspective Property

SharpPlot.Perspective Property

To get a good feel for the depth of a 3D chart it is essential to have a small degree of perspective distortion in the projection. This is controlled by how far away from the plot the ‘camera’ is placed – in SharpPlot the default is 12, meaning 12 chart-widths back from the virtual 3D image. To reduce the distortion, make this a big number (above 50 you will find that all the verticals become vertical); to increase it, move the ‘camera’ towards the plot.

public double Perspective {get; set;}

Example

sp.Perspective = 20;

You will find that 7 is about as close as you can reasonably go without producing very exaggerated effects. Numbers less than this will start to give spurious ‘inside-out’ views and (eventually) strange errors.

Isometric Projections

To make an Excel-style 3D chart, you should set the perspective to 0 which generates an isometric view, rather than a true perspective image. This can be used with the Towerchart to make simple ‘column charts’ in Excel style.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: PieChartStyle Property

SharpPlot.PieChartStyle Property

Set Piechart style to any combination of flags.

public PieChartStyles PieChartStyle {get; set;}

Example

sp.PieChartStyle = PieChartStyles.ValueTags;

Options

Absolute | Pie Center and Radius are in points
ChartX | Pie Center is in chart coordinates – Pie Radius is in X coordinates
ChartY | Pie Center is in chart coordinates – Pie Radius is in Y coordinates
FarthestFirst | Drawing order allows 3D extrusion
MergeInsideTags | Inside tags that don’t fit will be merged to XLabels
Percentage | Pie Center and Radius are in percentage of available area
Plain | Plain axes or value tags on piechart
RoseDiagram | Exploded pie sectors are drawn from centre to form a Rose Diagram
ShowAllLabels | Draw all XLabels even if they don’t fit the Frame
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.PieRadius Property | SharpPlot.DrawPieChart Method | SharpPlot.SetPieCenter Method


SharpPlot 3.71 User Manual: PieRadius Property

SharpPlot.PieRadius Property

Set Pie radius (percent of standard unless one of PieChartStyles.(Absolute Percentage ChartX ChartY) is set).

public double PieRadius {get; set;}

Example

sp.PieRadius = 80;

This will reduce all sectors in the piechart to 80% of the standard value.

See also ...

SharpPlot Members | SharpPlot.PieChartStyle Property


SharpPlot 3.71 User Manual: PieStartAngle Property

SharpPlot.PieStartAngle Property

By default, piecharts are drawn clockwise from 12:00. This property may be used to start at any position.

public double PieStartAngle {get; set;}

Example

sp.PieStartAngle = 90;

The only commonly used alternative value is 90 to start the pie at the 3:00 position.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: PixelLimit Property

SharpPlot.PixelLimit Property

Set maximum number of pixels (for rectangular tiling) allowed to be drawn (defaults to 1,000,000).

SharpPlot will throw a CausewayLimitException if the limit is exceeded.

This parameter prevents a chart running forever if you accidentally plot a silly amount of data.

Setting the limit to 0 disables it.

public int PixelLimit {get; set;}

Example

sp.PixelLimit = 0;

See also ...

SharpPlot Members | SharpPlot.LineLimit Property | SharpPlot.MarkerLimit Property | SharpPlot.TextLimit Property | SharpPlot.TileLimit Property


SharpPlot 3.71 User Manual: PolarChartStyle Property

SharpPlot.PolarChartStyle Property

Set Polarchart style to any combination of flags.

public PolarChartStyles PolarChartStyle {get; set;}

Example

sp.PolarChartStyle = PolarChartStyles.Risers;

Options

ArrowLines | Draw arrows at ends of lines
ClockFace | Polar chart represents a 24-hour clock
CompassPlot | Treat X-values as degrees in Polar plots
Curves | Points are joined with smooth curves rather than straight lines
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
HollowCenter | Polar gridlines radiate from first tick rather than centre
Indexed | Data is indexed to the initial value = 100
Markers | Markers are drawn at data points
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
OriginMarker | Mark centre of polar plot with a bold dot
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SkipRepeats | Repeated y-values are eliminated (treated as missing values)
SkipRuns | Runs of identical y-values are eliminated (preserves the first and last of each run)
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
ValueTags | Value tags are written for data items
XYPlot | First column gives the X-values for LinePlot

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: ResetOption Property

SharpPlot.ResetOption Property

Set Reset options, to preserve some settings across a reset. This will be used by :

  • ResetProperties
  • NewFrame
  • NewPage(true)
  • NewCell when using TrellisStyles.ResetAtEachCell

Some settings will never be reset :

  • ResetOption
  • Backlog
  • TitleBar
  • SoftHyphen
  • SetNewline
  • SetTrellis
  • NewFrame (the current chart frame size)
public ResetOptions ResetOption {get; set;}

Example

sp.ResetOption = ResetOptions.KeysPersist;
CyclesPersist | Cycles persist across reset
KeysPersist | Keys persist across reset
SettingsPersist | Settings persist across reset

See also ...

SharpPlot Members | SharpPlot.ResetProperties Method


SharpPlot 3.71 User Manual: ResponsePlotStyle Property

SharpPlot.ResponsePlotStyle Property

Set Response Surface style to any combination of flags.

public ResponsePlotStyles ResponsePlotStyle {get; set;}

Example

sp.ResponsePlotStyle = ResponsePlotStyles.WallShading;

Options

AltitudeShading | Altitude shading is used with response surface
Contours | Draw contour lines across data points
ContourTags | Contour lines are tagged with height values
Curves | Points are joined with smooth curves rather than straight lines
Fine | Altitude shading interpolated in fine detail (slow for vectorial rendering)
FlatText | Flat labels and captions are used on 3D charts
ForceZero | Force zero (all axes include origin)
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Markers | Markers are drawn at data points
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
Risers | Draw risers to data points from axis or fitted model
ScaleBar | Altitude shaded reponse plot adds a nominal Z-Axis
TiledSurface | Tile surfaces on response plots
WallShading | Shade walls on all 3D charts

See also ...

SharpPlot Members | SharpPlot.DrawResponsePlot Method


SharpPlot 3.71 User Manual: ScalebarStyle Property

SharpPlot.ScalebarStyle Property

Set the scale bar style to any combination of flags.

public ScalebarStyles ScalebarStyle {get; set;}

Options

Bottom | Scalebar is placed horizontally below the chart
Left | Scalebar is drawn in the left margin or at the bottom left
Right | Scalebar is drawn in the right margin or below the chart at the right
Small | Scalebar is drawn in minimalist style

See also ...

Scale bar for Bubble and Altitude-shaded plots | SharpPlot Members | ScalebarStyles Enumeration


SharpPlot 3.71 User Manual: ScatterPlotStyle Property

SharpPlot.ScatterPlotStyle Property

Set Scatterplot style to any combination of flags.

public ScatterPlotStyles ScatterPlotStyle {get; set;}

Example

sp.ScatterPlotStyle = ScatterPlotStyles.ForceZero;

Options

AnnotateModel | Annotate model with computed equation
ArrowLines | Draw arrows at ends of lines
CellsCreated | Make cells at each marker for miniature plots
Clipped | Clip axes and all lines and markers at chart edge
Contours | Draw contour lines across data points
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
GrowthCurve | Growth curve (exponential) is computed
HaloMarkers | Halo all markers
Lines | Datapoints are connected with lines
Logarithmic | All chart axes are drawn logarithmically
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoMarkers | No markers are drawn (turns off default)
OnTopModel | Modelfit is drawn ontop of data
OverlayGrid | Gridlines are drawn ontop of data
Parity | Axes are made square and a diagonal is drawn with tolerance lines
Risers | Draw risers to data points from axis or fitted model
TrendLine | Compute trend line (Gaussian smooth)
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: SeriesKey Property

SharpPlot.SeriesKey Property

Tells SharpPlot to include or omit the legend placeholder for the main data series. The default setting is to include it.

public bool SeriesKey {get; set;}

Example

sp.SeriesKey = false;

You can omit the legend entry by giving it an empty string, but this may be more convenient.

See also ...

SharpPlot.ModelFitKey Property | SharpPlot.TrendLineKey Property


SharpPlot 3.71 User Manual: SoftHyphen Property

SharpPlot.SoftHyphen Property

Set soft hyphen character for optional word-break point in wrapped text. By default, SharpPlot uses the standard soft hyphen character ‘’ (0xAD).

public char SoftHyphen {get; set;}

Example

sp.SoftHyphen = '~';

Setting the above will allow a word such as “Con~trib~ution” to appear as:

Con-
tribution

or as

Contrib-
ution

or as

Contribution

... depending on the available width.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: StepChartStyle Property

SharpPlot.StepChartStyle Property

Set Stepchart style to any combination of flags.

public StepChartStyles StepChartStyle {get; set;}

Example

sp.StepChartStyle = StepChartStyles.Indexed;

Options

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SegmentLines | Break lines at missing values rather than drawing across the gap
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: Subheading Property

SharpPlot.Subheading Property

Set Subheading text. This is wrapped between the chart margins to match the heading.

public string Subheading {get; set;}

Example

sp.Subheading = "Some Text for my Subhead";

The font and size are set by the SubheadFont property. The alignment and positioning are determined by the style of the main heading. Lines may be split with ‘\n’ as for the main heading.

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.HeadingStyle Property


SharpPlot 3.71 User Manual: TableStyle Property

SharpPlot.TableStyle Property

Set Tablechart style to any combination of flags.

public TableStyles TableStyle {get; set;}

Example

sp.TableStyle = TableStyles.Spanned;

Options

Absolute | Position is interpreted in points
Bottom | Vertically bottom-align within available area
Boxed | Chart elements are boxed
Center | Horizontally centre-align within available area
FitHeight | Table is scaled to fit available height
FitWidth | Table is scaled to fit available width
GridLines | Draw gridlines (all axes)
Merged | Matching row-labels are merged
Middle | Vertically middle-align within available area
Opaque | Background area is filled with current background style
Right | Horizontally right-align within available area
Rounded | Boxes are drawn with rounded corners
Shadowed | Boxes are drawn with a drop-shadow
Spanned | Matching column labels are merged
UseHeaders | Tables pick up headers and footers

See also ...

SharpPlot Members | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: Tease Property

SharpPlot.Tease Property

This property is designed to let you ‘tease out’ a 3rd dimension from a scatter-plot to show the effect of a category variable.

public double Tease {get; set;}

Example

sp.Tease = 6;

This effectively adds a 3rd dimension to the normal 2-D scatter plot by pulling the categories apart in the X-direction. The ‘tease’ value is the distance in points to separate each category; the separated categories are teased symmetrically about each x-value. If you have a large number of categories, you will need to use a low value here to prevent adjacent groups merging into one another.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: TextLimit Property

SharpPlot.TextLimit Property

Set maximum number of individual text items allowed to be drawn (defaults to 10,000).

SharpPlot will throw a CausewayLimitException if the limit is exceeded.

This parameter prevents a chart running forever if you accidentally plot a silly amount of data.

Setting the limit to 0 disables it.

public int TextLimit {get; set;}

Example

sp.TextLimit = 0;

See also ...

SharpPlot Members | SharpPlot.LineLimit Property | SharpPlot.MarkerLimit Property | SharpPlot.PixelLimit Property | SharpPlot.TileLimit Property


SharpPlot 3.71 User Manual: TickMarkWidth Property

SharpPlot.TickMarkWidth Property

Override inherited tickmark line-width with an explicit value.

public double TickMarkWidth{get; set;}

Example

sp.TickMarkWidth = 0.5;

The default is set to -1, which allows the tickmarks to scale naturally with the line-width used for the chart axes..

See also ...

SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: TileLimit Property

SharpPlot.TileLimit Property

Set maximum number of tiles (including bars, towers, pie wedges, arrows, and non-rectangular tiling) allowed to be drawn (defaults to 10,000).

SharpPlot will throw a CausewayLimitException if the limit is exceeded.

This parameter prevents a chart running forever if you accidentally plot a silly amount of data.

Setting the limit to 0 disables it.

public int TileLimit {get; set;}

Example

sp.TileLimit = 0;

See also ...

SharpPlot Members | SharpPlot.LineLimit Property | SharpPlot.MarkerLimit Property | SharpPlot.PixelLimit Property | SharpPlot.TextLimit Property


SharpPlot 3.71 User Manual: TitleBar Property

SharpPlot.TitleBar Property

Set Title bar text.By default, SharpPlot picks up the first heading in the chart and uses this as the ‘title’ of the chart. To over-ride this:

public string TitleBar {get; set;}

Example

sp.TitleBar = "First Chart";

The title is used in the browser titlebar (for SVG output), as the document title in a saved PDF, and as the visible title in the placeholder box of an EPS when it is imported into MS Word or other publishing tool.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: TowerAspect Property

SharpPlot.TowerAspect Property

Set Tower aspect (default towers are square).

public double TowerAspect {get; set;}

Example

sp.TowerAspect = 2;

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: TowerChartStyle Property

SharpPlot.TowerChartStyle Property

Set Towerchart style to any combination of flags.

public TowerChartStyles TowerChartStyle {get; set;}

Example

sp.TowerChartStyle = TowerChartStyles.WallShading;

Options

FlatText | Flat labels and captions are used on 3D charts
ForceZero | Force zero (all axes include origin)
GridLines | Draw gridlines (all axes)
Indexed | Data is indexed to the initial value = 100
NoAxes | No axes are drawn on the chart
Plain | Plain axes or value tags on piechart
WallShading | Shade walls on all 3D charts

See also ...

SharpPlot Members | SharpPlot.DrawTowerChart Method


SharpPlot 3.71 User Manual: TraceChartStyle Property

SharpPlot.TraceChartStyle Property

Set Traceplot style to any combination of flags.

public TraceChartStyles TraceChartStyle {get; set;}

Example

sp.TraceChartStyle = TraceChartStyles.Lines;

Options

CrispEdges | Turns off anti-aliasing on data lines
CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
KiteDiagram | Draw Trace chart in Kite-diagram form
NoAxes | No axes are drawn on the chart
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
XYPlot | First column gives the X-values for LinePlot

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: TreeMapStyle Property

SharpPlot.TreeMapStyle Property

Set Treemap style to any combination of flags.

public TreeMapStyles TreeMapStyle {get; set;}

Options

AltitudeShading | Altitude shading is used with contour plots, bubble charts and response surfaces
FrameAxes | Axes are completed to frame chart and all data is cropped
Logarithmic | Area of rectangles scales to log of data value in TreeMap
ScaleBar | Bubble charts and altitude-shaded Contour plots add a nominal Z-Axis
SquareRoot | Area of rectangles scales to square root of data value in TreeMap
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: TrellisStyle Property

SharpPlot.TrellisStyle Property

Set Trellis style to any combination of flags.

public TrellisStyles TrellisStyle {get; set;}

Example

sp.TrellisStyle = TrellisStyles.SnakingCells;
Gridlines | Trellis is gridded like a table
PagedMultiples | Paged multiples, rather than trellised
ResetAtEachCell | Reset all properties on completing each cell
SnakingCells | Cells go down, then across the trellis

See also ...

SharpPlot Members | SharpPlot.SetTrellis Method


SharpPlot 3.71 User Manual: TrendLineKey Property

SharpPlot.TrendLineKey Property

Tells SharpPlot to include or omit the legend placeholder when generating a gaussian trend. The default setting is to include it.

public bool TrendLineKey {get; set;}

Example

sp.TrendLineKey = false;

You can omit the legend entry by giving it an empty string, but this may be more convenient.

See also ...

SharpPlot Members | SharpPlot.ModelFitKey Property


SharpPlot 3.71 User Manual: TriangleStyle Property

SharpPlot.TriangleStyle Property

Set Triangle chart style to any combination of flags.

public TriangletStyles TriangleStyle {get; set;}

Example

sp.TriangleStyle = TriangleStyles.Markers+TriangleStyles.Labelled;

Options

Curves | Points are joined with smooth curves rather than straight lines
Filled | Lines are completed back to the start and shaded inside the region created
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers (improves 3D effect on Cloud charts)
Labelled | Triangle plot is drawn with labelled sides
Lines | Datapoints are connected with lines
Markers | Markers are drawn at data points
Percentage | Triangle plots are labelled in the range 0-100
RedrawOutline | Chart outline is redrawn over filled areas
SideCaptions | Triangle captions are moved to the sides
ValueTags | Value tags are written for data items


SharpPlot 3.71 User Manual: ValueLineSpacing Property

SharpPlot.ValueLineSpacing Property

Set linespacing for multi-line value-tags.

public double ValueLineSpacing {get; set;}

Example

sp.ValueLineSpacing = 120;

The pitch may be given as a percentage, a factor of the font size, or an absolute distance in points. The default value is 110% of the font size, use negative values here to have the number treated as points regardless.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: ValueTagAngle Property

SharpPlot.ValueTagAngle Property

Set the value-tag angle (degrees). When you set the value tags to be angled, the default angle is 34 degrees. You can set this to any value from 0-360.

public double ValueTagAngle {get; set;}

Example

sp.ValueTagAngle = 12.5;

Angled tags are always drawn to the right of the markers, with the center of rotation at the marker. Multi-line tags are positioned so that the middle line is drawn along the rotated baseline.

See also ...

SharpPlot.ValueTagStyle Property


SharpPlot 3.71 User Manual: ValueTagFormat Property

SharpPlot.ValueTagFormat Property

Set Value-tag picture format.

public string ValueTagFormat {get; set;}

Example

sp.ValueTagFormat = "##0.00%";

To show the tags to 2 decimal places with a trailing % symbol. When contour lines are drawn on scatterplots, this format specification is used to create the labels on each line. Note that the trailing ‘%’ does not multiply the values by 100 here (this is one of the few differences from the default formatter in C#).

Piecharts

This format specification is also used for the numeric sector labels on piecharts if you set the ‘values’ style here. You can also use a simple format such as ‘XXXXXXX;’ to get text labels wrapped into a limited width, or ‘XXXXXX’ which will simply truncate them, suffixed with an ellipsis if necessary.

In addition, you may want to merge the sector labels with the sector values. You can do this with a format such as ‘The XL = ##0’ which will take each sector in turn and substitute the corresponding label into the value string at the XL marker. You may prefix it with a backslash to prevent interpretation as XLabels, as for all formatting characters.

See also ...

Using Picture Formatters | Formatting text with simple HTML tags | SharpPlot Members


SharpPlot 3.71 User Manual: ValueTagStyle Property

SharpPlot.ValueTagStyle Property

Set Value tag style to any combination of flags.

public ValueTagStyles ValueTagStyle {get; set;}

Example

sp.ValueTagStyle = ValueTagStyles.Inside;

Options

Angled | Angled text is used for values
Center | Values are horizontally centered above markers
CumulativeValues | Cumulative values are used on stacked barcharts
Duration | Numeric values are formatted to base-60
Hints | Values are set as status-line hints
InheritColor | Values inherit color from data points
Inside | Values are written inside bars, pie-sectors, markers
Left | Values are written to the left of markers
Middle | Values are vertically centred in each bar
Normal | Values are written as text (default)
Opaque | Value text is drawn with opaque background
Radial | Values are displaced outward along a radius
RecolorOutside | Values on bars match the bar colour when forced outside the bar
Right | Values are right-aligned above markers
SectorValues | Sector values are used on stacked barcharts
ShowAllTags | Value tags are drawn even if they have too little space
Tips | Values are set as pop-up tips
Vertical | Vertical text is used for values

See also ...

Value Tags are drawn | SharpPlot Members | SharpPlot.ValueTagAngle Property | SharpPlot.ValueTagFormat Property | SharpPlot.SetValueFont Method | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: VectorStyle Property

SharpPlot.VectorStyle Property

Set Vector style to any combination of flags.

public VectorStyles VectorStyle {get; set;}

Example

sp.VectorStyle = VectorStyles.ArrowLines;

Options

ArrowLines | Draw arrows at ends of lines
Clipped | Clip axes and vectors at chart edge
CroppedAxes | Crops all chart elements at the axis boundary
Dissected | Vectors are spaced away from target points
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Middle | Markers in the middle of vectors
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
Rooted | Markers at the source of vectors
Terminated | Markers on target of vectors
ValueTags | Value tags are written for data items

See also ...

SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: VennDiagramStyle Property

SharpPlot.VennDiagramStyle Property

Set VennDiagram style to any combination of flags.

public VennDiagramStyles VennDiagramStyle {get; set;}

Example

sp.VennDiagramStyle = VennDiagramStyles.ValueTags;

Options

Filled | Lines are completed back to the start and shaded inside the region created
RedrawOutline | Chart outline is redrawn over filled areas
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawVennDiagram Method


SharpPlot 3.71 User Manual: Version Property (ReadOnly)

SharpPlot.Version Property (ReadOnly)

Returns the current SharpPlot version as a string.

public string Version {get;}

Example

string ver = sp.Version;
sp.Footnote = "Produced by SharpPlot version " + sp.Version;

This may be used in debug reports, or to add a footnote to any chart to acknowledge the use of SharpPlot in your graphics application.


SharpPlot 3.71 User Manual: VmlHeader Property

SharpPlot.VmlHeader Property

Retrieve a standard header code for a VML webpage:

public string VmlHeader {get; }

Example

string vmlHeader = sp.VmlHeader;

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: WalkSort Property (ReadOnly)

SharpPlot.WalkSort Property (ReadOnly)

Gives the visit index (starting at 1) for each item in the TreeMap.

public int[] WalkSort {get;}

Example

int[] val = sp.WalkSort;

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: XAxisLength Property (ReadOnly)

SharpPlot.XAxisLength Property (ReadOnly)

Returns the calculated length of the X-axis given the current settings of page size, gutter and vertical margins.

public double XAxisLength {get;}

Example

double xl = sp.XAxisLength;

This may be useful if you want to size an image to paint the entire chart background exactly. The value (in conjunction with the matching Y-axis property) will give you the exact width and height required.


SharpPlot 3.71 User Manual: XAxisStyle Property

SharpPlot.XAxisStyle Property

Set X axis style to any combination of flags.

public XAxisStyles XAxisStyle {get; set;}

Example

sp.XAxisStyle = XAxisStyles.ForceZero;

Options

AngledLabels | Angled labels are used
AnnualTicks | Annual ticks are used for dates
ArrowedAxis | Axis ends with an arrowhead
AtEndCaption | Caption is drawn at the end of the axis
BalancedAxis | Tickmarks are ranged around zero and the Y-axis is horizontally centred
CenteredCaption | Caption is centered below axis
Clipped | Axis and data is clipped at the first and last tickmarks
Date | X-values are taken as OLE dates
DuplicateAxes | Duplicate X-axes are drawn
Duration | Format X axis labels using base-60 rather than 10
ExactFit | Axis is not rounded up to the next whole tickmark interval
FlatText | Flat text is used for 3D charts
ForceZero | The X-axis always includes zero
GridLines | Grid lines are drawn vertically at major ticks
InsideLabels | Labels are written within the chart area
InvisibleAxis | Axis and ticks are invisible, but labels will be drawn as normal
LogScale | Log scale is used
Longitude | Longitude scale is drawn for GPS data
MaskedLabels | Labels are already masked so must not be thinned further
MiddleLabels | Labels are placed between tickmarks
MonthlyTicks | Monthly ticks are used for dates
NoAxis | No axis is generated
NoLabels | No labels are drawn
OmitLastLabel | Drops off rightmost label to avoid potential collisions
OverlayGrid | Grid lines are drawn over the data
PlainAxis | Plain axis (no ticks or labels)
RightCaption | Right-aligned axis caption (default)
SpannedLabels | Repeated labels are blanked and spanned across the repeated range
StayAtEdge | Labels stay at edge when axis is centrally placed
Time | X-values are taken as OLE date-time numbers
TopAxis | Axis is drawn at the top of the chart

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: XBarChartStyle Property

SharpPlot.XBarChartStyle Property

Set X-Bar style to any combination of flags.

public XBarChartStyles XBarChartStyle {get; set;}

Example

sp.XBarChartStyle = XBarChartStyles.RelativeData;

Options

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FloatingBars | Floating bars (lowest bar of stack not drawn)
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
Logarithmic | All chart axes are drawn logarithmically
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
StackedBars | Stacked barcharts (data is accumulated)
TicksBetween | Tickmarks are drawn between bars or groups of bars
ValueTags | Value tags are written for data items

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: XCaption Property

SharpPlot.XCaption Property

Sets the X-axis caption or captions. A single caption is written below the end of the axis, spaced to allow room for labels (if any).

public string XCaption {get; set;}

Example

sp.XCaption = "Weeks (2005)";

You can control the positioning with the X-axis style to place the caption centred (below the axis) or at the right-hand end. The caption text will be split over more than one line if you include a ‘\n’ in the text, for example:

sp.XCaption = "Elapsed days\nfrom start of project";

Use the CaptionLineSpacing property to control the vertical pitch here.

Setting a pair of captions

If you pass a pair of captions separated by the tab character, they are written at the left and right-hand ends of the axis.

sp.XCaption = "Low end\tHigh end";

This is a useful technique when the Y-axis is horizontally centered.

sp.XAxisStyle = XAxisStyles.ArrowedAxis|XAxisStyles.BalancedAxis|XAxisStyles.AtEndCaption;

sp.YCaption = "Cooler\tHotter";
sp.XCaption = "Drier\tMuch\nWetter";

sp.YAxisStyle = YAxisStyles.ArrowedAxis|YAxisStyles.BalancedAxis|YAxisStyles.AtEndCaption;

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.CaptionLineSpacing Property | SharpPlot.CaptionStyle Property | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: XCaptionFormat Property

SharpPlot.XCaptionFormat Property

Set X Caption format to force multi-line text or truncation.

public string XCaptionFormat {get; set;}

Example

sp.XCaptionFormat = "XXXXX;";

To force the captions to wrap at the length of the given string. If the string is simply ‘XXXXXXX’ then longer captions are truncated, and end with ‘...’ to indicate this.

See also ...

Using Picture Formatters | Formatting text with simple HTML tags | SharpPlot Members


SharpPlot 3.71 User Manual: XDateFormat Property

SharpPlot.XDateFormat Property

Set Date picture (X axis). When the X-axis is set to style ‘Date’, ‘Annual’ or ‘Monthly’, the date labels may be formatted with a standard picture format.

public string XDateFormat {get; set;}

Example

sp.XDateFormat = "MMM-yy";

Dates are formatted according to the current locale. Note that newlines are accepted in the format string to allow multi-line labels to be created easily for timeseries axes:

sp.XDateFormat = "MMMM\nyyyy";

This will create a 2-line set of labels which works well with the ‘Spanned’ style to centre the year below each set of 12 months.

Shortening month names

Timeseries are often labeled with the first character of the month name JFMAM ... D which cannot be generated with a standard date formatter. To have SharpPlot label the time-axis like this, use the MMM date format and set the XLabelFormat to a picture such as ‘X~~’ which will truncate the month name down to one character.

See also ...

Using Date and Time axes | Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.XAxisStyle Property | SharpPlot.XLabelFormat Property


SharpPlot 3.71 User Manual: XDatumThreshold Property

SharpPlot.XDatumThreshold Property

Set X datum threshold to draw vertical datum lines at major tickmarks which exceed this value.The default is 160% of standard, or 8pt if XTickStyle is Absolute. This setting can be used in conjunction with spanned X-axis labels to create hierarchical timeseries plots, for example with datum lines every quarter.

public double XDatumThreshold {get; set;}

Example

sp.XDatumThreshold = 150;

This will draw vertical datum lines at any major tickmarks which are above 150% of standard.

sp.XDatumThreshold = 5.6;

This will draw vertical datum lines at any major tickmarks which are above 5.6pt if the XTickStyle has been set to Absolute.

See also ...

SharpPlot Members | SharpPlot.XTickStyle Property | SharpPlot.SetXTickLengths Method


SharpPlot 3.71 User Manual: XFactor Property

SharpPlot.XFactor Property

Set X labelling factor.

public double XFactor {get; set;}

Example

sp.XFactor = 1000;

This allows you to use default (numeric) labelling for scaled data. The values will be drawn normally, but will be divided by the given factor to generate the labels.

This does not affect the positioning of Datum Lines, Notes or Zones where you always give the unscaled co-ordinates.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: XGridThreshold Property

SharpPlot.XGridThreshold Property

Set X grid threshold which will draw gridlines at major ticks. The default value is 80% of standard tick length, or 4pt if XTickStyle is Absolute.

public double XGridThreshold {get; set;}

Example

sp.XGridThreshold = 50;

This will draw gridlines at any major ticks above 50% of the standard length. Typically this would be used with spanned X-labels to create a hierarchical timeseries, for example gridlines at year boundaries with monthly (small) tickmarks and standard tickmarks at the year-end.

sp.XGridThreshold = 1.5;

This will draw vertical grid lines at any major tickmarks which are above 1.5pt if the XTickStyle has been set to Absolute.

See also ...

SharpPlot Members | SharpPlot.XTickStyle Property | SharpPlot.SetXTickLengths Method


SharpPlot 3.71 User Manual: XIntercept Property

SharpPlot.XIntercept Property

To set the point where the Y-axis intercepts the X-axis.

public double XIntercept {get; set;}

Example

sp.XIntercept = 0;

This will move the Y-axis from its default position (at the left-hand side of the plotting region) to cross the X-axis at zero. You have the option of leaving the tickmarks and labels at the left edge, or having them stay with the axis using the Ystyle ‘stay’.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: XLabelAngle Property

SharpPlot.XLabelAngle Property

Set X label angle (degrees). When you set the X-labels to be angled, the default angle is 34 degrees. You can set this to any value from 0-360.

public double XLabelAngle {get; set;}

Example

sp.XLabelAngle = 45;

Angled labels are normally right-aligned on the tick marks for a lower x-axis and left-aligned on a top axis. This will be switched around if you use angles above 270 (which you may give as negative angles, such as -90 which is the same as 270). They will not be automatically thinned if the ticks get too crowded.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: XLabelFormat Property

SharpPlot.XLabelFormat Property

Set a picture format for X-Labels.

public string XLabelFormat {get; set;}

This uses the normal C# format string, with two small variations. The ‘%’ symbol has no effect on the scale of the data, and you may use the ‘~’ character anywhere in the picture to suppress the digit at that position.

Example

sp.XLabelFormat = "Week #0";

To label the tickmarks ‘Week 1’ ‘Week 2’ .... ‘Week 52’ as appropriate.

Wrapping text labels

Text labels may be wrapped into a preset width with a format such as:

sp.XLabelFormat = "XXXXXX;";

This will force the labels to wrap at the length of the given string. If the string is simply ‘XXXXXXX’ then longer labels are clipped, and are ended with an ellipsis ‘...’ to denote truncation if any.

Formatting multi-line labels

Normally the entire pattern applies to each line of a multi-line label, however a pattern such as ‘XX\nXXXX; will be applied line by line. This can be used to handle spanned date labels quite effectively, for example a date picture like ‘MMMyyyy’ could be used with a label formatter like ‘X~~\nXXXX’ to make a set of spanned labels showing the first letter of each month in the top line and the full year in the line below.

See also ...

Using Picture Formatters | Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.XDateFormat Property


SharpPlot 3.71 User Manual: XTickStyle Property

SharpPlot.XTickStyle Property

Set X tickmark style to one of the allowed alternatives.

public XTickStyles XTickStyle {get; set;}

Example

sp.XTickStyle = XTickStyles.CrossingTicks;

Options

Absolute | Tick-lengths are in points, not percent of standard
CrossingTicks | Ticks cross the axis
DuplicateTicks | Ticks repeat on the alternate axis
InsideTicks | Ticks are drawn inside the axis
MinorTicks | Minor ticks are added automatically
NoTicks | No ticks are drawn

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: XTimeFormat Property

SharpPlot.XTimeFormat Property

Set Time formatter for X-axis labels.

public string XTimeFormat {get; set;}

Example

sp.XTimeFormat = "HH:mm-ss";

See also ...

Using Date and Time axes | SharpPlot Members


SharpPlot 3.71 User Manual: XTrackFormat Property

SharpPlot.XTrackFormat Property

Set a formatter for X-axis tracking.

public string XTrackFormat {get; set;}

Example

sp.XTrackFormat = "##0.0kg";   // for a scatterplot
sp.XTrackFormat = "MMM/yyyy";  // for timeseries data

Description

When you use the PageMap class to enable an active chart viewer, it may be helpful to translate the mouse position into the co-ordinate system shown on the chart. This allows the user to point the mouse at a data value and read off the associated numbers directly.

The default is to show the x-position as “x:value” where the value is rounded to 3 significant figures. You can override the default by specifying any valid format string here, including date formats if the X-axis is time-based.

See also ...

Active charts in GUI Applications | PageMap.GetTracker Method


SharpPlot 3.71 User Manual: YAxisLength Property (ReadOnly)

SharpPlot.YAxisLength Property (ReadOnly)

Returns the calculated length of the Y-axis given the current settings of page size, gutter and horizontal margins.

public double YAxisLength {get;}

Example

double yl = sp.YAxisLength;

This may be useful if you want to size an image to paint the entire chart background exactly. The value (in conjunction with the matching X-axis property) will give you the exact width and height required.


SharpPlot 3.71 User Manual: YAxisStyle Property

SharpPlot.YAxisStyle Property

Set Y axis style to any combination of flags.

public YAxisStyles YAxisStyle {get; set;}

Example

sp.YAxisStyle = YAxisStyles.ForceZero;

Options

AboveGrid | Labels are written above gridlines and tickmarks
AngledLabels | Angled labels are used on 3D charts
ArrowedAxis | Axis ends with an arrowhead
AtEndCaption | The caption is written horizontally above the top of the axis
BalancedAxis | Tickmarks are ranged around zero and the X-axis is vertically centred
CenteredCaption | The caption is vertically centred
ClampToAxis | Data is clamped to fit within the axis range
Clipped | Data and axes are clipped at the extreme tick marks
Date | The data is assumed to be OLE dates
DuplicateAxes | Duplicate axes are drawn
Duration | Format Y axis labels using base-60 rather than 10
ExactFit | The axis will not be extended to the nearest whole tick interval
FlatText | Flat text is used for 3D captions and labels
ForceZero | Axis range always includes zero
GridLines | Horizontal gridlines are drawn at major ticks
InsideLabels | Labels are written within the chart area
InvertAxis | The axis is drawn with data values increasing from the top down
InvisibleAxis | No axis or ticks are drawn, but labels are written normally
Latitude | The scale is formatted as latitude values for GPS data
LeftAxis | The axis is drawn and labelled at the left even for secondary axes
LogScale | A logarithmic scale is used
MiddleLabels | Axis labels are written on the middle of the axis
NoAxis | No axis is drawn
NoLabels | No labels are added
OverlayGrid | Gridlines are drawn on top of data
PlainAxis | No labels or ticks are created
RightAxis | The axis is drawn at the right
StayAtEdge | Labels stay at the chart edge when the axis intercept is explicitly set
Synchronised | Secondary axis will match tick positions of primary
Time | The data is assumed to be OLE date/time values

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: YCaption Property

SharpPlot.YCaption Property

Sets the Y caption or a pair of captions. The Y-axis caption is written by default vertically alongside the axis.

public string YCaption {get; set;}

Example

sp.YCaption = "Tonnes";

It may also be placed above the top of the axis:

sp.YAxisStyle = YAxisStyles.AtEnd;

This is a better placement for short captions such as ‘mm’ or ‘kg’. Captions written at the top of the axis will be split into multiple lines if you include ‘\n’ in the text, for example ‘Height\n(cm)’ will give a two-line caption. The Caption style controls the alignment of the text for captions placed ‘atend’.

For centred ‘atend’ captions the centred text is wrapped into an effective width of twice the appropriate margin, and left or right aligned text is wrapped into the margin width.

Setting a pair of captions

If you pass a pair of captions separated by the tab character, they are written at the lower and upper ends of the axis.

sp.YCaption = "Cooler\tHotter";

This is a useful technique when the X-axis is vertically centered.

sp.XAxisStyle = XAxisStyles.ArrowedAxis|XAxisStyles.BalancedAxis|XAxisStyles.AtEndCaption;

sp.YCaption = "Cooler\tHotter";
sp.XCaption = "Drier\tMuch\nWetter";

sp.YAxisStyle = YAxisStyles.ArrowedAxis|YAxisStyles.BalancedAxis|YAxisStyles.AtEndCaption;

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.CaptionStyle Property | SharpPlot.YCaptionFormat Property


SharpPlot 3.71 User Manual: YCaptionFormat Property

SharpPlot.YCaptionFormat Property

Set Y Caption format to wrap long captions.

public string YCaptionFormat {get; set;}

Example

sp.YCaptionFormat = "XXXXX;";

See also ...

Using Picture Formatters | SharpPlot Members


SharpPlot 3.71 User Manual: YDateFormat Property

SharpPlot.YDateFormat Property

Set Date picture (Y axis labels).

public string YDateFormat {get; set;}

Example

sp.YDateFormat = "MMM-yyy";

Note that newlines are accepted in the format string to allow multi-line labels to be created easily for timeseries axes:

sp.YDateFormat = "MMMM\nyyyy";

This will show each label split onto 2 lines.

See also ...

Using Date and Time axes | Formatting text with simple HTML tags | SharpPlot Members


SharpPlot 3.71 User Manual: YDatumThreshold Property

SharpPlot.YDatumThreshold Property

Set Y datum threshold as a percentage of standard tickmark length. The default is 160% of standard, or 8pt if YTickStyle is Absolute.

public double YDatumThreshold {get; set;}

Example

sp.YDatumThreshold = 150;

Datum-lines will be drawn across the chart for any tickmarks which exceed this value.

sp.YDatumThreshold = 8.4;

This will draw horizontal datum lines at any major tickmarks which are above 8.4pt if the YTickStyle has been set to Absolute.

See also ...

SharpPlot Members | SharpPlot.YTickStyle Property | SharpPlot.SetYTickLengths Method


SharpPlot 3.71 User Manual: YFactor Property

SharpPlot.YFactor Property

Set Y labelling factor.

public double YFactor {get; set;}

Example

sp.YFactor = 1000;

This allows you to use default (numeric) labelling for scaled data. The values will be drawn normally, but will be divided by the given factor to generate the labels.

This does not affect the positioning of Datum Lines, Notes or Zones where you always give the unscaled co-ordinates.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: YGridThreshold Property

SharpPlot.YGridThreshold Property

Set Y grid threshold. The default value is 80% of standard tick length, or 4pt if YTickStyle is Absolute.

public double YGridThreshold {get; set;}

Example

sp.YGridThreshold = 80;

This will draw horizontal gridlines for any major ticks which exceed this value.

sp.YGridThreshold = 3.2;

This will draw horizontal gridlines at any major tickmarks which are above 3.2pt if the YTickStyle has been set to Absolute.

See also ...

SharpPlot Members | SharpPlot.YTickStyle Property | SharpPlot.SetYTickLengths Method


SharpPlot 3.71 User Manual: YIntercept Property

SharpPlot.YIntercept Property

Set the point where the X-axis crosses the Y-axis:

public double YIntercept {get; set;}

Example

sp.YIntercept = 0;

This will move the X-axis from its default position (at the bottom of the plotting region) to cross the Y-axis at zero.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: YLabelFormat Property

SharpPlot.YLabelFormat Property

Set picture format for Y-axis labels.

public string YLabelFormat {get; set;}

This uses the normal C# format string, with two small variations. The ‘%’ symbol has no effect on the scale of the data, and you may use the ‘~’ character anywhere in the picture to suppress the digit at that position.

Example

sp.YLabelFormat = "##0.00%";

To show the numbers to 2 decimal places with a trailing % symbol. Note that this does not automatically multiply the values by 100 (unlike VB and many OCX controls such as the Flexgrid).

Wrapping text labels

Text labels may be wrapped into a preset width with a format such as:

sp.YLabelFormat = "XXXXXX;";

This will force the labels to wrap at the length of the given string. If the string is simply ‘XXXXXXX’ then longer labels are clipped, using a final ellipsis ‘...’ to denote truncation if any.

See also ...

Using Picture Formatters | Formatting text with simple HTML tags | SharpPlot Members


SharpPlot 3.71 User Manual: YTickStyle Property

SharpPlot.YTickStyle Property

Set Y tickmark style to one of the allowed values.

public YTickStyles YTickStyle {get; set;}

Example

sp.YTickStyle = YTickStyles.CrossingTicks;

Options

Absolute | Tick-lengths are in points, not percent of standard
CrossingTicks | Ticks cross the axis
DuplicateTicks | Ticks repeat on the alternate axis
InsideTicks | Ticks are drawn inside the axis
MinorTicks | Minor ticks are added automatically
NoTicks | No ticks are drawn

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: YTimeFormat Property

SharpPlot.YTimeFormat Property

Set Time formatter for Y-axis labels.

public string YTimeFormat {get; set;}

Example

sp.YTimeFormat = "HH-mm";

See also ...

Using Date and Time axes | SharpPlot Members


SharpPlot 3.71 User Manual: YTrackFormat Property

SharpPlot.YTrackFormat Property

Set a formatter for primary Y-axis tracking.

public string YTrackFormat {get; set;}

Example

sp.YTrackFormat = "$#,##0";

Description

When you use the PageMap class to enable an active chart viewer, it may be helpful to translate the mouse position into the co-ordinate system shown on the chart. This allows the user to point the mouse at a data value and read off the associated numbers directly.

The default is to show the y-position as “y:value” where the value is rounded to 3 significant figures. Note that only the primary y-axis is tracked.

See also ...

Active charts in GUI Applications | PageMap.GetTracker Method


SharpPlot 3.71 User Manual: ZAxisStyle Property

SharpPlot.ZAxisStyle Property

Set Z axis style to any combination of flags.

public ZAxisStyles ZAxisStyle {get; set;}

Example

sp.ZAxisStyle = ZAxisStyles.Flat;

Options

AtEndCaption | The caption is written above the top of the axis
ExactFit | The axis is not extended to the nearest whole tickmark
FlatText | Flat text is used for the caption and labels
ForceZero | The axis is forced to include zero
GridLines | Grid lines are drawn around the chart walls
NoLabels | No labels are drawn
PlainAxis | No ticks or labels are drawn

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: ZCaption Property

SharpPlot.ZCaption Property

The Z-axis caption is written vertically alongside the axis. It will be automatically repositioned depending on the chart viewpoint.

public string ZCaption {get; set;}

Example

sp.ZCaption = "Yield";

You may also choose to place it at the end of the axis with the ‘atend’ Z-style.

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.CaptionStyle Property


SharpPlot 3.71 User Manual: ZCaptionFormat Property

SharpPlot.ZCaptionFormat Property

Set Z Caption format.

public string ZCaptionFormat {get; set;}

Example

sp.ZCaptionFormat = "XXXXX;";

See also ...

Using Picture Formatters | SharpPlot Members


SharpPlot 3.71 User Manual: ZFactor Property

SharpPlot.ZFactor Property

Set Z labelling factor.

public double ZFactor {get; set;}

Example

sp.ZFactor = 100;

This allows you to use default (numeric) labelling for scaled data.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: ZLabelFormat Property

SharpPlot.ZLabelFormat Property

Set picture format for Z-axis labels.

public string ZLabelFormat {get; set;}

Example

sp.ZLabelFormat = "##0%";

To show the numbers with a trailing % symbol and not more than 3 digits.

See also ...

Using Picture Formatters | SharpPlot Members


SharpPlot 3.71 User Manual: ZTickStyle Property

SharpPlot.ZTickStyle Property

Set Z tickmark style to an allowed value.

public ZTickStyles ZTickStyle {get; set;}

Example

sp.ZTickStyle = ZTickStyles.NoTicks;

Options

NoTicks No ticks are drawn

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SharpPlot Methods

SharpPlot Methods

The methods of the SharpPlot class are listed below.

SharpPlot Methods

AddAttributes | Insert arbitrary content in the XML output for known text items
AddBookmark | Bookmark this page with name, level, openflag and weblink
AddComment | Insert a note with optional id and compression switch
AddEffect | Allow user to associate arbitrary SVG/XAML with any standard text item or subitem
AddHints | Apply an array of hints to a set of text items
AddHyperlinks | Apply an array of links to a set of text items
AddJavaPrologue | Include the definition of a JavaScript function in the output chart
AddTableShading | Add a combination of Color and Fill to an individual table cell
AddTips | Apply an array of tips to a set of text items
DefineFont | Create a definition for a font, including CSS details and PostScript name
DrawBarChart | Draws a grouped or stacked barchart from an array of arrays of values
DrawBoxPlot | Construct compound box-whisker plot from a data array and two integer category arrays
DrawBubbleChart | Scatterplot from 2 arrays of data with markers scaled by 3rd array
DrawCloudChart | 3D Scatter from x,y and multiple z values
DrawContourPlot | Contour plot from 3 arrays of double values
DrawDialChart | Draw a dial or gauge from data and pointer radii
DrawFrame | Draw current frame, with any fixed text such as headings and footnotes
DrawGanttChart | Gantt chart from 3 double arrays of Y-values, X-start and X-end values
DrawHistogram | Construct a histogram from a floating-point vector
DrawImage | Add an image to a chart
DrawKey | This will draw and clear any pending keys, using the current setting of key text.
DrawLineGraph | Construct plot from array of arrays of y values and x-values
DrawMinMaxChart | Create hi-lo plot from arrays of max,min and optional axis values
DrawMultiple | Multiple plot from double array of arrays of y-values versus double x-values
DrawNetworkMap | Draw a network of nodes and their link strengths
DrawNote | Write text note given text, position, angle and maximum width
DrawPieChart | Piechart from data and sector explosions
DrawPolarChart | Polar plot from multiple series and times or angles
DrawPolygon | Draw polygon from x and y coordinates, with optional Color, FillStyle, line width and LineStyle
DrawResponsePlot | Draw 3D grid, and construct surface from multiple vectors of zValues giving rows and columns
DrawScatterPlot | Make a scatter plot from x and y data
DrawStepChart | Stepped line from arrays of height data and step-start values
DrawTable | Build a table from an array of arrays of strings, giving cells in columns
DrawTowerChart | Tower chart from an array of arrays of height values
DrawTraceChart | Draw a set of parallel traces from an array of arrays of Y-values and an array of X-values
DrawTreeMap | Draw a treemap of a vector of items (may be paired with depth vector or a triplet of value,depth,altitude)
DrawTriangle | Construct triangle chart from data (3 series giving proportions or counts)
DrawVectors | Vector plot from 4 series of x y x y
DrawVennDiagram | Draw a Venn diagram using supplied membership data
DrawXBarChart | XBarchart from multiple data series and x-values
FindExtremes | Determines the extreme values from an array of data, allowing for the ‘Curves’ style
GetAltitudeColors | Get the array of colors used in Altitude Colors
GetCharsets | Return the list of used characters for each used font
GetCoefficients | Coefficients of model fit
GetColors | Get the array of colors used by upcoming series
GetFillStyles | Get an array of fill-styles used by upcoming series
GetFittedValues | Fitted values from model
GetITickPositions | Calculated Inner ticks
GetKeyBoxes | Get bounding boxes of the latest round of drawn Keys
GetKeyIndices | Get int[] setting for Key indices
GetLabelMask | Label mask
GetLineStyles | Get the array of line-styles to be used by upcoming series.
GetMarkerColors | Get the array of colors used in Marker Colors
GetMarkers | Get the array of markers for upcoming series
GetNetworkMapLinkArc | NetworkMap Link Arc
GetNetworkMapSelfArc | NetworkMap Self Arc
GetPaperSize | Get paper size as a 2-item double vector (width height)
GetPenWidths | Get the array of line-widths for upcoming series
GetResiduals | Residuals from modelfit
GetTextSize | Get text width and height in points
GetTrellisBoxes | Get the current trellis boxes as a list of (x y x y) coordinates
GetViewpoint | Get 3D viewpoint given a set of roll,pitch,yaw values in degrees
GetXTickPositions | Calculated X tickmarks
GetYTickPositions | Calculated Y tickmarks
GetZTickPositions | Calculated Z tickmarks
GroupBy | Group by unique values
IncludeSource | Add arbitrary (SVG/EPS) content to beginning or end of output stream
MapCoords | Maps a matched pair of (x,y) co-ordinate arrays to points
NewCell | Move to the next cell in the current trellis.
NewFrame | Clear the area for a new chart with new frame size and position.
NewPage | Move on to next page
NewYAxis | Partial reset to allow independent secondary Y-axis
NextNote | Returns the correct position for the next note text allowing given extra space in pts
ReadComment | Recover comments saved to file in any output format or passed as a string
ReadPdfStream | Recover any page from an encoded PDF
RedrawAxes | Overdraws the axes with optional framing
RenderAnimatedSvg | Return chart rendered as animated SVG, with one frame per page
RenderBitmap | Return completed chart rendered through raster engine as a Bitmap object
RenderChartLog | Return completed chart as a readable log
RenderDocument | Return completed chart as a Document instance
RenderEps | Return completed chart rendered as Encapsulated PostScript
RenderImageMap | Return tags to make an HTML imagemap for completed chart
RenderJsonChartMap | Return JSON arrays to make a map for entire chart
RenderMetafile | Return or stream completed chart as one of the Extended Metafile formats
RenderPS | Return completed chart rendered as raw PostScript
RenderPageMap | Return an instance of the PageMap class to allow active graphics applications with completed chart
RenderPdf | Return completed chart as a PDF stream
RenderSvg | Return completed chart rendered as SVG
RenderVml | Return completed chart as a VML string
RenderXaml | Return completed chart rendered as a XAML Canvas
Reset | Clear SharpPlot taking optional paper size (width,height in pts)
ResetKey | Removes any accumulated key definitions
ResetProperties | All properties except trellis definitions are returned to default values.
SaveAnimatedGif | Save chart rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save chart to named file as animated SVG, with one frame per page
SaveChartLog | Save completed chart as a readable log file
SaveEps | Save completed chart to named file as Encapsulated PostScript
SaveImage | Save completed chart rendered through raster engine as an image file
SavePS | Save completed chart to named file as raw PostScript
SavePdf | Save completed chart to named file as PDF
SaveSvg | Save completed chart to named file as SVG
SaveVml | Save chart to named file as VML, optionally wrapped into HTML
SaveXaml | Save completed chart to named file as a XAML Canvas
SetAltitudeColors | Set Altitude Colors
SetArrowStyle | Set Arrow format from Arrow size, with optional sweep angle and fill pattern
SetAxesScales | Set Axes scales given an array of numbers or a single value
SetAxisStyle | Set Axis format from any reasonable combination of lineColor, lineStyle and lineWidth
SetBackground | Set Paper from any reasonable combination of fillColor, fillStyle and edgeWidth
SetBarWidths | Set Bar widths given an array of numbers or a single value
SetBaselineStyle | Set Baseline format from any reasonable combination of lineColor, lineStyle and lineWidth
SetCaptionFont | Set Caption font from a combination of fontname, size, style, colour
SetCellSize | Set Cellsize (width,height) from a single value or X value and Y value pair
SetChartBackground | Set Chart background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetChartName | Assign a non-default name to the current chart
SetColors | Set a color or an array of colors to be used by upcoming series
SetContourStyle | Set Contour format from any reasonable combination of lineColor, lineStyle and lineWidth
SetContourTagFont | Set ContourTag font from a combination of fontname, size, style, colour
SetDataWindow | Set Window for data given an array of values or a single value
SetDatumLineStyle | Set DatumLine style from any reasonable combination of lineColor, lineStyle and lineWidth
SetDatumLineTags | Set Datumline tags from a delimited string or a string array
SetDatumTagFont | Set DatumTag font from a combination of fontname, size, style, colour
SetEdgeStyle | Set Edge format from any reasonable combination of lineColor, lineStyle and lineWidth
SetEffects | Set Effect cycle – string or string array
SetEquationNumericFormat | Set Equation numeric format from a simple string or an array of strings
SetEquationPosition | Set Equation position from a single value or X value and Y value pair
SetFillStyles | Set a fill-style or an array of fill-styles for use by upcoming series Set an array of fill-styles for use by upcoming series
SetFootnoteFont | Set Footnote font from a combination of fontname, size, style, colour
SetFrameBackground | Set Frame background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetGridLineStyle | Set Gridline format from any reasonable combination of lineColor, lineStyle and lineWidth
SetHeadingFont | Set Heading font from a combination of fontname, size, style, colour
SetHeadingNudge | Set Heading nudge(x,y) from given displacements
SetIDataRange | Set Inner data range given an array of numbers or a single value
SetILabelFont | Set Inner label font from a combination of fontname, size, style, colour
SetILabels | Set Inner axis labels from a simple string or an array of strings
SetIRange | Set Inner axis range range given maximum and optional minimum values
SetITickMarks | Set Inner axis tick marks given an array of numbers or a single value
SetIZones | Set Inner axis zones given one or more Zone definitions
SetKeyBackground | Set Key background fill from any reasonable combination of fillColor, fillStyle and edgeWidth
SetKeyFont | Set Key font from a combination of fontname, size, style, colour
SetKeyFrame | Key frame (ltwh in pts) Frame given top corner and size
SetKeyIndices | Set Key indices given an array of values or a single value
SetKeyNudge | Set Key box nudge from given displacements
SetKeyText | Set Legend texts for key from a delimited string or a string array
SetLabelFont | Set Label font from a combination of fontname, size, style, colour
SetLabelMask | Set Label mask from a mask (always treated as flags)
SetLineStyles | Set a Line-style or an array of line-styles to be used by upcoming series.
SetMargins | Set chart margins individually or as a group
SetMarkerColors | Set Marker Colors
SetMarkerScales | Set Marker scales given an array of numbers or a single value
SetMarkers | Set up a marker or an array of markers for upcoming series
SetModelSpan | Set Modelfit span range given maximum and optional minimum values
SetNetworkMapLinkArc | Set NetworkMap Link Arc given an array of numbers or a single value
SetNetworkMapSelfArc | Set NetworkMap Self Arc given an array of numbers or a single value
SetNewline | Set Newline to any single character
SetNoteBackground | Set Note background from any reasonable combination of fillColor, fillStyle and edgeWidth
SetNoteFont | Set Note font from a combination of fontname, size, style, colour
SetNoteNudge | Set Note nudge from given displacements
SetOrderOfFit | Order of fit for x and y axes (3D charts or contour plots)
SetPageLabels | Set Page-labels from a simple string or an array of strings
SetParityLimitStyle | Set Parity limit style from any reasonable combination of lineColor, lineStyle and lineWidth
SetParityLineStyle | Set Parity axis style from any reasonable combination of lineColor, lineStyle and lineWidth
SetParityZoneStyle | Set Parity zone style from any reasonable combination of fillColor, fillStyle and edgeWidth
SetPenWidths | Set a line-width or an array of line-widths for use by upcoming data series
SetPieCenter | Set Pie centre (xy) from a single value or X value and Y value pair
SetSelection | Set Selection mask for data from a mask (always treated as flags)
SetSeriesNames | Assign a list of names to the upcoming data series
SetSubheadingFont | Set Subheading font from a combination of fontname, size, style, colour
SetTablePosition | Set Table position and size from x,y and optional width and height
SetTowerFillStyles | Tower ptns (top,face,edge) for Walls and towers (single value sets all three)
SetTrellis | Makes a trellis specification from a cell count or cell layout
SetValueFont | Set Value tag font from a combination of fontname, size, style, colour
SetValueNudge | Set Value nudge from a pair of displacements or matching arrays
SetValueTags | Set Value tags from a delimited string or a string array
SetViewpoint | Set 3D viewpoint given a set of roll,pitch,yaw values in degrees
SetWallFillStyles | Wall patterns (YZ,XZ,XY) for Walls and towers (single value sets all three)
SetWeightings | Set Weights for modelfit given an array of numbers or a single value
SetXCaptionFont | Set X Caption font from a combination of fontname, size, style, colour
SetXDataRange | Set X data range given an array of numbers or a single value
SetXDatumLines | Set X datum line(s) given an array of numbers or a single value
SetXGridLines | Set X gridline(s) given an array of numbers or a single value
SetXLabelFont | Set X label font from a combination of fontname, size, style, colour
SetXLabelNudge | Set X-label nudge from given displacements
SetXLabels | Set X labels from a delimited string or a string array
SetXRange | Set X axis range range given maximum and optional minimum values
SetXTickLengths | Set X tick lengths given an array of numbers or a single value
SetXTickMarks | Define X tick marks as intervals or an explicit array giving irregular settings
SetXZones | Set X zone given one or more Zone definitions
SetYCaptionFont | Set Y Caption font from a combination of fontname, size, style, colour
SetYDataRange | Set Y data range given an array of numbers or a single value
SetYDatumLines | Set Y datum line(s) given an array of numbers or a single value
SetYGridLines | Set Y gridline(s) given an array of numbers or a single value
SetYLabelFont | Set Y label font from a combination of fontname, size, style, colour
SetYLabelNudge | Set Y-label nudge from given displacements
SetYLabels | Set Y labels from a delimited string or a string array
SetYRange | Set Y axis range range given maximum and optional minimum values
SetYTickLengths | Set Y-tick lengths given an array of numbers or a single value
SetYTickMarks | Define Y tick marks as intervals or an explicit array giving irregular settings
SetYZones | Set Y zone given one or more Zone definitions
SetZCaptionFont | Set Z Caption font from a combination of fontname, size, style, colour
SetZDataRange | Set Z data range given an array of numbers or a single value
SetZDatumLines | Set Z datum line(s) given an array of numbers or a single value
SetZLabelFont | Set Z label font from a combination of fontname, size, style, colour
SetZLabels | Set Z labels from a simple string or an array of strings
SetZRange | Set Z axis range range given maximum and optional minimum values
SetZTickMarks | Define Z tick marks as intervals or an explicit array giving irregular settings
SetZZones | Set Z zone given one or more Zone definitions
SplitBy | Split by unique values
UseCmyk | Use a color defined by 4 inks (Cyan, Magenta, Yellow, Black) rather than RGB intensities (Red, Green, Blue)

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: AddAttributes Method

SharpPlot.AddAttributes Method

Set property/value pairs for one or more data points or a standard chart object.

Overloads

  • public void AddAttributes(string propName,string propValue);
  • public void AddAttributes(string propName,string[] propValue);
  • public void AddAttributes(string propName,string[][] propValue);
  • public void AddAttributes(string propName,string[] propValue,string seriesName);
  • public void AddAttributes(string propName,string propValue,int itemNumber);
  • public void AddAttributes(string propName,string propValue,int itemNumber,string seriesName);
  • public void AddAttributes(ScriptTarget targetId,string propName,string propValue);
  • public void AddAttributes(ScriptTarget targetId,string propName,string[] propValue);
  • public void AddAttributes(ScriptTarget targetId,string XmlContent);
  • public void AddAttributes(ScriptTarget targetId,string[] XmlContent);

Description

Every VML or SVG object is a namespace, so you can set arbitrary variables for each chart data item (typically you would set its value), or on headings, keys etc. You can set any of the standard JavaScript event handlers here, for example onMouseOver and onMouseOut to have data items highlight as you track the mouse over them. Simple onClick handlers will work as you expect on PNG output, using an associated imagemap. If you want to set the text of headings or other chart items, you can refer to them by the standard names listed as viewer hotspots. (This capability is only supported in charts rendered as VML and SVG).

Setting properties or handlers on all data-points

This is the simplest call, and would be appropriate if the object was to have all the points or bars behave identically. For example to highlight the outline of the bar under the mouse:

sp.AddAttributes("onMouseOver","this.strokecolor='Red';");
sp.AddAttributes("onMouseOut","this.strokecolor='black';");

A common strategy is to define a standard handler (common to all points) and then to pass a value (or an identifier) to this depending on which point was clicked. A typical handler would be:

sp.AddAttributes("onMouseDown","AddMe(this.value);");

This runs a (previously defined) JavaScript function with the ‘value’ property associated with the point which the user clicked. To distribute these properties across all the points, replace the second argument to the function with either a simple array or an array of arrays (one element per series) giving the parameter values:

sp.AddAttributes("value",Col_Vals);
sp.AddAttributes("value",new string[] {"34","27","16","62});
sp.AddAttributes("product_code",new string[][] {EastIds_DD,EastIds_RR} )

The second example would be typical for a barchart, where a product identifier could be associated with each bar segment to assist with a subsequent database query.

Another possibility is to use ‘unnamed’ properties, in which case the entire property value is written into the output stream exactly as it appears. This could be used to set a collection of properties in a single call:

sp.AddAttributes("",''onMouseOver="this.strokecolor='green'; onMouseOut="this.strokecolor='black';");

The series name may be included as a third argument if you have more than one series on the chart, and want the handlers to be applied to one series only. By default they are replicated across all series (unless the second argument is an array of arrays, one per series).

sp.SetSeriesNames(new string[] {"FirstSeries",Second Series"});
sp.AddAttributes("value",new string[] {"34","27","16","6"},"FirstSeries");

Setting properties on selected data-values

In all the examples above, the argument is passed as a 2-element set. An alternative syntax is to pass 3 or 4 arguments giving the item number and optional series name, and the specific handler for just that data value:

sp.AddAttributes("onMouseOver","this.strokecolor='green'; ",3,"MyBars");

This would set the handler only on the data point from the 3rd item of the series called “MyBars”. A useful ‘special’ setting is that if you give a handler for row=0, this is interpreted as the ‘line’ in a chart with both lines and markers. You could use this to highlight the line the mouse is over, without affecting the markers. Here is an example (using the SVG style) which highlights any of 3 lines – note that the highlight is cancelled by a generic call as it is the same for all of them:

sp.AddAttributes("onmouseover","evt.target.setAttribute('style','stroke:Red;');",0,"First line");
sp.AddAttributes("onmouseover","evt.target.setAttribute('style','stroke:Lime;');",0,"Second line");
sp.AddAttributes( "onmouseover","evt.target.setAttribute('style','stroke:Blue;');",0,"Third line");
// We can reset any of them with the same call (generic setting)
sp.AddAttributes("onmouseout","evt.target.setAttribute('style','');"

If you don’t explicitly name your series, they will be named “series-1” and so on for you, but explicit names are strongly recommended here as they are then added to the output VML or SVG as item ids, which makes debugging the finished scripts much simpler.

Setting properties on chart boilerplate

You can use the ‘target’ element to attach handlers to any of the following standard items:

Heading ... The main chart heading
Subhead ... The subsidiary heading
Footnote ... The chart footer
Pagelabels ... The page-label array
XCaption ... The X-axis caption
YCaption ... The Y-axis caption
XLabels ... The set of all X-axis labels
YLabels ... The set of all Y-axis labels
Key ... The set of chart keys (series marker and text)

Values ... Value tags on data items

XZones ... Any background regions (also YZones and XYZones)

string GoRed = "this.style.color='Red';";
ch.AddAttributes(ScriptTarget.Heading,"onMouseOver",GoRed);

If you name a target with multiple elements (such as the Key) you may pass an array of handlers, which will be associated with individual elements of the given item. An option here would be to pass an array of values (one per key element) and also attach a single Javascript fragment to all the keys which used the value to process accordingly.

sp.AddAttributes(ScriptTarget.Key,"ColorMe",new string[] {"","Lime","Fuchsia"})

The sample function Jscript has some simple ideas to show some of the possibilities. For more information on JavaScript, see any good textbook, such as the “Rhino” book from O’Reilly. Please note that scripting is possible on SVG charts, but requires considerably more JavaScript expertise and a good understanding of the SVG DOM.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: AddAttributes Method (String,String)

SharpPlot.AddAttributes Method (String,String)

Define a single handler for all values in all series.

public void AddAttributes(
    string propName,
    string propValue
);

Example

sp.AddAttributes("onMouseDown","AddMe(this.value);");

This runs a standard handler for every data-point.

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (ScriptTarget,String[])

SharpPlot.AddAttributes Method (ScriptTarget,String[])

Insert arbitrary content in the XML output for known text items.

public void AddAttributes(
    ScriptTarget targetId,
    string[] XmlContent
);

Example

sp.AddAttributes(ScriptTarget.Key,"ColorMe",new string[] {"","Lime","Fuchsia"})

A practical use of this capability would be to have mouse-over on the key emphasise the corresponding line in a multiple timeseries.

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (String,String,Int32)

SharpPlot.AddAttributes Method (String,String,Int32)

Set a single handler for a specific X value.

public void AddAttributes(
    string propName,
    string propValue,
    int itemNumber
);

Example

sp.AddAttributes("onMouseOver","this.strokecolor='green'; ",3);

This will turn the edge of the 3rd bar to green in all series (generally this call would be used when there is a single series).

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (String,String,Int32,String)

SharpPlot.AddAttributes Method (String,String,Int32,String)

Set a single handler for a specific X value in this series.

public void AddAttributes(
    string propName,
    string propValue,
    int itemNumber,
    string seriesName
);

Example

sp.AddAttributes("onMouseOver","this.strokecolor='green'; ",3,"MyBars");

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (String,String[])

SharpPlot.AddAttributes Method (String,String[])

Apply an array of handlers to all the XValues in the first series.

public void AddAttributes(
    string propName,
    string[] propValue
);

Example

sp.AddAttributes("value",new string[] {"34","27","16","62});

This will apply on ‘value’ property individually to 4 bars or markers (one item per data-element is required).

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (String,String[],String)

SharpPlot.AddAttributes Method (String,String[],String)

Apply an array of handlers that apply to all the XValues in a given series.

public void AddAttributes(
    string propName,
    string[] propValue,
    string seriesName
);

Example

sp.AddAttributes("value",new string[] {"34","27","16","6"},"FirstSeries");

This will apply 4 ‘value’ properties to the matching items in the series called “FirstSeries”.

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (String,String[][])

SharpPlot.AddAttributes Method (String,String[][])

Apply handlers to matching data items in all series.

public void AddAttributes(
    string propName,
    string[][] propValue
);

Example

sp.AddAttributes("product_code",new string[][] {EastIds_DD,EastIds_RR} )

This will apply each array of product codes to the matching items (e.g. bars in a stacked barchart) in each of 2 series.

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (ScriptTarget,String,String)

SharpPlot.AddAttributes Method (ScriptTarget,String,String)

Apply a handler to a known text item.

public void AddAttributes(
    ScriptTarget targetId,
    string propName,
    string propValue
);

Example

Put a simple handler pair on the subhead:

sp.AddAttributes(ScriptTarget.Subhead,"onMouseOver","this.style.color='Fuchsia';");
sp.AddAttributes(ScriptTarget.Subhead,"onMouseOut","this.style.color='Navy';");

For multi-part items (axis labels or keys) the items will have the handler applied individually, rather than as a group.

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (ScriptTarget,String,String[])

SharpPlot.AddAttributes Method (ScriptTarget,String,String[])

Apply an array of handlers to a set of text items.

public void AddAttributes(
    ScriptTarget targetId,
    string propName,
    string[] propValue
);

Example

sp.AddAttributes(ScriptTarget.XLabels,"onClick",my_Handlers);

Here my_Handlers is an array of strings with one handler per X-label. This could be used to drill-down to summary data for that time period.

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddAttributes Method (ScriptTarget,String)

SharpPlot.AddAttributes Method (ScriptTarget,String)

Insert arbitrary content in the XML output for a known text item.

public void AddAttributes(
    ScriptTarget targetId,
    string XmlContent
);

Example

sp.AddAttributes(ScriptTarget.Heading,"onMouseOver = \"this.style.color='Red';\"");

See also ...

SharpPlot Members | SharpPlot.AddAttributes Method


SharpPlot 3.71 User Manual: AddBookmark Method

SharpPlot.AddBookmark Method

Creates a bookmark at this point in the output stream. This will be used in PDF output to create an entry in the outline for the document.

Overloads

  • public void AddBookmark(string title);
  • public void AddBookmark(string title,int outlineLevel);
  • public void AddBookmark(string title,int outlineLevel,bool opened);
  • public void AddBookmark(string title,int outlineLevel,bool opened,string weblink);

Example

sp.Reset(590,835); // Paper size
sp.AddBookmark("January 2006",0,true);

Description

Multi-page collections of charts may be bookmarked with easily recognised names which can be organised into a tree structure to be shown by the Acrobat Reader as ‘Outlines’. It is also possible to create entries in the outline tree which jump to external resources, typically webpages or other PDFs.

The simple form of the command is ...

sp.AddBookmark("Sales analysis");

The bookmark will be placed on the next chart to be generated – you may call sp.AddBookmark several times in succession to create an outline structure if required.

Making an indented outline for Acrobat Reader

The outline information is included in the PDF file generated using sp.RenderPdf. It will often be helpful to indicate the outline level of the bookmark, with major sections at level-0 and subsidiary sections indented to form a contents tree.

sp.AddBookmark("'Sales analysis",0);
sp.AddBookmark("Europe",1);
sp.DrawBarChart(arr_europe);
sp.NewPage();
sp.AddBookmark("Asia",1)
sp.DrawBarChart(arr_asia);

... and so on. This structure will then appear in the Acrobat Viewer outline bar to the left of the document. By default, sections will be closed on opening the document – you can force the Acrobat Viewer to open a section automatically by appending true as the third parameter to the bookmark call:

sp.AddBookmark("Profit and Loss",0,true);
sp.AddBookmark("Income breakdown",1,true);
sp.AddBookmark("Consulting",2);

Linking to webpages or other PDFs

You can add a link to an external resource by including a 4th element in the call, for example:

sp.AddBookmark("Home page",0,true,"http://www.grapl.com");

This will allow the user to click on the outline entry and automatically open a web-browser at the page you give. To have Acrobat Reader load another PDF, just use a filename here in place of the url.

See also ...

SharpPlot.RenderPdf Method


SharpPlot 3.71 User Manual: AddBookmark Method (String,Int32,Boolean,String)

SharpPlot.AddBookmark Method (String,Int32,Boolean,String)

Bookmark this page with name, level, openflag and weblink.

public void AddBookmark(
    string title,
    int outlineLevel,
    bool opened,
    string weblink
);

See also ...

SharpPlot Members | SharpPlot.AddBookmark Method


SharpPlot 3.71 User Manual: AddBookmark Method (String)

SharpPlot.AddBookmark Method (String)

Add a simple Bookmark at outline level=0.

public void AddBookmark(
    string title
);

See also ...

SharpPlot Members | SharpPlot.AddBookmark Method


SharpPlot 3.71 User Manual: AddBookmark Method (String,Int32)

SharpPlot.AddBookmark Method (String,Int32)

Add a Bookmark at a given outline level.

public void AddBookmark(
    string title,
    int outlineLevel
);

See also ...

SharpPlot Members | SharpPlot.AddBookmark Method


SharpPlot 3.71 User Manual: AddBookmark Method (String,Int32,Boolean)

SharpPlot.AddBookmark Method (String,Int32,Boolean)

Add a text Bookmark at an opened outline level.

public void AddBookmark(
    string title,
    int outlineLevel,
    bool opened
);

See also ...

SharpPlot Members | SharpPlot.AddBookmark Method


SharpPlot 3.71 User Manual: AddComment Method

SharpPlot.AddComment Method

Inserts a text annotation into any of the vector output formats, typically EPS.

Example

sp.AddComment("!!Company Logo here!!");

Overloads

  • public void AddComment(string text);
  • public void AddComment(string text,string key);
  • public void AddComment(string text,bool compress);
  • public void AddComment(string text,string key,bool compress);

This could be used as a marker for some post-processing job (e.g. to insert placeholders) or simply to aid debugging of a complex collection of charts. Note that plain text will appear in EPS output with ‘% ‘ on the front, unless the text begins with the ‘%’ character in which case it will be echoed exactly as it appears.

Comments can be marked with an id string and flagged for compression. In this case the text will appear as “yourid::” followed by ASCII85-encoded flate-compressed text. This may save space, but also prevent the comment from containing characters which could destroy XML or PostScript formats. Comments saved into XML-style output (typically SVG) have the disallowed characters ampersand-encoded after compression.

Comments saved with an id string may be retrieved from any textual format with ReadComment which reverses the encoding process if required. Note that comments are only saved in PDF output if you explicitly turn off compression of the PDF page content.

See also ...

SharpPlot.ReadComment Method | SharpPlot.SavePdf Method


SharpPlot 3.71 User Manual: AddComment Method (String,String,Boolean)

SharpPlot.AddComment Method (String,String,Boolean)

Insert a note into any vector output type such as EPS with key and optional compression.

public void AddComment(
    string text,
    string key,
    bool compress
);

See also ...

SharpPlot Members | SharpPlot.AddComment Method


SharpPlot 3.71 User Manual: AddComment Method (String)

SharpPlot.AddComment Method (String)

Pass a simple uncompressed note.

public void AddComment(
    string text
);

See also ...

SharpPlot Members | SharpPlot.AddComment Method


SharpPlot 3.71 User Manual: AddComment Method (String,String)

SharpPlot.AddComment Method (String,String)

Pass a keyed uncompressed note.

public void AddComment(
    string text,
    string key
);

See also ...

SharpPlot Members | SharpPlot.AddComment Method


SharpPlot 3.71 User Manual: AddComment Method (String,Boolean)

SharpPlot.AddComment Method (String,Boolean)

Pass n unkeyed compressed note.

public void AddComment(
    string text,
    bool compress
);

See also ...

SharpPlot Members | SharpPlot.AddComment Method


SharpPlot 3.71 User Manual: AddEffect Method

SharpPlot.AddEffect Method

Associates arbitrary SVG source with any standard text item.

public void AddEffect(
    ScriptTarget target,
    string effect
);

Description

This simply inserts arbitrary SVG code into the ‘group’ tag for the text item, so almost anything goes. It could be used to make a heading ‘shadowed’, or to add animations, for example to have text slide in from the side. Check the SVG documentation for details on the syntax required for filters and animations.

Example

string svgfiters = "<defs> <filter id=\"MyShadow\"> <feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"12\" result=\"blur\"/> " +
                    "<feOffset in=\"blur\" dx=\"24\" dy=\"20\" result=\"offsetBlur\"/> <feMerge> <feMergeNode in=\"offsetBlur\"/> " +
                    "<feMergeNode in=\"SourceGraphic\"/> </feMerge> </filter> </defs>";

sp.IncludeSource(svgfilters);
sp.AddEffect(ScriptTarget.Heading,"#MyShadow");
sp.AddEffect(ScriptTarget.Heading,"letter-spacing:3");

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: AddHints Method

SharpPlot.AddHints Method

Set hints for one or more data points or a chart object.

Example

sp.AddHints(new string[] {"Jan","Feb","Mar"});
sp.AddHints(ScriptTarget.Footnote,"This is the footer.");

Overloads

  • public void AddHints(string hintText);
  • public void AddHints(string hintText,int itemNumber);
  • public void AddHints(string hintText,int itemNumber,string seriesName);
  • public void AddHints(string[] hintText);
  • public void AddHints(string[] hintText,string seriesName);
  • public void AddHints(string[][] hintText);
  • public void AddHints(ScriptTarget targetId,string hintText);
  • public void AddHints(ScriptTarget targetId,string[] hintText);

Description

This method adds hints to a given set of data points, so that as you move the mouse over the data in the viewer, the hint can be shown in the status bar at the bottom of the screen. Hints are supported by VML (directly) and by images if you create an associated imagemap. The SVG viewer does not currently show hints correctly.

To create hints for every datapoint in a series, pass an array of strings, matching the structure of your data.

sp.AddHints(Product_descriptions);

Here, a product description could be associated with each pie sector, bar segment or marker.

You may also target hints at specific data points, for example:

sp.AddHints("July figures were adjusted",7);

Which will add a hint to this specific data-item in the first (or only) series.

Adding hints to fixed items

Hints may also be used to add extra information to standard text items such as notes or headings.

ch.AddHints(ScriptTarget.Footnote,"This is the current budget");

You may give an array of hints for multiple items such as XZones or the legend text.

See also ...

SharpPlot Members | SharpPlot.AddTips Method | ScriptTarget Enumeration


SharpPlot 3.71 User Manual: AddHints Method (String)

SharpPlot.AddHints Method (String)

Define a single hint for all X values in all series.

public void AddHints(
    string hintText
);

This would only be useful on a small multiple, where the hint applies to the entire series.

See also ...

SharpPlot Members | SharpPlot.AddHints Method


SharpPlot 3.71 User Manual: AddHints Method (String,Int32)

SharpPlot.AddHints Method (String,Int32)

Set a single hint for a specific X value on the first series.

public void AddHints(
    string hintText,
    int itemNumber
);

This could be used to add extra information about a particular data point.

See also ...

SharpPlot Members | SharpPlot.AddHints Method


SharpPlot 3.71 User Manual: AddHints Method (String,Int32,String)

SharpPlot.AddHints Method (String,Int32,String)

Set a single hint for a specific X value in this series.

public void AddHints(
    string hintText,
    int itemNumber,
    string seriesName
);

This may be used to target a specific point if there are multiple series. Normally you would also explicitly name the series here.

See also ...

SharpPlot Members | SharpPlot.AddHints Method | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: AddHints Method (String[])

SharpPlot.AddHints Method (String[])

Apply an array of hints to all the XValues in the first series.

public void AddHints(
    string[] hintText
);

This is the commonest use of this method. An array of descriptions may be read from a database, and used to add extra information to the plotted values.

An alternative use is to add data-value information to 3D charts such as the Cloud chart (3D-scatter). It can be hard to see the exact position of the points against the axes, so it may be useful to hint each data-point with a string showing its x,y,z value. The user can then read off exact values with the mouse.

See also ...

SharpPlot Members | SharpPlot.AddHints Method


SharpPlot 3.71 User Manual: AddHints Method (String[],String)

SharpPlot.AddHints Method (String[],String)

Apply an array of hints that apply to all the XValues in a given series.

public void AddHints(
    string[] hintText,
    string seriesName
);

This would be used if an array of hints was to be applied to a specific data series. You would normally name the series explicitly here.

sp.AddHints(Product_descriptions,"SalesRevenue");

This will add hints to each marker or bar in the series named “SalesRevenue”.

See also ...

SharpPlot Members | SharpPlot.AddHints Method | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: AddHints Method (String[][])

SharpPlot.AddHints Method (String[][])

Apply hints to matching data items in all series.

public void AddHints(
    string[][] hintText
);

This would be used to place hints automatically on multiple series.

sp.AddHints(new string[][] {Market1,Market2});

The hints might give more details about the data collected for a particular market or product line.

See also ...

SharpPlot Members | SharpPlot.AddHints Method


SharpPlot 3.71 User Manual: AddHints Method (ScriptTarget,String)

SharpPlot.AddHints Method (ScriptTarget,String)

Apply a hint to a known text item.

public void AddHints(
    ScriptTarget targetId,
    string hintText
);

This may be used to add extra information to fixed text, such as a heading.

See also ...

SharpPlot Members | SharpPlot.AddHints Method


SharpPlot 3.71 User Manual: AddHints Method (ScriptTarget,String[])

SharpPlot.AddHints Method (ScriptTarget,String[])

Apply an array of hints to a set of text items.

public void AddHints(
    ScriptTarget targetId,
    string[] hintText
);

This call may be used to add an array of hints to a text item such as the chart key.

sp.AddHints(ScriptTarget.Key,Product_descriptions);

Here, the product codes could be used to make a short legend, with the full description available to the user as a status-line hint.

See also ...

SharpPlot Members | SharpPlot.AddHints Method


SharpPlot 3.71 User Manual: AddHyperlinks Method

SharpPlot.AddHyperlinks Method

Set up hyperlinks for one or more data points or a chart object.

Example

sp.AddHyperlinks("http://www.grapl.com");
sp.AddHyperlinks(new string[] {"north.htm","south.htm"});

Overloads

  • public void AddHyperlinks(string links);
  • public void AddHyperlinks(string links,int itemNumber);
  • public void AddHyperlinks(string links,int itemNumber,string seriesName);
  • public void AddHyperlinks(string[] links);
  • public void AddHyperlinks(string[] links,string seriesName);
  • public void AddHyperlinks(string[][] links);
  • public void AddHyperlinks(ScriptTarget targetId,string links);
  • public void AddHyperlinks(ScriptTarget targetId,string[] links);

This method is used to make ‘active’ graphics work on your web site. It allows you to associate any URL (typically the address of another page on your site) with a data point on the chart. You may define the jump explicitly by data item, giving the index of the data point in the series, and the target URL. For example:

sp.AddHyperlinks("boring.htm",2);
sp.DrawPieChart(New int[] {3,2,1});

The second pie slice will show a ‘pointing hand’ in the web browser and when clicked it will route you to the page ‘boring.htm’. To jump to an anchor within the target page add ‘#anchor’ to the tag as usual. To route the jump to a specific frame, add the frame id to the URL, separated with a semi-colon:

sp.AddHyperlinks("detail.htm#July;footnote",7);

This would be a good way to allow the user to click on the datapoints of a timeseries and see a summary of the numeric information for that datapoint in a second frame below the chart.

Setting up multiple links

If you have a target page for every datapoint, you can omit the item information entirely and simply supply an array of strings, shaped to match your data exactly.

sp.AddHyperlinks(new string[] {"North.htm","South.htm"});

This is probably the commonest call to this method, as the array of target pages could be read from a database in the same query as you use to obtain the values.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: AddHyperlinks Method (String)

SharpPlot.AddHyperlinks Method (String)

Define a single hyperlink for all X values in all series.

public void AddHyperlinks(
    string links
);

This would only be useful for a ‘blanket’ call, such as a link back to a home page.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method


SharpPlot 3.71 User Manual: AddHyperlinks Method (String,Int32)

SharpPlot.AddHyperlinks Method (String,Int32)

Set a single link for a specific X value.

public void AddHyperlinks(
    string link,
    int itemNumber
);

This allows you to target a particular data-point with an HTML jump. It may be called multiple times if required to target a selection of points.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method


SharpPlot 3.71 User Manual: AddHyperlinks Method (String,Int32,String)

SharpPlot.AddHyperlinks Method (String,Int32,String)

Set a single link for a specific X value in this series.

public void AddHyperlinks(
    string links,
    int itemNumber,
    string seriesName
);

This will target a specific item in a named series with an HTML jump.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: AddHyperlinks Method (String[])

SharpPlot.AddHyperlinks Method (String[])

Apply an array of links to all the data items in the first series.

public void AddHyperlinks(
    string[] links
);

This will apply a set of links to the corresponding data items.

You may use this call with an array of blank (at least one blank character is required per item) strings to get a ‘pointing hand’ cursor shown over each point. This may be useful if the points also have JavaScript actions and you want to indicate this to the user.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method


SharpPlot 3.71 User Manual: AddHyperlinks Method (String[],String)

SharpPlot.AddHyperlinks Method (String[],String)

Apply an array of links that apply to all the data items in a given series.

public void AddHyperlinks(
    string[] links,
    string seriesName
);

Normally, you would also name the series here.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: AddHyperlinks Method (String[][])

SharpPlot.AddHyperlinks Method (String[][])

Apply links to matching data items in all series.

public void AddHyperlinks(
    string[][] links
);

This may be used to apply links to a set of series drawn in one or more plotting calls.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method


SharpPlot 3.71 User Manual: AddHyperlinks Method (ScriptTarget,String)

SharpPlot.AddHyperlinks Method (ScriptTarget,String)

Apply a link to a known text item.

public void AddHyperlinks(
    ScriptTarget targetId,
    string link
);

This call could be used to add a jump back to a home page from a chart heading or footnote.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method | ScriptTarget Enumeration


SharpPlot 3.71 User Manual: AddHyperlinks Method (ScriptTarget,String[])

SharpPlot.AddHyperlinks Method (ScriptTarget,String[])

Apply an array of links to a set of text items.

public void AddHyperlinks(
    ScriptTarget targetId,
    string[] links
);

This call would typically be used to add ‘drilldown’ capability to the chart key, or to switch dimension using the PageLabels.

See also ...

SharpPlot Members | SharpPlot.AddHyperlinks Method | ScriptTarget Enumeration


SharpPlot 3.71 User Manual: AddJavaPrologue Method

SharpPlot.AddJavaPrologue Method

Add a javascript prologue to chart rendered as SVG or VML.

Example

sp.AddJavaPrologue(jsbarscript);

Overloads

  • public void AddJavaPrologue(string script);
  • public void AddJavaPrologue(string[] script);

This may be called repeatedly to add several JavaScript methods into the chart output stream. It would normally be called with a simple (newline separated) string of source code.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: AddJavaPrologue Method (String[])

SharpPlot.AddJavaPrologue Method (String[])

Include the definition of a JavaScript function in the output chart.

public void AddJavaPrologue(
    string[] script
);

See also ...

SharpPlot Members | SharpPlot.AddJavaPrologue Method


SharpPlot 3.71 User Manual: AddJavaPrologue Method (String)

SharpPlot.AddJavaPrologue Method (String)

Add a single line function or give a link to a script file.

public void AddJavaPrologue(
    string script
);

See also ...

SharpPlot Members | SharpPlot.AddJavaPrologue Method


SharpPlot 3.71 User Manual: AddTableShading Method

SharpPlot.AddTableShading Method

Add background color and optional shading to a table cell.

Example

sp.AddTableShading(4,1,Color.Aqua);
sp.AddTableShading(5,1,Color.Aqua);
sp.AddTableShading(6,1,Color.Firebrick,FillStyle.Opacity30);
sp.AddTableShading(2,2,Color.Firebrick,FillStyle.GradientBottomLeft);

Overloads

  • public void AddTableShading(int row,int col,Color cellColor);
  • public void AddTableShading(int row,int col,Color cellColor,FillStyle cellFill);

Table cells may be individually shaded, possibly to flag exceptions, for example negative values. Some tables (such as sports results) are conventionally drawn with the diagonal shaded grey, as a team can never play a match against itself.

This method may be called as many times as required to apply solid color or a colour and selected fill pattern cell by cell.

See also ...

SharpPlot Members | SharpPlot.DrawTable Method | FillStyle Struct


SharpPlot 3.71 User Manual: AddTableShading Method (Int32,Int32,Color,FillStyle)

SharpPlot.AddTableShading Method (Int32,Int32,Color,FillStyle)

Add a combination of Color and Fill to an individual table cell.

public void AddTableShading(
    int row,
    int col,
    Color cellColor,
    FillStyle cellFill
);

See also ...

SharpPlot Members | SharpPlot.AddTableShading Method


SharpPlot 3.71 User Manual: AddTableShading Method (Int32,Int32,Color)

SharpPlot.AddTableShading Method (Int32,Int32,Color)

Shade a cell in solid color.

public void AddTableShading(
    int row,
    int col,
    Color cellColor
);

See also ...

SharpPlot Members | SharpPlot.AddTableShading Method


SharpPlot 3.71 User Manual: AddTips Method

SharpPlot.AddTips Method

Set tips for one or more data points or a chart object.

Example

sp.AddTips(new string[] {"Home","Export"});
sp.AddTips("Hello, world",7,"LastSeries");
sp.AddTips(ScriptTarget.Heading,"This is my chart");

Overloads

  • public void AddTips(string tipText);
  • public void AddTips(string tipText,int itemNumber);
  • public void AddTips(string tipText,int itemNumber,string seriesName);
  • public void AddTips(string[] tipText);
  • public void AddTips(string[] tipText,string seriesName);
  • public void AddTips(string[][] tipText);
  • public void AddTips(ScriptTarget targetId,string tipText);
  • public void AddTips(ScriptTarget targetId,string[] tipText);

Description

This method adds pop-up hints to a given set of data points, so that as you move the mouse over the data in the viewer, the hint can be shown in the status bar at the bottom of the screen. Hints are supported by VML (directly) and by images if you create an associated imagemap. Title tags are added to the SVG output, and may be rendered as pop-ups using JavaScript.

To create tips for every datapoint in a series, pass an array of strings, matching the structure of your data.

sp.AddTips(Product_descriptions);

Here, a product description could be associated with each pie sector, bar segment or marker.

You may also target specific data points, for example:

sp.AddTips("End of year",3);

Which will add a tip to this specific data-item in the first (or only) series.

Adding tips to fixed items

Tips may also be used to add extra information to standard text items such as notes or headings. You may give an array of hints for multiple items such as XZones or the legend text.

ch.AddTips(ScriptTarget.XZones,new string[]{"Reagan","Carter","Clinton"});

This would typically be used to annotate a ‘backcloth’ of historical events behind a timeseries.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: AddTips Method (String)

SharpPlot.AddTips Method (String)

Define a single tip for all X values in all series.

public void AddTips(
    string tipText
);

Useful only for small multiples, where all datapoints could have the series name as the tip.

See also ...

SharpPlot Members | SharpPlot.AddTips Method


SharpPlot 3.71 User Manual: AddTips Method (String,Int32)

SharpPlot.AddTips Method (String,Int32)

Set a single tip for a specific X value.

public void AddTips(
    string tipText,
    int itemNumber
);

Targets a tip at the given X-value in the first (or only) series.

See also ...

SharpPlot Members | SharpPlot.AddTips Method


SharpPlot 3.71 User Manual: AddTips Method (String,Int32,String)

SharpPlot.AddTips Method (String,Int32,String)

Set a single tip for a specific X value in this series.

public void AddTips(
    string tipText,
    int itemNumber,
    string seriesName
);

Targets a specific data-item in the given series.

See also ...

SharpPlot Members | SharpPlot.AddTips Method | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: AddTips Method (String[])

SharpPlot.AddTips Method (String[])

Apply an array of tips to all the XValues in the only series.

public void AddTips(
    string[] tipText
);

This call would typically take descriptions from a database, and apply them to a matching set of values retrieved with the same call. It can be used to add an extra ‘dimension’ to data, for example in a Contour plot of pressure against temperature, you may set a yield as the z-value to have contours drawn, and set the z-values as tips for all the points.

See also ...

SharpPlot Members | SharpPlot.AddTips Method


SharpPlot 3.71 User Manual: AddTips Method (String[],String)

SharpPlot.AddTips Method (String[],String)

Apply an array of tips that apply to all the XValues in a given series.

public void AddTips(
    string[] tipText,
    string seriesName
);

Normally you would also name the series here.

See also ...

SharpPlot Members | SharpPlot.AddTips Method | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: AddTips Method (String[][])

SharpPlot.AddTips Method (String[][])

Apply tips to matching data items in all series.

public void AddTips(
    string[][] tipText
);

Called when several series are plotted in the same call, and you have matching tips for all of them.

See also ...

SharpPlot Members | SharpPlot.AddTips Method


SharpPlot 3.71 User Manual: AddTips Method (ScriptTarget,String)

SharpPlot.AddTips Method (ScriptTarget,String)

Apply a tip to a known text item.

public void AddTips(
    ScriptTarget targetId,
    string tipText
);

This could be used to add extra information to a chart heading or note.

See also ...

SharpPlot Members | SharpPlot.AddTips Method


SharpPlot 3.71 User Manual: AddTips Method (ScriptTarget,String[])

SharpPlot.AddTips Method (ScriptTarget,String[])

Apply an array of tips to a set of text items.

public void AddTips(
    ScriptTarget targetId,
    string[] tipText
);

Typically this would be used with the chart Key or PageLabels to add more information about a drill-down link.

See also ...

SharpPlot Members | SharpPlot.AddTips Method


SharpPlot 3.71 User Manual: DefineFont Method

SharpPlot.DefineFont Method

Add a short code for a complex font definition to use in many font setters.

Example

sp.DefineFont("AS","Arial,sans","filter:url(#MyShadow);opacity:0.8");

Overloads

  • public void DefineFont(string fontCode,string fontName);
  • public void DefineFont(string fontCode,string fontName,string fontCss);
  • public void DefineFont(string fontCode,string fontName,string fontCss,string fontPS);

Creating a stylesheet

This method may be used simply to define a ‘house style’ of fonts to save possible errors in typing the full name, and to make future change much simpler. You may give each font face a short code, for example:

sp.DefineFont("VN","Verdana,Arial,Sans"); // Try Verdana, then Arial, then fallback to any font of the "sans" family.

Note that as for other Font setters, a list of comma-separated fallbacks fonts can be provided.

From now on, you can use any of the four short codes ‘VN’ ‘VNB’ ‘VNI’ or ‘VNBI’ to get the four variants of this basic font. To have your Captions in Verdana,Italic, (at default size) you simply use:

sp.SetCaptionFont("VNI",Color.Teal);

Adding extra CSS details

SharpPlot allows you to insert any extra CSS properties you want after the font name. These are passed on to charts rendered as SVG or VML, and may be used for various special effects. They are ignored in images and PDF rendering.

sp.DefineFont("VN","Verdana","opacity:0.8");

You can set any standard font property here, for example letter-spacing to open out heading text slightly, or reference a filter set with IncludeSource.

Setting up PostScript equivalents

If you are generating an EPS document, you may need to map your screen font to a PostScript font known on the printer.

sp.DefineFont("VN","Verdana","","Univers");

You may also provide the four variants (regular, bold, italic, bold+italic) as a comma-separated list, if they do not have standard postscript variant names. So the line below is equivalent to the above :

sp.DefineFont("VN","Verdana","","Univers,Univers-Bold,Univers-Italic,Univers-BoldItalic");

Check with the repro house to be sure you get the names exactly correct here!

Embedding PFA font files

A PFA font file can be embedded if a fontname is followed by ‘@’ and then the path to the font file. That allows the Postscript file to be independent of the presence of the font by the displaying device.

sp.DefineFont("VN,"Verdana","","Univers@C:\\fonts\\univers.pfa"; // specify the font file to embed that has the font as described by the name.

A PFA font file can be generated from a TTF file with “ttd2pt1 -e”. Of course a different file can be provided for each of the four variants.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: DefineFont Method (String,String,String,String)

SharpPlot.DefineFont Method (String,String,String,String)

Create a definition for a font, including CSS details and PostScript name.

public void DefineFont(
    string fontCode,
    string fontName,
    string fontCss,
    string fontPS
);

See also ...

SharpPlot Members | SharpPlot.DefineFont Method


SharpPlot 3.71 User Manual: DefineFont Method (String,String)

SharpPlot.DefineFont Method (String,String)

Associate a short code with a full font name.

public void DefineFont(
    string fontCode,
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.DefineFont Method


SharpPlot 3.71 User Manual: DefineFont Method (String,String,String)

SharpPlot.DefineFont Method (String,String,String)

Associate a short code with a font name and extra CSS details.

public void DefineFont(
    string fontCode,
    string fontName,
    string fontCss
);

See also ...

SharpPlot Members | SharpPlot.DefineFont Method


SharpPlot 3.71 User Manual: DrawBarChart Method

SharpPlot.DrawBarChart Method

Constructs a grouped or stacked barchart from given data values.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
data = new int[] {18,27,31,12,19,23};
sp.DrawBarChart(data);

Barcharts may be drawn vertically or horizontally – the short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawBarChart(int[] data);
  • public void DrawBarChart(double[] data);
  • public void DrawBarChart(int[][] data);
  • public void DrawBarChart(double[][] data);

Description

Bar charts are generally used to represent data which fall in clear groupings (such as regional totals) where the bars are equally spaced along an arbitrary X-axis. The bars are often labelled with the data value, or possibly with the name of the group as an alternative to specifying X-axis labels.

SharpPlot treats arrays of arrays of values as representing multiple data series, and creates one group of bars for each series, so two series (each with 12 items) would make 12 pairs of bars, probably labelled ‘Jan’ ...’Dec’. By default, the bars are drawn as groups (you may control the spacing with the Gap and GroupGap properties) but the bars may also be stacked to show a cumulative total. The Key would generally be used to identify the groups – if you have used GroupBy to create the groups from a single column of data, the key is preset for you to the group names.

Barcharts are normally drawn vertically, but may be switched to horizontal if required. This is often a better style of the bar labels may be quite long, as it is easy to make more space in the left margin.

See also ...

Bar charts for small series | SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawBarChart Method (Double[][])

SharpPlot.DrawBarChart Method (Double[][])

Draws a grouped or stacked barchart from an array of arrays of values.

public void DrawBarChart(
    double[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBarChart Method


SharpPlot 3.71 User Manual: DrawBarChart Method (Double[])

SharpPlot.DrawBarChart Method (Double[])

Draws a simple barchart from an array of values.

public void DrawBarChart(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBarChart Method


SharpPlot 3.71 User Manual: DrawBarChart Method (Int32[][])

SharpPlot.DrawBarChart Method (Int32[][])

Draws a grouped or stacked barchart from an integer array of arrays of values.

public void DrawBarChart(
    int[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBarChart Method


SharpPlot 3.71 User Manual: DrawBarChart Method (Int32[])

SharpPlot.DrawBarChart Method (Int32[])

Draws a simple barchart from an array of integer values.

public void DrawBarChart(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBarChart Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method

SharpPlot.DrawBoxPlot Method

Construct box-whisker plot from data and zero, one or two optional categories. The categories may be integer or string arrays (in any combination) or they may both be boolean arrays. The data may be an integer or double array.

Boxplots may be drawn vertically (the default) or horizontally. The short tutorial shows a few of the possibilities with a classic dataset from the 1930s.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
years = new int[] {1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,
         1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1931,1932,1932,1932,1932,
         1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,1932,
         1932,1932,1932,1932,1932};
yield = new int[] {27,48,27,39,32,28,43,55,28,38,29,29,35,47,25,40,29,25,39,50,26,
         41,23,26,26,33,34,32,22,22,36,37,35,26,14,25,27,38,35,20,16,22,26,37,38,32,
         32,22};
sp.SetColors(Color.Orange);
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.DrawBoxPlot(yield,years);

Overloads

  • public void DrawBoxPlot(int[] data);
  • public void DrawBoxPlot(double[] data);
  • public void DrawBoxPlot(int[][] data);
  • public void DrawBoxPlot(double[][] data);
  • public void DrawBoxPlot(int[] data,int[] cat1);
  • public void DrawBoxPlot(int[] data,bool[] cat1);
  • public void DrawBoxPlot(double[] data,int[] cat1);
  • public void DrawBoxPlot(int[] data,string[] cat1);
  • public void DrawBoxPlot(double[] data,bool[] cat1);
  • public void DrawBoxPlot(double[] data,string[] cat1);
  • public void DrawBoxPlot(int[] data,int[] cat1,int[] cat2);
  • public void DrawBoxPlot(int[] data,bool[] cat1,bool[] cat2);
  • public void DrawBoxPlot(double[] data,int[] cat1,int[] cat2);
  • public void DrawBoxPlot(int[] data,string[] cat1,int[] cat2);
  • public void DrawBoxPlot(int[] data,int[] cat1,string[] cat2);
  • public void DrawBoxPlot(double[] data,bool[] cat1,bool[] cat2);
  • public void DrawBoxPlot(double[] data,string[] cat1,int[] cat2);
  • public void DrawBoxPlot(double[] data,int[] cat1,string[] cat2);
  • public void DrawBoxPlot(int[] data,string[] cat1,string[] cat2);
  • public void DrawBoxPlot(double[] data,string[] cat1,string[] cat2);

Description

Tukey’s Box-and-Whisker design is often the best way to approach a large dataset when it is not clear what the significant relationships are. The ‘box’ shows the span of the data between the lower and upper quartiles, with a bar drawn at the median value. The ‘Whiskers’ show the total span of the data – you can use the ‘Deciles’ style to have a dotted line drawn from the 10% and 90% points out to the extremes to reduce the visual impact of outliers.

See also ...

Box-and-Whisker plots for multivariate data | SharpPlot Members | SharpPlot.BoxPlotStyle Property


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],Int32[],Int32[])

SharpPlot.DrawBoxPlot Method (Double[],Int32[],Int32[])

Construct compound box-whisker plot from a data array and two integer category arrays.

public void DrawBoxPlot(
    double[] data,
    int[] cat1,
    int[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],String[],String[])

SharpPlot.DrawBoxPlot Method (Double[],String[],String[])

Construct box-whisker plot from data array and two string categories.

public void DrawBoxPlot(
    double[] data,
    string[] cat1,
    string[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],String[])

SharpPlot.DrawBoxPlot Method (Int32[],String[])

Construct box-whisker plot from integer data array and one string category.

public void DrawBoxPlot(
    int[] data,
    string[] cat1
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],String[],Int32[])

SharpPlot.DrawBoxPlot Method (Int32[],String[],Int32[])

Construct box-whisker plot from integer data array, one string and one integer category.

public void DrawBoxPlot(
    int[] data,
    string[] cat1,
    int[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],Int32[],String[])

SharpPlot.DrawBoxPlot Method (Int32[],Int32[],String[])

Construct box-whisker plot from integer data array, one integer and one string category.

public void DrawBoxPlot(
    int[] data,
    int[] cat1,
    string[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],String[],String[])

SharpPlot.DrawBoxPlot Method (Int32[],String[],String[])

Construct box-whisker plot from integer data array and two string categories.

public void DrawBoxPlot(
    int[] data,
    string[] cat1,
    string[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],Boolean[])

SharpPlot.DrawBoxPlot Method (Double[],Boolean[])

Construct box-whisker plot from data array and one boolean category.

public void DrawBoxPlot(
    double[] data,
    bool[] cat1
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],Boolean[],Boolean[])

SharpPlot.DrawBoxPlot Method (Double[],Boolean[],Boolean[])

Construct box-whisker plot from data array and two boolean categories.

public void DrawBoxPlot(
    double[] data,
    bool[] cat1,
    bool[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],Boolean[])

SharpPlot.DrawBoxPlot Method (Int32[],Boolean[])

Construct box-whisker plot from integer data array and one boolean category.

public void DrawBoxPlot(
    int[] data,
    bool[] cat1
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],Boolean[],Boolean[])

SharpPlot.DrawBoxPlot Method (Int32[],Boolean[],Boolean[])

Construct box-whisker plot from integer data array and two boolean categories.

public void DrawBoxPlot(
    int[] data,
    bool[] cat1,
    bool[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[][])

SharpPlot.DrawBoxPlot Method (Double[][])

Take numeric array elements as pre-categorised data for Boxplot.

public void DrawBoxPlot(
    double[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[])

SharpPlot.DrawBoxPlot Method (Double[])

Construct box-whisker plot from data array.

public void DrawBoxPlot(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[][])

SharpPlot.DrawBoxPlot Method (Int32[][])

Take integer array elements as pre-categorised data for Boxplot.

public void DrawBoxPlot(
    int[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],Int32[])

SharpPlot.DrawBoxPlot Method (Double[],Int32[])

Construct box-whisker plot from data array and one integer category.

public void DrawBoxPlot(
    double[] data,
    int[] cat1
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[])

SharpPlot.DrawBoxPlot Method (Int32[])

Construct box-whisker plot from integer data array.

public void DrawBoxPlot(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],Int32[])

SharpPlot.DrawBoxPlot Method (Int32[],Int32[])

Construct box-whisker plot from integer data array and one integer category.

public void DrawBoxPlot(
    int[] data,
    int[] cat1
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Int32[],Int32[],Int32[])

SharpPlot.DrawBoxPlot Method (Int32[],Int32[],Int32[])

Construct box-whisker plot from integer data array and two integer categories.

public void DrawBoxPlot(
    int[] data,
    int[] cat1,
    int[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],String[])

SharpPlot.DrawBoxPlot Method (Double[],String[])

Construct box-whisker plot from data array and one string category.

public void DrawBoxPlot(
    double[] data,
    string[] cat1
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],String[],Int32[])

SharpPlot.DrawBoxPlot Method (Double[],String[],Int32[])

Construct box-whisker plot from data array, one string and one integer category.

public void DrawBoxPlot(
    double[] data,
    string[] cat1,
    int[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBoxPlot Method (Double[],Int32[],String[])

SharpPlot.DrawBoxPlot Method (Double[],Int32[],String[])

Construct box-whisker plot from data array, one integer and one string category.

public void DrawBoxPlot(
    double[] data,
    int[] cat1,
    string[] cat2
);

See also ...

SharpPlot Members | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: DrawBubbleChart Method

SharpPlot.DrawBubbleChart Method

Make an incidence plot from x and y data and marker scales.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(6,18,24,4);
sp.SetMarkers(Marker.Bullet);
sp.SetMarkerScales(5);
ydata = new int[] {190,270,310,120,190,230};
xdata = new int[] {17,31,29,14,16,24};
count = new int[] {12,65,77,7,9,112};
sp.BubbleChartStyle = BubbleChartStyles.ExplodeAxes|BubbleChartStyles.GridLines;
sp.DrawBubbleChart(ydata,xdata,count);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawBubbleChart(int[] yValues,int[] xValues,int[] markerArea);
  • public void DrawBubbleChart(int[] yValues,int[] xValues,double[] markerArea);
  • public void DrawBubbleChart(double[] yValues,double[] xValues,int[] markerArea);
  • public void DrawBubbleChart(double[] yValues,double[] xValues,double[] markerArea);

Description

This chart is a variant of the standard ScatterPlot with the size of the markers used to show an extra dimension in the data. The third argument gives the required marker area (typically the number of incidents recorded at a certain location) and all the markers are automatically scaled to cover the range of areas given.

Any marker may be used here (including user-defined markers) but simple solid circles are probably best. See the tutorial for some more possibilities.

See also ...

Bubble charts for discrete XYZ data | SharpPlot Members | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: DrawBubbleChart Method (Double[],Double[],Double[])

SharpPlot.DrawBubbleChart Method (Double[],Double[],Double[])

Scatterplot from 2 arrays of data with markers scaled by 3rd array.

public void DrawBubbleChart(
    double[] yValues,
    double[] xValues,
    double[] markerArea
);

See also ...

SharpPlot Members | SharpPlot.DrawBubbleChart Method


SharpPlot 3.71 User Manual: DrawBubbleChart Method (Double[],Double[],Int32[])

SharpPlot.DrawBubbleChart Method (Double[],Double[],Int32[])

Make an incidence plot from x and y data and integer marker scales.

public void DrawBubbleChart(
    double[] yValues,
    double[] xValues,
    int[] markerArea
);

See also ...

SharpPlot Members | SharpPlot.DrawBubbleChart Method


SharpPlot 3.71 User Manual: DrawBubbleChart Method (Int32[],Int32[],Double[])

SharpPlot.DrawBubbleChart Method (Int32[],Int32[],Double[])

Make an incidence plot from integer x and y data and double marker scales.

public void DrawBubbleChart(
    int[] yValues,
    int[] xValues,
    double[] markerArea
);

See also ...

SharpPlot Members | SharpPlot.DrawBubbleChart Method


SharpPlot 3.71 User Manual: DrawBubbleChart Method (Int32[],Int32[],Int32[])

SharpPlot.DrawBubbleChart Method (Int32[],Int32[],Int32[])

Make an incidence plot from integer x and y data and marker scales.

public void DrawBubbleChart(
    int[] yValues,
    int[] xValues,
    int[] markerArea
);

See also ...

SharpPlot Members | SharpPlot.DrawBubbleChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method

SharpPlot.DrawCloudChart Method

Draw 3D grid and construct 3D Scatter from x,y and z values.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(0,12,18,4);
sp.SetMarkers(Marker.Bullet);
ydata = new int[] {19,27,31,12,19,23};
xdata = new int[] {7,31,29,14,16,24};
zdata = new int[] {12,65,77,7,9,112};
sp.CloudChartStyle = CloudChartStyles.WallShading|CloudChartStyles.GridLines|
         CloudChartStyles.Risers;
sp.SetMarkers(Marker.Ball);
sp.Perspective = 6;
sp.SetAxisStyle(Color.Gray,LineStyle.Solid,0.5);
sp.DrawCloudChart(xdata,ydata,zdata);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawCloudChart(int[] xValues,int[] yValues,int[] zValues);
  • public void DrawCloudChart(string[] xCategories,int[] yValues,int[] zValues);
  • public void DrawCloudChart(int[] xValues,string[] yCategories,int[] zValues);
  • public void DrawCloudChart(double[] xValues,double[] yValues,double[] zValues);
  • public void DrawCloudChart(string[] xCategories,int[] yValues,double[] zValues);
  • public void DrawCloudChart(int[] xValues,string[] yCategories,double[] zValues);
  • public void DrawCloudChart(string[] xCategories,string[] yCategories,int[] zValues);
  • public void DrawCloudChart(string[] xCategories,string[] yCategories,double[] zValues);
  • public void DrawCloudChart(int[] xValues,int[] yValues,double[][] zValues);
  • public void DrawCloudChart(double[] xValues,double[] yValues,double[][] zValues);

Description

The Cloud chart is essentially a scatter-plot in 3 dimensions (maybe you are running an experiment in which you vary pressure and temperature, and are interested in the yield of the result). Rather than fitting a line to show the relationship between input and output, you fit a plane (if the data is linear in both x and y) or a curved surface. The markers are often located in XY-space by drawing risers from the ‘paper’ – this makes it much easier to visualise where they are positioned.

In fact, the Cloudchart is much more versatile than this, as it can also be drawn with lines connecting the points, or planes shaded down to the XY plane (the Z-value is always assumed to be drawn vertically). The Tutorial gives several more examples, and of course multiple charts may be combined using a common set of axes to make quite complex diagrams in 3 dimensions.

See also ...

Cloud charts for discrete XYZ data with perspective | SharpPlot Members | SharpPlot.CloudChartStyle Property


SharpPlot 3.71 User Manual: DrawCloudChart Method (Double[],Double[],Double[][])

SharpPlot.DrawCloudChart Method (Double[],Double[],Double[][])

3D Scatter from x,y and multiple z values.

public void DrawCloudChart(
    double[] xValues,
    double[] yValues,
    double[][] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (String[],String[],Int32[])

SharpPlot.DrawCloudChart Method (String[],String[],Int32[])

3D scatter from category X,Y, int Z values.

public void DrawCloudChart(
    string[] xCategories,
    string[] yCategories,
    int[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (Double[],Double[],Double[])

SharpPlot.DrawCloudChart Method (Double[],Double[],Double[])

3D scatter from 3 double arrays giving X,Y,Z values.

public void DrawCloudChart(
    double[] xValues,
    double[] yValues,
    double[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (Int32[],Int32[],Double[][])

SharpPlot.DrawCloudChart Method (Int32[],Int32[],Double[][])

3D scatter from integer X,Y and multiple Z values.

public void DrawCloudChart(
    int[] xValues,
    int[] yValues,
    double[][] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (Int32[],Int32[],Int32[])

SharpPlot.DrawCloudChart Method (Int32[],Int32[],Int32[])

3D scatter from 3 arrays of integer X,Y,Z values.

public void DrawCloudChart(
    int[] xValues,
    int[] yValues,
    int[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (String[],Int32[],Double[])

SharpPlot.DrawCloudChart Method (String[],Int32[],Double[])

3D scatter from category X, int Y, double Z values.

public void DrawCloudChart(
    string[] xCategories,
    int[] yValues,
    double[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (Int32[],String[],Double[])

SharpPlot.DrawCloudChart Method (Int32[],String[],Double[])

3D scatter from int X, category Y, double Z values.

public void DrawCloudChart(
    int[] xValues,
    string[] yCategories,
    double[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (String[],String[],Double[])

SharpPlot.DrawCloudChart Method (String[],String[],Double[])

3D scatter from category X,Y, double Z values.

public void DrawCloudChart(
    string[] xCategories,
    string[] yCategories,
    double[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (String[],Int32[],Int32[])

SharpPlot.DrawCloudChart Method (String[],Int32[],Int32[])

3D scatter from category X, int Y,Z values.

public void DrawCloudChart(
    string[] xCategories,
    int[] yValues,
    int[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawCloudChart Method (Int32[],String[],Int32[])

SharpPlot.DrawCloudChart Method (Int32[],String[],Int32[])

3D scatter from int X, category Y, int Z values.

public void DrawCloudChart(
    int[] xValues,
    string[] yCategories,
    int[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: DrawContourPlot Method

SharpPlot.DrawContourPlot Method

Generate contour plot from xyz values passed as 3 arrays.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(6,18,18,4);
sp.SetMarkers(Marker.Bullet);
sp.ContourPlotStyle = ContourPlotStyles.GridLines|ContourPlotStyles.Curves;
sp.SetXTickMarks(50);
sp.SetZTickMarks(50);
sp.MeshDensity = 5;
ydata = new int[] {190,270,310,120,190,230};
xdata = new int[] {17,31,29,14,16,24};
elevation = new int[] {12,65,77,7,9,112};
sp.DrawContourPlot(ydata,xdata,elevation);

The short tutorial develops several examples, showing various strategies for contour fitting.

Overloads

  • public void DrawContourPlot(int[] xValues,int[] yValues,int[] zValues);
  • public void DrawContourPlot(double[] xValues,double[] yValues,double[] zValues);

Description

Contour plots are often an excellent alternative to 3D presentations where the object is to model three-dimensional data. Obviously, they can be used ‘just like a map’ where you may have a set of spot-heights (z-values) at various locations on the xy-plane. In this case, there is no particular shape assumed for the landscape, and the contours would simply be drawn to give the best ‘smooth interpretation’ of the recorded heights.

Another good use of contour plots is to fit some kind of model to the results from any experiment where two factors are systematically altered, and a third one is measured. In this case, the contours represent the model (they will simply be angled lines if the model is linear in both x and y directions) and make it very easy to read off the predicted result for any combination of input variables.

Several examples of various types of fitted contours are given in the tutorial. You will almost certainly need to experiment with the Order of fit and Flexibility properties to get the best results for your particular data.

See also ...

Contour plots for XYZ interpolation | SharpPlot Members | SharpPlot.Flexibility Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.SetOrderOfFit Method


SharpPlot 3.71 User Manual: DrawContourPlot Method (Double[],Double[],Double[])

SharpPlot.DrawContourPlot Method (Double[],Double[],Double[])

Contour plot from 3 arrays of double values.

public void DrawContourPlot(
    double[] xValues,
    double[] yValues,
    double[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawContourPlot Method


SharpPlot 3.71 User Manual: DrawContourPlot Method (Int32[],Int32[],Int32[])

SharpPlot.DrawContourPlot Method (Int32[],Int32[],Int32[])

Contour plot from arrays of integers.

public void DrawContourPlot(
    int[] xValues,
    int[] yValues,
    int[] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawContourPlot Method


SharpPlot 3.71 User Manual: DrawDialChart Method

SharpPlot.DrawDialChart Method

Draw a dial or gauge from one or more data values, with optional warning zones.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(10,10,0,0);
sp.DialChartStyle = DialChartStyles.ArrowLines;
sp.SetXRange(0,100);
sp.DrawDialChart(23);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawDialChart(double data);
  • public void DrawDialChart(int[] data);
  • public void DrawDialChart(double[] data);
  • public void DrawDialChart(int[] data,int[] radii);
  • public void DrawDialChart(double[] data,int[] radii);

Description

The Dial or Gauge chart is often used to present a single value (maybe a benchmark index of company performance) in the context of an expected or desired range. The value on its own may mean very little (maybe our production plant made 23% rejects last week) until it is set in the context of the expected range (say 20% – 30% is normal, 30-40% is unusually poor, and so on). The dial chart can be set up with a range to cover the likely values, and a series of colored ‘zones’ to indicate the actions appropriate to each value – typically OK, Warning, Critical.

Dials are often grouped in the likeness of a dashboard or aircraft cockpit to give the user a degree of familiarity with the experience of monitoring the various instruments found in a vehicle or aeroplane.

See also ...

Dials and Gauges for isolated numbers | SharpPlot Members | SharpPlot.DialChartStyle Property


SharpPlot 3.71 User Manual: DrawDialChart Method (Double[],Int32[])

SharpPlot.DrawDialChart Method (Double[],Int32[])

Draw a dial or gauge from data and pointer radii.

public void DrawDialChart(
    double[] data,
    int[] radii
);

See also ...

SharpPlot Members | SharpPlot.DrawDialChart Method


SharpPlot 3.71 User Manual: DrawDialChart Method (Double[])

SharpPlot.DrawDialChart Method (Double[])

Draw a dial from an array of data values.

public void DrawDialChart(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawDialChart Method


SharpPlot 3.71 User Manual: DrawDialChart Method (Double)

SharpPlot.DrawDialChart Method (Double)

Draw a dial from a single data value.

public void DrawDialChart(
    double data
);

See also ...

SharpPlot Members | SharpPlot.DrawDialChart Method


SharpPlot 3.71 User Manual: DrawDialChart Method (Int32[],Int32[])

SharpPlot.DrawDialChart Method (Int32[],Int32[])

Draw a dial from integer data values and pointer radii.

public void DrawDialChart(
    int[] data,
    int[] radii
);

See also ...

SharpPlot Members | SharpPlot.DrawDialChart Method


SharpPlot 3.71 User Manual: DrawDialChart Method (Int32[])

SharpPlot.DrawDialChart Method (Int32[])

Draw a dial from an integer array of data values.

public void DrawDialChart(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawDialChart Method


SharpPlot 3.71 User Manual: DrawFrame Method

SharpPlot.DrawFrame Method

Draw current frame, with any fixed text such as headings and footnotes.

public void DrawFrame();

Example

sp.SetFrameBackground(Color.Bisque,FillStyle.Solid,1);
sp.FrameStyle = FrameStyles.Boxed|FrameStyles.Shadowed|FrameStyles.Filled;
sp.Heading = "My Frame\nis Here";
sp.Footnote = "Here is a sample footer";
sp.DrawFrame();

Description

This method is a convenient way of forcing SharpPlot to draw any headings or footers without actually drawing any charts. It may be used when your design requires a common heading (and possibly footer) which spans several smaller charts. In this case you would set up the text, call DrawFrame to create the ‘paper’ and then go on to use NewFrame as many times as required to add more charts to the same overall design.

It might also be used simply to create a region on which to add some text (written with DrawNote), so creating a title page for a series of charts to be saved (for example) as a multi-page PDF document.

See also ...

SharpPlot Members | SharpPlot.FrameStyle Property


SharpPlot 3.71 User Manual: DrawGanttChart Method

SharpPlot.DrawGanttChart Method

Construct a horizontal Gantt chart from schedule data (activities and times).

Example

sp = new SharpPlot(180,120);
sp.SetMargins(6,12,36,4);
sp.SetColors(new Color[]{Color.OrangeRed,Color.ForestGreen});
sp.SetYLabels(new string[]{"Cut","Polish","Pack"});
sp.SetXTickMarks(5);
sp.SetYTickMarks(new double[] {0.5,1.5,2.5,3.5});
process = new int[] {1,1,2,2,2,3,3};
start = new int[] {24,28,25,29,35,29,42};
end = new int[] {28,32,29,33,40,30,44};
done = new bool[]{true,false,true,false,false,true,false};
sp.YAxisStyle = YAxisStyles.MiddleLabels|YAxisStyles.GridLines;
sp.KeyStyle = KeyStyles.NoKey;
sp.SplitBy(done);
sp.DrawGanttChart(process,start,end);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawGanttChart(int[] yValues,int[] startValues,int[] endValues);
  • public void DrawGanttChart(int[] yValues,double[] startValues,double[] endValues);
  • public void DrawGanttChart(double[] yValues,double[] startValues,double[] endValues);

Description

Gantt charts were originally devised as a graphical way to show the relationship between activites in a project plan, and have been made very popular by tools such as MS Project. The chart shows time progressing from left to right, with each activity drawn as a colored bar, and generally labelled with its name. The Y-axis shows some higher-level grouping of related tasks.

This style of chart also works very well as a way to show a production schedule (machines are shown on the Y-axis) or to record the output from any kind of logging system.

See also ...

Gantt charts for timewise bars | SharpPlot Members | SharpPlot.GanttChartStyle Property


SharpPlot 3.71 User Manual: DrawGanttChart Method (Double[],Double[],Double[])

SharpPlot.DrawGanttChart Method (Double[],Double[],Double[])

Gantt chart from 3 double arrays of Y-values, X-start and X-end values.

public void DrawGanttChart(
    double[] yValues,
    double[] startValues,
    double[] endValues
);

See also ...

SharpPlot Members | SharpPlot.DrawGanttChart Method


SharpPlot 3.71 User Manual: DrawGanttChart Method (Int32[],Int32[],Int32[])

SharpPlot.DrawGanttChart Method (Int32[],Int32[],Int32[])

Gantt chart from 3 integer arrays of Y-values, X-start,end values.

public void DrawGanttChart(
    int[] yValues,
    int[] startValues,
    int[] endValues
);

See also ...

SharpPlot Members | SharpPlot.DrawGanttChart Method


SharpPlot 3.71 User Manual: DrawGanttChart Method (Int32[],Double[],Double[])

SharpPlot.DrawGanttChart Method (Int32[],Double[],Double[])

Gantt chart from int y-values, double X-start,end values.

public void DrawGanttChart(
    int[] yValues,
    double[] startValues,
    double[] endValues
);

See also ...

SharpPlot Members | SharpPlot.DrawGanttChart Method


SharpPlot 3.71 User Manual: DrawHistogram Method

SharpPlot.DrawHistogram Method

Construct a histogram plot from data and class-interval property.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
threedice = new int[] {9,8,6,11,9,14,11,8,9,14,12,7,6,11,15,14,11,7,5,8,7,9,6,7,12,
         7,13,8,9,13,7,7,8,12,11,16,12,9,11,12,12,12,9,14,8,9,13,11,10,13,11,13,9,
         10,10,4,14,8,9,11,12,5,12,15};
sp.HistogramStyle = HistogramStyles.NormalCurve|HistogramStyles.SurfaceShading;
sp.SetXRange(0,18);
sp.ClassInterval = 2;
sp.SetPenWidths(new int[] {1,3});
sp.DrawHistogram(threedice);

The short tutorial illustrates several ways to display a typical frequency distribution.

Overloads

  • public void DrawHistogram(int[] data);
  • public void DrawHistogram(double[] data);

Description

The Histogram does one very simple job – it takes a large sample of values and shows how they are grouped. Many samples of data turn out to follow a bell-shaped curve called the Normal distribution (the test data used in the tutorial simply sums several throws of 3 dice which follows this shape very well), but often the shape of the plot gives some useful clues which can be hidden simply by looking at statistics such as the Mean or Range.

Histograms can be drawn with a fitted Normal curve, which is often a good way to check if the underlying data really does have the assumed distribution.

See also ...

Histograms for distributions | SharpPlot Members | SharpPlot.HistogramStyle Property


SharpPlot 3.71 User Manual: DrawHistogram Method (Double[])

SharpPlot.DrawHistogram Method (Double[])

Construct a histogram from a floating-point vector.

public void DrawHistogram(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawHistogram Method


SharpPlot 3.71 User Manual: DrawHistogram Method (Int32[])

SharpPlot.DrawHistogram Method (Int32[])

Construct a histogram from an integer vector.

public void DrawHistogram(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawHistogram Method


SharpPlot 3.71 User Manual: DrawImage Method

SharpPlot.DrawImage Method

This will add a predrawn artwork (typically a bitmap or JPEG) to the current chart.

Example

 data = new int[] {18,27,31,12,19,23};
// Draw image on backcloth (top right)
 sp.DrawImage("ettons.png","",-6,6,40);
 sp.DrawLineGraph(data);
// Draw image using chart co-ordinates
 sp.DrawImage("ettons.png","",2,35,1);

The bitmap object/filename is used to get the data to include in embedded formats (required if the chart is saved to an image format, or to PS or PDF), and the uri is used as the link target for web-based formats such as SVG, XAML and VML. If you only give the filename, the two are assumed to be the same.

Overloads

  • public void DrawImage(Image bmp,string uri,double left,double top);
  • public void DrawImage(Image bmp,string uri,double left,double top,double width);
  • public void DrawImage(Image bmp,string uri,double left,double top,double width,double height);
  • public void DrawImage(Image bmp,string uri,double left,double top,double width,double height,bool stretch);
  • public void DrawImage(string filename,string uri,double left,double top);
  • public void DrawImage(string filename,string uri,double left,double top,double width);
  • public void DrawImage(string filename,string uri,double left,double top,double width,double height);
  • public void DrawImage(string filename,string uri,double left,double top,double width,double height,bool stretch);

Description

If the image is added before any charts have been drawn, the co-ordinates used are points, measured from the top left corner of the paper. You may give negative values for either top or left, in which case the image is placed the corresponding distance from the opposite edge. This is a convenient way to place a company logo in any of the corners of the finished chart.

If the image is added after a chart has been drawn, the chart axes are used as the co-ordinate system for the placement of the top left corner of the image, and also to determine how large it is drawn.

In both cases, if you omit width and height the image is placed at actual size (one pixel = one point) and if you give a required width only, the height is scaled to preserve the correct aspect ratio.

If width and height are provided, the image is scaled to fit the available rectangle preserving aspect ratio, but it may be stretched to fill by specifying the stretch flag to true.


SharpPlot 3.71 User Manual: DrawImage Method (Image,String,Double,Double)

SharpPlot.DrawImage Method (Image,String,Double,Double)

Add image at actual size with alternative uri.

public void DrawImage(
    Image bmp,
    string uri,
    double left,
    double top
);
bmp
Image to embed (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawImage Method (Image,String,Double,Double,Double)

SharpPlot.DrawImage Method (Image,String,Double,Double,Double)

Add image at given width with alternative uri.

public void DrawImage(
    Image bmp,
    string uri,
    double left,
    double top,
    double width
);
bmp
Image to embed (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.
width
Width to fit (defaults to image width).

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawImage Method (Image,String,Double,Double,Double,Double)

SharpPlot.DrawImage Method (Image,String,Double,Double,Double,Double)

Add image within given rectangle with alternative uri.

public void DrawImage(
    Image bmp,
    string uri,
    double left,
    double top,
    double width,
    double height
);
bmp
Image to embed (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.
width
Width to fit (defaults to image width).
height
Height to fit (defaults to image height).

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawImage Method (Image,String,Double,Double,Double,Double,Boolean)

SharpPlot.DrawImage Method (Image,String,Double,Double,Double,Double,Boolean)

Add image within given rectangle, possibly stretched, with alternative uri.

public void DrawImage(
    Image bmp,
    string uri,
    double left,
    double top,
    double width,
    double height,
    bool stretch
);
bmp
Image to embed (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.
width
Width to fit (defaults to image width).
height
Height to fit (defaults to image height).
stretch
Flag to stretch image (defaults to false).

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawImage Method (String,String,Double,Double)

SharpPlot.DrawImage Method (String,String,Double,Double)

Add artwork at actual size with alternative uri.

public void DrawImage(
    string filename,
    string uri,
    double left,
    double top
);
filename
Image to embed at render time (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawImage Method (String,String,Double,Double,Double)

SharpPlot.DrawImage Method (String,String,Double,Double,Double)

Add artwork at given width with alternative uri.

public void DrawImage(
    string filename,
    string uri,
    double left,
    double top,
    double width
);
filename
Image to embed at render time (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.
width
Width to fit (defaults to image width).

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawImage Method (String,String,Double,Double,Double,Double)

SharpPlot.DrawImage Method (String,String,Double,Double,Double,Double)

Add artwork within given rectangle with alternative uri.

public void DrawImage(
    string filename,
    string uri,
    double left,
    double top,
    double width,
    double height
);
filename
Image to embed at render time (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.
width
Width to fit (defaults to image width).
height
Height to fit (defaults to image height).

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawImage Method (String,String,Double,Double,Double,Double,Boolean)

SharpPlot.DrawImage Method (String,String,Double,Double,Double,Double,Boolean)

Add artwork within given rectangle, possibly stretched, with alternative uri.

public void DrawImage(
    string filename,
    string uri,
    double left,
    double top,
    double width,
    double height,
    bool stretch
);
filename
Image to embed at render time (Bitmap, Metafile, PS, PDF).
uri
Image to link to at display time (SVG, XAML, VML).
left
Position of left of image.
top
Position of top of image.
width
Width to fit (defaults to image width).
height
Height to fit (defaults to image height).
stretch
Flag to stretch image (defaults to false).

See also ...

SharpPlot Members | SharpPlot.DrawImage Method


SharpPlot 3.71 User Manual: DrawKey Method

SharpPlot.DrawKey Method

This will draw and clear any pending keys, using the current setting of key text. It is called automatically on Rendering the completed chart, so is only required if you need an exact key location or a custom-designed key. Use the KeyLimit property to restrict the number of items used at each call. Use the SetKeyIndices method for finer control over key selection and order.

Example

sp.KeyStyle = KeyStyles.Boxed|KeyStyles.Vertical|KeyStyles.Shadowed|KeyStyles.Rounded;
sp.SetKeyBackground(Color.SlateBlue,FillStyle.Solid);
sp.SetKeyFont("Arial,sans",12,FontStyle.Bold,Color.Orange);
sp.SetKeyText(new string[]{"First","Second"});
sp.DrawKey(2,260);

Overloads

  • public void DrawKey();
  • public void DrawKey(KeyDefinition keyDefinition);
  • public void DrawKey(KeyDefinition[] keyDefinition);
  • public void DrawKey(double keyPositionX,double keyPositionY,KeyDefinition keyDefinition);
  • public void DrawKey(double keyPositionX,double keyPositionY);
  • public void DrawKey(double keyPositionX,double keyPositionY,KeyDefinition[] keyDefinition);

Description

The chart Key or Legend consists of small placeholders for each line or filled area (appropriately coloured and styled) with an item of descriptive text for each. When any of the Draw methods is called to create a chart (you may call these repeatedly with various series to reuse the same set of axes) a placeholder is stored away to represent all the series plotted on that call. When the chart is rendered, DrawKey is called automatically to check if any KeyText has been set for the various series. If so, a placeholder and associated text are drawn as specified in the KeyStyle setting.

This method may be used to position the key ‘by hand’ anywhere in the chart area instead of at one of the many default locations which may be given in the style. It should always be called after all the charts have been drawn, otherwise the key placeholders will not be available for all the data series.

It is possible to override the automatic key-generation process completely, passing an array of key-definitions as the 3rd argument.

   sp.SetKeyText(new string[] {"Corals","Latiproductus"});
    sp.KeyStyle = KeyStyles.Vertical|KeyStyles.Boxed;
    sp.DrawKey(72,25,
        new KeyDefinition[] {
          new KeyDefinition(2,Color.Maroon),
          new KeyDefinition(2,Color.Green) } )

This example is from the ‘Wise Eel’s Bridge’ cellular plot in the sample set.

See also ...

SharpPlot Members | SharpPlot.KeyLimit Property | SharpPlot.KeyStyle Property | SharpPlot.SetKeyIndices Method


SharpPlot 3.71 User Manual: DrawKey Method

SharpPlot.DrawKey Method

Flush out standard key at default position.

public void DrawKey();

See also ...

SharpPlot Members | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: DrawKey Method (KeyDefinition)

SharpPlot.DrawKey Method (KeyDefinition)

Flush out custom key at default position.

public void DrawKey(
    KeyDefinition keyDefinition
);
keyDefinition
Replacement for accumulated key placeholders.

See also ...

SharpPlot Members | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: DrawKey Method (KeyDefinition[])

SharpPlot.DrawKey Method (KeyDefinition[])

Flush out custom keys at default position.

public void DrawKey(
    KeyDefinition[] keyDefinition
);
keyDefinition
Replacement for accumulated key placeholders.

See also ...

SharpPlot Members | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: DrawKey Method (Double,Double,KeyDefinition)

SharpPlot.DrawKey Method (Double,Double,KeyDefinition)

Place customised key at (x,y).

public void DrawKey(
    double keyPositionX,
    double keyPositionY,
    KeyDefinition keyDefinition
);
keyPositionX
Horizontal position in pts, chart coord or as percentage.
keyPositionY
Vertical position in pts, chart coord or as percentage.
keyDefinition
Replacement for accumulated key placeholders.

See also ...

SharpPlot Members | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: DrawKey Method (Double,Double)

SharpPlot.DrawKey Method (Double,Double)

Place standard key at (x,y).

public void DrawKey(
    double keyPositionX,
    double keyPositionY
);
keyPositionX
Horizontal position in pts, chart coord or as percentage.
keyPositionY
Vertical position in pts, chart coord or as percentage.

See also ...

SharpPlot Members | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: DrawKey Method (Double,Double,KeyDefinition[])

SharpPlot.DrawKey Method (Double,Double,KeyDefinition[])

This will draw and clear any pending keys, using the current setting of key text.

public void DrawKey(
    double keyPositionX,
    double keyPositionY,
    KeyDefinition[] keyDefinition
);
keyPositionX
Horizontal position in pts, chart coord or as percentage.
keyPositionY
Vertical position in pts, chart coord or as percentage.
keyDefinition
Replacement for accumulated key placeholders.

See also ...

SharpPlot Members | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: DrawLineGraph Method

SharpPlot.DrawLineGraph Method

Constructs a linegraph or surface plot from an array of data values. This chart is typically used to show timeseries data, but may also be used with an explicit set of X-values to draw any mathematical curve.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
sp.LineGraphStyle = LineGraphStyles.Risers;
data = new int[] {18,27,31,12,19,23};
sp.DrawLineGraph(data);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawLineGraph(int[] data);
  • public void DrawLineGraph(double[] data);
  • public void DrawLineGraph(int[][] data);
  • public void DrawLineGraph(double[][] data);
  • public void DrawLineGraph(int[] data,int[] xValues);
  • public void DrawLineGraph(double[] data,int[] xValues);
  • public void DrawLineGraph(int[] data,double[] xValues);
  • public void DrawLineGraph(double[] data,double[] xValues);
  • public void DrawLineGraph(int[][] data,int[] xValues);
  • public void DrawLineGraph(double[][] data,int[] xValues);
  • public void DrawLineGraph(int[][] data,double[] xValues);
  • public void DrawLineGraph(double[][] data,double[] xValues);

Description

Linegraphs are most commonly used to represent data which changes over time (stock prices or currency values are typical) but may be used wherever pairs of X and Y values are joined by lines. The default is to join the points with straight lines, but for some applications (for example illustrating a graph of Y-squared versus X) then it is better to use smooth curves.

This chart has a wide variety of styles, for example it can draw risers from the X-axis, fill the surface, add arrowheads to the end of each line, and so on. These styles can be combined as required by calling DrawLineGraph several times with different style settings to overlay multiple charts on the same set of axes.

See also ...

Line graphs and Time series | SharpPlot Members | SharpPlot.LineGraphStyle Property


SharpPlot 3.71 User Manual: DrawLineGraph Method (Double[][],Double[])

SharpPlot.DrawLineGraph Method (Double[][],Double[])

Construct plot from array of arrays of y values and x-values.

public void DrawLineGraph(
    double[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Int32[],Double[])

SharpPlot.DrawLineGraph Method (Int32[],Double[])

Construct plot from integer array of y-values and double array of x-values.

public void DrawLineGraph(
    int[] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Int32[],Int32[])

SharpPlot.DrawLineGraph Method (Int32[],Int32[])

Construct plot from integer array of y-values and x-values.

public void DrawLineGraph(
    int[] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Int32[])

SharpPlot.DrawLineGraph Method (Int32[])

Construct plot from integer array of y-values and implied x-values.

public void DrawLineGraph(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Double[][],Int32[])

SharpPlot.DrawLineGraph Method (Double[][],Int32[])

Construct plot from array of arrays of y-values and integer x-values.

public void DrawLineGraph(
    double[][] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Double[][])

SharpPlot.DrawLineGraph Method (Double[][])

Construct plot from array of arrays of y-values and implied x-values.

public void DrawLineGraph(
    double[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Double[],Double[])

SharpPlot.DrawLineGraph Method (Double[],Double[])

Construct plot from array of y-values and array of x-values.

public void DrawLineGraph(
    double[] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Double[],Int32[])

SharpPlot.DrawLineGraph Method (Double[],Int32[])

Construct plot from array of y-values and integer array of x-values.

public void DrawLineGraph(
    double[] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Double[])

SharpPlot.DrawLineGraph Method (Double[])

Construct plot from array of y-values and implied x-values.

public void DrawLineGraph(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Int32[][],Double[])

SharpPlot.DrawLineGraph Method (Int32[][],Double[])

Construct plot from integer array of arrays of y-values and double x-values.

public void DrawLineGraph(
    int[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Int32[][],Int32[])

SharpPlot.DrawLineGraph Method (Int32[][],Int32[])

Construct plot from integer array of arrays of y-values and x-values.

public void DrawLineGraph(
    int[][] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawLineGraph Method (Int32[][])

SharpPlot.DrawLineGraph Method (Int32[][])

Construct plot from integer array of arrays of y-values and implied x-values.

public void DrawLineGraph(
    int[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: DrawMinMaxChart Method

SharpPlot.DrawMinMaxChart Method

Construct hi-lo plot, joining maximum with minimum data values for each axis value.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
open = new int[] {190,150,310,240,140,170};
close = new int[] {150,310,240,140,170,240};
xdata = new int[] {17,18,19,22,23,24};
sp.SetMarkers(Marker.Bullet);
sp.MinMaxChartStyle = MinMaxChartStyles.ArrowLines|MinMaxChartStyles.DriftMarkers;
sp.DrawMinMaxChart(open,close,xdata);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawMinMaxChart(int[] maxValues);
  • public void DrawMinMaxChart(double[] maxValues);
  • public void DrawMinMaxChart(int[] maxValues,int[] minValues);
  • public void DrawMinMaxChart(double[] maxValues,double[] minValues);
  • public void DrawMinMaxChart(int[] maxValues,int[] minValues,int[] axisValues);
  • public void DrawMinMaxChart(double[] maxValues,double[] minValues,int[] axisValues);
  • public void DrawMinMaxChart(double[] maxValues,double[] minValues,double[] axisValues);

Description

Some data series are best represented by their range at each time-value. Temperature data is typical – here the most informative chart shows the maximum and minimum values by day, with the range drawn as a vertical line. This chart is also commonly used for stock-price data where the daily high and low may be combined with opening and closing values to produce a wide variety of typical ‘Wall Street Journal’ plots of the market data.

This chart is normally drawn vertically, but may be switched around using the ‘Horizontal’ style where it is more appropriate to show the range running across the page.

See also ...

Min-Max or Hi-Lo charts | SharpPlot Members | SharpPlot.MinMaxChartStyle Property


SharpPlot 3.71 User Manual: DrawMinMaxChart Method (Double[],Double[],Double[])

SharpPlot.DrawMinMaxChart Method (Double[],Double[],Double[])

Create hi-lo plot from arrays of max,min and optional axis values.

public void DrawMinMaxChart(
    double[] maxValues,
    double[] minValues,
    double[] axisValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: DrawMinMaxChart Method (Double[],Double[],Int32[])

SharpPlot.DrawMinMaxChart Method (Double[],Double[],Int32[])

Double arays of Max and Min with integer Axis values.

public void DrawMinMaxChart(
    double[] maxValues,
    double[] minValues,
    int[] axisValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: DrawMinMaxChart Method (Double[],Double[])

SharpPlot.DrawMinMaxChart Method (Double[],Double[])

Double arrays of Max and Min values.

public void DrawMinMaxChart(
    double[] maxValues,
    double[] minValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: DrawMinMaxChart Method (Double[])

SharpPlot.DrawMinMaxChart Method (Double[])

Double arrays of Maximum values.

public void DrawMinMaxChart(
    double[] maxValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: DrawMinMaxChart Method (Int32[],Int32[],Int32[])

SharpPlot.DrawMinMaxChart Method (Int32[],Int32[],Int32[])

Integer arrays of Max, Min, and Axis values.

public void DrawMinMaxChart(
    int[] maxValues,
    int[] minValues,
    int[] axisValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: DrawMinMaxChart Method (Int32[],Int32[])

SharpPlot.DrawMinMaxChart Method (Int32[],Int32[])

Integer arrays of Max and Min values.

public void DrawMinMaxChart(
    int[] maxValues,
    int[] minValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: DrawMinMaxChart Method (Int32[])

SharpPlot.DrawMinMaxChart Method (Int32[])

Integer array of Maximum values.

public void DrawMinMaxChart(
    int[] maxValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: DrawMultiple Method

SharpPlot.DrawMultiple Method

Generate a trellis from nested y-values and iterate around it for each data vector.

Example

sp = new SharpPlot(180,120);
sp.SetPageLabels(new string[]{"North","South","East","West"});
sp.SetCaptionFont("TI",18,Color.Navy);
sp.TrellisStyle = TrellisStyles.SnakingCells;
series = new int[][]{new int[]{3,2,4},new int[]{5,4,3},new int[]{1,3,2},new int[]{3,2,4}};
sp.DrawMultiple(ChartType.BarChart,series);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawMultiple(ChartType chartType,int[] data);
  • public void DrawMultiple(ChartType chartType,double[] data);
  • public void DrawMultiple(ChartType chartType,int[][] data);
  • public void DrawMultiple(ChartType chartType,double[][] data);
  • public void DrawMultiple(ChartType chartType,int[][] data,int[] xValues);
  • public void DrawMultiple(ChartType chartType,int[][] data,double[] xValues);
  • public void DrawMultiple(ChartType chartType,double[][] data,double[] xValues);

Description

One of the best innovations in Tufte’s “The Visual Display of Quantitative Information” is the idea of using an array of miniature charts to display multi-dimensional data. Often a series of values are recorded at (say) several sites or on several days, then are superimposed on a single chart as a collection of dotted and dashed lines in various colors. This often makes it very hard to see the patterns and relationships in the data. The ‘Multiple’ plots each series on its own chart, and arranges them automatically in a trellis to allow easy comparison between them

Note that the Multiple chart has no style settings – it simply iterates around the chosen chart type, which applies the settings appropriate for that chart.

See also ...

Multiples for small thumbnails | SharpPlot Members | ChartType Enumeration


SharpPlot 3.71 User Manual: DrawMultiple Method (ChartType,Double[][],Double[])

SharpPlot.DrawMultiple Method (ChartType,Double[][],Double[])

Multiple plot from double array of arrays of y-values versus double x-values.

public void DrawMultiple(
    ChartType chartType,
    double[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: DrawMultiple Method (ChartType,Double[][])

SharpPlot.DrawMultiple Method (ChartType,Double[][])

Multiple plot from array of double arrays.

public void DrawMultiple(
    ChartType chartType,
    double[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: DrawMultiple Method (ChartType,Int32[][],Int32[])

SharpPlot.DrawMultiple Method (ChartType,Int32[][],Int32[])

Multiple plot from integer array of arrays and integer xvalues.

public void DrawMultiple(
    ChartType chartType,
    int[][] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: DrawMultiple Method (ChartType,Int32[][],Double[])

SharpPlot.DrawMultiple Method (ChartType,Int32[][],Double[])

Multiple plot from integer array of arrays of y-values and double xvalues.

public void DrawMultiple(
    ChartType chartType,
    int[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: DrawMultiple Method (ChartType,Int32[][])

SharpPlot.DrawMultiple Method (ChartType,Int32[][])

Multiple plot from integer array of arrays.

public void DrawMultiple(
    ChartType chartType,
    int[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: DrawMultiple Method (ChartType,Double[])

SharpPlot.DrawMultiple Method (ChartType,Double[])

Multiple plot from double array and SplitBy setting.

public void DrawMultiple(
    ChartType chartType,
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: DrawMultiple Method (ChartType,Int32[])

SharpPlot.DrawMultiple Method (ChartType,Int32[])

Multiple plot from integer array and SplitBy setting.

public void DrawMultiple(
    ChartType chartType,
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: DrawNetworkMap Method

SharpPlot.DrawNetworkMap Method

Draw a network of nodes and their mutual link strengths, represented by line widths.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(10,10,20,20);
// Network is not oriented - matrix is triangular
series = new int[][] {new int[0],new int[] {13},new int[]{2,12},new int[]{3,3,36},
         new int[]{3,3,1,3},new int[]{4,21,12,8,2},new int[]{44,1,2,3,9,3},new
         int[]{4,1,46,8,1,14,50},new int[]{36,29,1,3,1,25,17,8},new int[]{11,1,8,6,
         2,5,1,2,5}};
sp.SetColors(new Color[]{Color.Navy,Color.Gray});  // Nodes, Links
sp.SetMarkers(Marker.Bullet);
sp.SetMarkerScales(2);
sp.SetPenWidths(3);
sp.SetNetworkMapLinkArc(0);  // Flat links
sp.NetworkMapStyle = (NetworkMapStyles.NoAxes|NetworkMapStyles.OnTopMarkers|
         NetworkMapStyles.FixedArcs);
sp.DrawNetworkMap(series);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawNetworkMap(int[][] data);
  • public void DrawNetworkMap(int[][] data,int[] xValues,int[] yValues);
  • public void DrawNetworkMap(int[][] data,double[] xValues,double[] yValues);
  • public void DrawNetworkMap(double[][] data);
  • public void DrawNetworkMap(double[][] data,int[] xValues,int[] yValues);
  • public void DrawNetworkMap(double[][] data,double[] xValues,double[] yValues);

Description

Link data is a square matrix with as many rows and colums as the number of nodes in the network. Each series is, for a given origin node, the list of link strengths to all other nodes (including to itself at the diagonal of the matrix). This can be inversed (transposed) with DataStyles.Rows so that data is given for each destination node. In all cases link-wise settings are taken in the same order as the input data – such as SetNetworkMapLinkArc, SetValueTags, SetValueNudge, or SplitBy with NetworkMapStyles.SplitByLink).

Links generally go clock-wise unless using NetworkMapStyles.CounterClockwise, and can be individually reversed where data is negative.

Coordinates may be given for nodes, otherwise nodes are automatically spread on circles (or lines if using NetworkMapStyles.Horizontal or NetworkMapStyles.Vertical). In the latter case, if nodes are SplitBy, then each category is on a different circle (inner -> outer) or line (ascending coordinates).

A NetworkMap first output the nodes, consuming one Color, Marker, and Pen Width, and outputting one Key for each category of node, then it outputs the links, consuming one Color, LineStyle and Pen Width, and outputting one Key for each category of link.

Nodes can be split into several categories using SplitBy. Links can be made to reuse their origin node attributes with NetworkMapStyles.SplitByOrigin, or of their destination node with NetworkMapStyles.SplitByDestination.

SplitBy can be made to affects links instead with NetworkMapStyles.SplitByLink. Then nodes are not split, unless using NetworkMapStyles.SplitByOrigin or NetworkMapStyles.SplitByDestination, in which case nodes re-use the attributes of the link to themselves.

Keys can be disabled with NetworkMapStyles.NoNodeKey or NetworkMapStyles.NoLinkKey.

Links are drawn with circle arcs, which vary from flat lines (infinite radius, zero angle) for nodes that are furthest apart, to half-circles (the smallest possible radius, or largest possible angle) as nodes get closer to each other. This strategy generally works well when nodes are laid out on a circle (the default).

Arcs can be fixed with NetworkMapStyles.FixedArcs, and fine control over individual arcs can be set with SetNetworkMapLinkArc and SetNetworkMapSelfArc.

See also ...

Network Map for nodes and links | SharpPlot Members | SharpPlot.NetworkMapStartAngle Property | SharpPlot.NetworkMapStyle Property | SharpPlot.SetNetworkMapLinkArc Method | SharpPlot.SetNetworkMapSelfArc Method


SharpPlot 3.71 User Manual: DrawNetworkMap Method (Int32[][])

SharpPlot.DrawNetworkMap Method (Int32[][])

Draw a network of links, letting SharpPlot arrange the nodes.

public void DrawNetworkMap(
    int[][] data
);
data
Link strengths between nodes.

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: DrawNetworkMap Method (Int32[][],Int32[],Int32[])

SharpPlot.DrawNetworkMap Method (Int32[][],Int32[],Int32[])

Draw a network of links with specified node positions.

public void DrawNetworkMap(
    int[][] data,
    int[] xValues,
    int[] yValues
);
data
Link strengths between nodes.
xValues
X positions of nodes.
yValues
Y positions of nodes.

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: DrawNetworkMap Method (Int32[][],Double[],Double[])

SharpPlot.DrawNetworkMap Method (Int32[][],Double[],Double[])

Draw a network of links with specified node positions.

public void DrawNetworkMap(
    int[][] data,
    double[] xValues,
    double[] yValues
);
data
Link strengths between nodes.
xValues
X positions of nodes.
yValues
Y positions of nodes.

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: DrawNetworkMap Method (Double[][])

SharpPlot.DrawNetworkMap Method (Double[][])

Draw a network of links, letting SharpPlot arrange the nodes.

public void DrawNetworkMap(
    double[][] data
);
data
Link strengths between nodes.

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: DrawNetworkMap Method (Double[][],Int32[],Int32[])

SharpPlot.DrawNetworkMap Method (Double[][],Int32[],Int32[])

Draw a network of links with specified node positions.

public void DrawNetworkMap(
    double[][] data,
    int[] xValues,
    int[] yValues
);
data
Link strengths between nodes.
xValues
X positions of nodes.
yValues
Y positions of nodes.

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: DrawNetworkMap Method (Double[][],Double[],Double[])

SharpPlot.DrawNetworkMap Method (Double[][],Double[],Double[])

Draw a network of nodes and their link strengths Draw a network of links with specified node positions.

public void DrawNetworkMap(
    double[][] data,
    double[] xValues,
    double[] yValues
);
data
Link strengths between nodes.
xValues
X positions of nodes.
yValues
Y positions of nodes.

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: DrawNote Method

SharpPlot.DrawNote Method

Write text note at XY co-ordinate or absolute position with optional rotation and max width.

Example

sp.SetNoteFont("Arial",12);
sp.NoteStyle = NoteStyles.Boxed|NoteStyles.Shadowed;
sp.DrawNote("A simple wrapped note in a box",10,70,0,50);

Overloads

  • public void DrawNote(string content,double xPosition,double yPosition);
  • public void DrawNote(string content,double xPosition,double yPosition,double angleFromHorizontal);
  • public void DrawNote(string content,double xPosition,double yPosition,double angleFromHorizontal,double width);

Description

Notes are used to write arbitrary text fragments anywhere on the completed chart. Typically, notes are written using the co-ordinates of the chart axes to locate them on the chart (to annotate particular data-points) so DrawNote is generally called after the chart has been drawn, and the axes established.

If only a Frame has been drawn, or if the chart is not a XY chart, then coordinates are within the frame margin, in percentage of the plotting region. If a note is drawn before anything, percentage of the whole chart area is used. The XY coordinates are those of the text itself, and not of the box (if any), which itself has a gutter of about half the interline space.

The note text may be angled, and may be wrapped into a given width (again given in terms of the chart axes) which allows reasonably complex paragraphs of text to be added to the completed chart. Various effects such as boxing and shadowing are also available using the Note Styles.

Simple HTML tagging (for effects such as bold and italic text) may be used in the notes, and the wrapping will take care of the current SoftHyphen setting.

See also ...

SharpPlot Members | SharpPlot.NoteStyle Property | SharpPlot.NextNote Method (Double)


SharpPlot 3.71 User Manual: DrawNote Method (String,Double,Double,Double,Double)

SharpPlot.DrawNote Method (String,Double,Double,Double,Double)

Write text note given text, position, angle and maximum width.

public void DrawNote(
    string content,
    double xPosition,
    double yPosition,
    double angleFromHorizontal,
    double width
);

See also ...

SharpPlot Members | SharpPlot.DrawNote Method


SharpPlot 3.71 User Manual: DrawNote Method (String,Double,Double,Double)

SharpPlot.DrawNote Method (String,Double,Double,Double)

Write text note given text, position and angle.

public void DrawNote(
    string content,
    double xPosition,
    double yPosition,
    double angleFromHorizontal
);

See also ...

SharpPlot Members | SharpPlot.DrawNote Method


SharpPlot 3.71 User Manual: DrawNote Method (String,Double,Double)

SharpPlot.DrawNote Method (String,Double,Double)

Write text note given text and position.

public void DrawNote(
    string content,
    double xPosition,
    double yPosition
);

See also ...

SharpPlot Members | SharpPlot.DrawNote Method


SharpPlot 3.71 User Manual: DrawPieChart Method

SharpPlot.DrawPieChart Method

Constructs a piechart from an array of data values and optional segment explosions.

If there are more than 5 or 6 values, and it is important for the user to be able to compare values accurately, the simple Barchart is almost always a better format.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(0,0,0,0);
sp.PieChartStyle = PieChartStyles.ValueTags;
sp.ValueTagStyle = ValueTagStyles.Inside;
sp.SetValueFont("Arial",18,FontStyle.Bold,Color.White);
data = new int[] {31,23,16,8};
expl = new int[] {0,0,25,0};
sp.DrawPieChart(data,expl);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawPieChart(int[] data);
  • public void DrawPieChart(double[] data);
  • public void DrawPieChart(int[] data,int[] explode);
  • public void DrawPieChart(double[] data,double[] explode);

Description

The Piechart is typically used to show how some total value is divided up, for example sales in two or more regions. It works best when there are only a few values, and they should be ranked in numerical order to facilitate comparison of the sctor sizes. Pies are often labelled with the actual values in the sectors, and one or more sectors may be ‘exploded’ to emphasise certain values (which is always in percentage of the pie radius).

Position and Size

For ease of use, by default:

  • PieRadius is in percentage of default radius, which takes most of the available area, leaving extra room if labels are to be drawn
  • SetPieCenter is in absolute points

All these behaviours may be changed by setting the appropriate PieChartStyle of Absolute (points), Percentage (of the default values), or Chart coordinates.

Value Tags

By default, value tags (enabled by PieChartStyles.ValueTags) are merged into the X-labels (spider tags), hence using the font defined by SetXLabelFont. When merging value tags into X-labels ValueTagFormat may include the “XL” string to specify how the X-labels will be merged into the value tags.

However, PieChartStyles.Inside can be used to force the tags inside the pie wedges, using the font defined by SetValueFont. Inside value tags that don’t fit will not be shown. They can however be merged to X-labels using PieChartStyles.MergeInsideTags.

See also ...

Pie charts and Rose diagrams | SharpPlot Members | SharpPlot.PieChartStyle Property


SharpPlot 3.71 User Manual: DrawPieChart Method (Double[],Double[])

SharpPlot.DrawPieChart Method (Double[],Double[])

Piechart from data and sector explosions.

public void DrawPieChart(
    double[] data,
    double[] explode
);
data
Sector sizes
explode
Sector explosions in percentage of the pie radius

See also ...

SharpPlot Members | SharpPlot.DrawPieChart Method


SharpPlot 3.71 User Manual: DrawPieChart Method (Double[])

SharpPlot.DrawPieChart Method (Double[])

Piechart from array of data.

public void DrawPieChart(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawPieChart Method


SharpPlot 3.71 User Manual: DrawPieChart Method (Int32[],Int32[])

SharpPlot.DrawPieChart Method (Int32[],Int32[])

Piechart from integer array of data and sector explosions.

public void DrawPieChart(
    int[] data,
    int[] explode
);
data
Sector sizes
explode
Sector explosions in percentage of the pie radius

See also ...

SharpPlot Members | SharpPlot.DrawPieChart Method


SharpPlot 3.71 User Manual: DrawPieChart Method (Int32[])

SharpPlot.DrawPieChart Method (Int32[])

Piechart from integer array of data.

public void DrawPieChart(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawPieChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method

SharpPlot.DrawPolarChart Method

Construct polar or radar chart from data (radial=Y, angular=X).

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,6,0,0);
sp.PolarChartStyle = PolarChartStyles.Markers|PolarChartStyles.SurfaceShading|
         PolarChartStyles.GridLines|PolarChartStyles.HollowCenter;
sp.SetYRange(0,100);
sp.SetFillStyles(FillStyle.Opacity30);
sp.SetMarkers(Marker.Lozenge);
sp.SetXLabels(new string[]{"Strong","Fast","Tough","Versatile","Cheap"});
sp.DrawPolarChart(new int[] {80,60,45,77,93});

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawPolarChart(int[] data);
  • public void DrawPolarChart(double[] data);
  • public void DrawPolarChart(int[][] data);
  • public void DrawPolarChart(double[][] data);
  • public void DrawPolarChart(int[] data,int[] xValues);
  • public void DrawPolarChart(double[] data,int[] xValues);
  • public void DrawPolarChart(int[] data,double[] xValues);
  • public void DrawPolarChart(double[] data,double[] xValues);
  • public void DrawPolarChart(int[][] data,int[] xValues);
  • public void DrawPolarChart(double[][] data,int[] xValues);
  • public void DrawPolarChart(int[][] data,double[] xValues);
  • public void DrawPolarChart(double[][] data,double[] xValues);

Description

The Polar chart (also known as the Radar chart) may be used in several ways to handle cyclic timeseries or comparisons on many dimensions. If it is called with a simple list of numbers, it treats each value as a logical axis and simply plots the values out as a star shape with as many points as there were values. This can be used very effectively to compare items on different criteria, for example several digital cameras might be compared on (price,zoom,resolution,color fidelity, memory size) each rated from 0 to 10 on an arbitrary scale.

Polar charts are also used as circular lineplots, typically for daily or annual timeseries where it makes sense to plot the values around a circle. They can also be used to represent genuinely directional data, such as a plot of wind-directions recorded over a month, or current flows at various locations on a map.

See also ...

Polar and Radar charts | SharpPlot Members | SharpPlot.PolarChartStyle Property


SharpPlot 3.71 User Manual: DrawPolarChart Method (Double[][],Double[])

SharpPlot.DrawPolarChart Method (Double[][],Double[])

Polar plot from multiple series and times or angles.

public void DrawPolarChart(
    double[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Int32[],Double[])

SharpPlot.DrawPolarChart Method (Int32[],Double[])

Polar plot from integer data and numeric angles.

public void DrawPolarChart(
    int[] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Int32[],Int32[])

SharpPlot.DrawPolarChart Method (Int32[],Int32[])

Polar plot from integer data and angles.

public void DrawPolarChart(
    int[] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Int32[])

SharpPlot.DrawPolarChart Method (Int32[])

Polar plot from integer data with equal angles.

public void DrawPolarChart(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Double[][],Int32[])

SharpPlot.DrawPolarChart Method (Double[][],Int32[])

Polar plot from multiple series and integer angles.

public void DrawPolarChart(
    double[][] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Double[][])

SharpPlot.DrawPolarChart Method (Double[][])

Polar plot from multiple series with equal angles.

public void DrawPolarChart(
    double[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Double[],Double[])

SharpPlot.DrawPolarChart Method (Double[],Double[])

Polar plot from data and angles.

public void DrawPolarChart(
    double[] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Double[],Int32[])

SharpPlot.DrawPolarChart Method (Double[],Int32[])

Polar plot from data and integer angles.

public void DrawPolarChart(
    double[] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Double[])

SharpPlot.DrawPolarChart Method (Double[])

Polar plot from data with equal angles.

public void DrawPolarChart(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Int32[][],Double[])

SharpPlot.DrawPolarChart Method (Int32[][],Double[])

Polar plot from multiple integer data and numeric angles.

public void DrawPolarChart(
    int[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Int32[][],Int32[])

SharpPlot.DrawPolarChart Method (Int32[][],Int32[])

Polar plot from multiple integer series and angles.

public void DrawPolarChart(
    int[][] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolarChart Method (Int32[][])

SharpPlot.DrawPolarChart Method (Int32[][])

Polar plot from multiple integer series with equal angles.

public void DrawPolarChart(
    int[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: DrawPolygon Method

SharpPlot.DrawPolygon Method

Draw polygon from x and y coordinates, with optional Color, edge width, and FillStyle.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
sp.ScatterPlotStyle = (ScatterPlotStyles.GridLines|ScatterPlotStyles.ForceZero);
sp.SetColors(Color.Black);
sp.SetPenWidths(1);
sp.DrawScatterPlot(new double[]{1.2,5.3,2.9,7.4,1.3,4.3,6.4,7.7},new double[]{1.2,
         9.1,4.3,3.2,7.5,4.5,6.7,7.8});
sp.DrawPolygon(new double[] {4,8,8,4,4},new double[] {4,4,8,8,4},Color.Red,
         FillStyle.Opacity30,(double)1,LineStyle.Dash);
sp.DrawPolygon(new double[] {2,9,9,6,6,2,2},new double[] {1,1,3,3,5,5,1},Color.Blue,
         FillStyle.Opacity30,(double)0,LineStyle.Invisible);

Description

If the polygon is drawn before any chart, the co-ordinates used are points, measured from the top left corner of the paper.

If the polygon is drawn after a chart, the chart axes are used as the co-ordinate system for polygon points.

Overloads

  • public void DrawPolygon(double[] xValues,double[] yValues);
  • public void DrawPolygon(double[] xValues,double[] yValues,Color polyColor);
  • public void DrawPolygon(double[] xValues,double[] yValues,double edgeWidth);
  • public void DrawPolygon(double[] xValues,double[] yValues,FillStyle polyFill);
  • public void DrawPolygon(double[] xValues,double[] yValues,Color polyColor,double edgeWidth);
  • public void DrawPolygon(double[] xValues,double[] yValues,Color polyColor,FillStyle polyFill);
  • public void DrawPolygon(double[] xValues,double[] yValues,FillStyle polyFill,double edgeWidth);
  • public void DrawPolygon(double[] xValues,double[] yValues,double edgeWidth,LineStyle edgeStyle);
  • public void DrawPolygon(double[] xValues,double[] yValues,Color polyColor,FillStyle polyFill,double edgeWidth);
  • public void DrawPolygon(double[] xValues,double[] yValues,Color polyColor,FillStyle polyFill,double edgeWidth,LineStyle edgeStyle);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],Color,FillStyle,Double,LineStyle)

SharpPlot.DrawPolygon Method (Double[],Double[],Color,FillStyle,Double,LineStyle)

Draw polygon from x and y coordinates, with optional Color, FillStyle, line width and LineStyle.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    Color polyColor,
    FillStyle polyFill,
    double edgeWidth,
    LineStyle edgeStyle
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],Color,FillStyle,Double)

SharpPlot.DrawPolygon Method (Double[],Double[],Color,FillStyle,Double)

Draw polygon from x and y coordinates, Color, FillStyle, and edge width.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    Color polyColor,
    FillStyle polyFill,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[])

SharpPlot.DrawPolygon Method (Double[],Double[])

Draw polygon from x and y coordinates – default edge and no fill.

public void DrawPolygon(
    double[] xValues,
    double[] yValues
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],Color)

SharpPlot.DrawPolygon Method (Double[],Double[],Color)

Draw polygon from x and y coordinates, and Color – with default edge and no fill.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    Color polyColor
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],Double)

SharpPlot.DrawPolygon Method (Double[],Double[],Double)

Draw polygon from x and y coordinates, and edge width – with no fill.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],FillStyle)

SharpPlot.DrawPolygon Method (Double[],Double[],FillStyle)

Draw black polygon from x and y coordinates, and FillStyle – with no edge.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    FillStyle polyFill
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],Color,Double)

SharpPlot.DrawPolygon Method (Double[],Double[],Color,Double)

Draw polygon from x and y coordinates, Color, and edge width – with no fill.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    Color polyColor,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],Color,FillStyle)

SharpPlot.DrawPolygon Method (Double[],Double[],Color,FillStyle)

Draw polygon from x and y coordinates, Color and FillStyle – with no edge.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    Color polyColor,
    FillStyle polyFill
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],Double,LineStyle)

SharpPlot.DrawPolygon Method (Double[],Double[],Double,LineStyle)

Draw polygon from x and y coordinates, edge width, and LineStyle – with no fill.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    double edgeWidth,
    LineStyle edgeStyle
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawPolygon Method (Double[],Double[],FillStyle,Double)

SharpPlot.DrawPolygon Method (Double[],Double[],FillStyle,Double)

Draw polygon from x and y coordinates, FillStyle and edge width.

public void DrawPolygon(
    double[] xValues,
    double[] yValues,
    FillStyle polyFill,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.DrawPolygon Method


SharpPlot 3.71 User Manual: DrawResponsePlot Method

SharpPlot.DrawResponsePlot Method

Draw 3D grid, and construct surface from multiple vectors of zValues giving rows and columns.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
respdata = new int[][]{new int[]{4,3,2},new int[]{7,6,5},new int[]{12,11,10},new
         int[]{19,18,17}};
sp.ResponsePlotStyle = ResponsePlotStyles.WallShading|ResponsePlotStyles.GridLines|
         ResponsePlotStyles.Markers|ResponsePlotStyles.TiledSurface;
sp.SetMarkers(Marker.Node);
sp.SetAxisStyle(Color.Gray,LineStyle.Solid,0.5);
sp.SetFillStyles(FillStyle.Opacity30);
sp.DrawResponsePlot(respdata);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawResponsePlot(int[][] zValues);
  • public void DrawResponsePlot(double[][] zValues);
  • public void DrawResponsePlot(double[][] zValues,double[] xValues);
  • public void DrawResponsePlot(int[][] zValues,int[] xValues,int[] yValues);
  • public void DrawResponsePlot(double[][] zValues,double[] xValues,double[] yValues);

Description

This chart is almost always used to illustrate a computed mathematical surface, and could often be combined with a Cloudchart to show a theoretical model overlayed with raw data values.

In the simplest case it takes a rectangular array of arrays of Z-values (effectively a matrix) and treats these as a uniform mesh to be plotted vertically with equally spaced x and y values. An option is to provide either or both of the x and y values as arrays of the correct length, to draw the mesh on a non-uniform scale.

By default the surface is drawn as a simple wireframe, but an option is to ‘tile’ the surface to give the illusion of a solid figure. This is often done with semi-transparent tiles so that surfaces with folds remain partially visible, whatever the viewpoint.

See also ...

Response surfaces | SharpPlot Members | SharpPlot.ResponsePlotStyle Property | SharpPlot.SetViewpoint Method


SharpPlot 3.71 User Manual: DrawResponsePlot Method (Double[][],Double[],Double[])

SharpPlot.DrawResponsePlot Method (Double[][],Double[],Double[])

Create surface from multiple sets of z-values with matched x and y values.

public void DrawResponsePlot(
    double[][] zValues,
    double[] xValues,
    double[] yValues
);

See also ...

SharpPlot Members | SharpPlot.DrawResponsePlot Method


SharpPlot 3.71 User Manual: DrawResponsePlot Method (Int32[][],Int32[],Int32[])

SharpPlot.DrawResponsePlot Method (Int32[][],Int32[],Int32[])

Create surface from multiple sets of integer z-values with matched x and y values.

public void DrawResponsePlot(
    int[][] zValues,
    int[] xValues,
    int[] yValues
);

See also ...

SharpPlot Members | SharpPlot.DrawResponsePlot Method


SharpPlot 3.71 User Manual: DrawResponsePlot Method (Double[][],Double[])

SharpPlot.DrawResponsePlot Method (Double[][],Double[])

Create surface from multiple sets of z-values with matched x values and equally spaced y-values.

public void DrawResponsePlot(
    double[][] zValues,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawResponsePlot Method


SharpPlot 3.71 User Manual: DrawResponsePlot Method (Double[][])

SharpPlot.DrawResponsePlot Method (Double[][])

Create surface from multiple sets of z-values with equally spaced x and y values.

public void DrawResponsePlot(
    double[][] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawResponsePlot Method


SharpPlot 3.71 User Manual: DrawResponsePlot Method (Int32[][])

SharpPlot.DrawResponsePlot Method (Int32[][])

Create surface from multiple sets of integer z-values with equally spaced x and y values.

public void DrawResponsePlot(
    int[][] zValues
);

See also ...

SharpPlot Members | SharpPlot.DrawResponsePlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method

SharpPlot.DrawScatterPlot Method

Scatter plot from multiple y series and matching x values.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(9,18,18,4);
sp.ScatterPlotStyle = ScatterPlotStyles.ModelFit|ScatterPlotStyles.Risers;
sp.SetMarkers(Marker.Lozenge);
sp.SetLineStyles(LineStyle.Dash);
ydata = new int[] {190,270,310,120,190,230};
xdata = new int[] {17,31,29,14,16,24};
sp.DrawScatterPlot(ydata,xdata);

The short tutorial shows a few of the possibilities and some sample code.

  • public void DrawScatterPlot(int[] yValues);
  • public void DrawScatterPlot(double[] yValues);
  • public void DrawScatterPlot(int[] yValues,int[] xValues);
  • public void DrawScatterPlot(double[] yValues,int[] xValues);
  • public void DrawScatterPlot(int[] yValues,double[] xValues);
  • public void DrawScatterPlot(double[] yValues,double[] xValues);
  • public void DrawScatterPlot(int[] yValues,string[] xCategories);
  • public void DrawScatterPlot(double[] yValues,string[] xCategories);
  • public void DrawScatterPlot(int[][] yValues,int[] xValues);
  • public void DrawScatterPlot(double[][] yValues,int[] xValues);
  • public void DrawScatterPlot(int[][] yValues,double[] xValues);
  • public void DrawScatterPlot(double[][] yValues,double[] xValues);

See also ...

Scatter plots for discrete XY data | SharpPlot Members | SharpPlot.ScatterPlotStyle Property


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Double[][],Double[])

SharpPlot.DrawScatterPlot Method (Double[][],Double[])

Scatter plot from multiple y series and matching x values.

public void DrawScatterPlot(
    double[][] yValues,
    double[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Int32[],Int32[])

SharpPlot.DrawScatterPlot Method (Int32[],Int32[])

Scatter plot from integer arrays of y and x values.

public void DrawScatterPlot(
    int[] yValues,
    int[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Int32[],String[])

SharpPlot.DrawScatterPlot Method (Int32[],String[])

Scatter plot from arrays of integer y and category x values.

public void DrawScatterPlot(
    int[] yValues,
    string[] xCategories
);
yValues
Data series to be plotted against the X-values.
xCategories
[todo]

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Int32[])

SharpPlot.DrawScatterPlot Method (Int32[])

Scatter integer array of y-values against implied x-values.

public void DrawScatterPlot(
    int[] yValues
);
yValues
Data series to be plotted against the X-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Double[][],Int32[])

SharpPlot.DrawScatterPlot Method (Double[][],Int32[])

Scatter plot from multiple y and integer x values.

public void DrawScatterPlot(
    double[][] yValues,
    int[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Int32[][],Double[])

SharpPlot.DrawScatterPlot Method (Int32[][],Double[])

Scatter plot from multiple integer y and numeric x values.

public void DrawScatterPlot(
    int[][] yValues,
    double[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Int32[][],Int32[])

SharpPlot.DrawScatterPlot Method (Int32[][],Int32[])

Scatter plot from multiple integer y and x values.

public void DrawScatterPlot(
    int[][] yValues,
    int[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Double[],Double[])

SharpPlot.DrawScatterPlot Method (Double[],Double[])

Scatter plot from arrays of y and x values.

public void DrawScatterPlot(
    double[] yValues,
    double[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Double[],Int32[])

SharpPlot.DrawScatterPlot Method (Double[],Int32[])

Scatter plot from arrays of y and integer x values.

public void DrawScatterPlot(
    double[] yValues,
    int[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Double[],String[])

SharpPlot.DrawScatterPlot Method (Double[],String[])

Scatter plot from arrays of y and category x values.

public void DrawScatterPlot(
    double[] yValues,
    string[] xCategories
);
yValues
Data series to be plotted against the X-values.
xCategories
[todo]

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Double[])

SharpPlot.DrawScatterPlot Method (Double[])

Scatter array of y-values against implied x-values.

public void DrawScatterPlot(
    double[] yValues
);
yValues
Data series to be plotted against the X-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawScatterPlot Method (Int32[],Double[])

SharpPlot.DrawScatterPlot Method (Int32[],Double[])

Scatter plot from arrays of integer y and numeric x values.

public void DrawScatterPlot(
    int[] yValues,
    double[] xValues
);
yValues
Data series to be plotted against the X-values.
xValues
Numeric vector of X-values that is used for all the above Y-values.

See also ...

SharpPlot Members | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: DrawStepChart Method

SharpPlot.DrawStepChart Method

Construct step chart from data and step start-points.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
sp.SetPenWidths(3);
sp.SetColors(Color.OrangeRed);
ydata = new int[] {190,270,310,120,190,230};
xdata = new int[] {17,31,49,54,66,84,100};
sp.DrawStepChart(ydata,xdata);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawStepChart(int[] data);
  • public void DrawStepChart(double[] data);
  • public void DrawStepChart(int[] data,int[] stepStartValues);
  • public void DrawStepChart(double[] data,int[] stepStartValues);
  • public void DrawStepChart(int[] data,double[] stepStartValues);
  • public void DrawStepChart(double[] data,double[] stepStartValues);

Description

Stepcharts are used for two main purposes – timeseries where the values change discontinuously (interest rates are typical) and summary data where the groups are of variable width (monthly totals). SharpPlot can draw the steps with risers from the X-axis (which has the effect of abutted bars) and with shading down to either the axis or a given reference line.

Note that you often give on more X-value that Y-value here as the X-values give the start-point for each step and there is usually an extra point at the right-hand end to determine how far to draw the final horizontal segment.

See also ...

Step charts for discontinuous data | SharpPlot Members | SharpPlot.StepChartStyle Property


SharpPlot 3.71 User Manual: DrawStepChart Method (Double[],Double[])

SharpPlot.DrawStepChart Method (Double[],Double[])

Stepped line from arrays of height data and step-start values.

public void DrawStepChart(
    double[] data,
    double[] stepStartValues
);

See also ...

SharpPlot Members | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: DrawStepChart Method (Double[],Int32[])

SharpPlot.DrawStepChart Method (Double[],Int32[])

Stepped line from array of height data and integer step-start values.

public void DrawStepChart(
    double[] data,
    int[] stepStartValues
);

See also ...

SharpPlot Members | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: DrawStepChart Method (Double[])

SharpPlot.DrawStepChart Method (Double[])

Stepped line from arrays of height data and implied step-start values.

public void DrawStepChart(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: DrawStepChart Method (Int32[],Double[])

SharpPlot.DrawStepChart Method (Int32[],Double[])

Stepped line from integer array of height data and numeric step-start values.

public void DrawStepChart(
    int[] data,
    double[] stepStartValues
);

See also ...

SharpPlot Members | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: DrawStepChart Method (Int32[],Int32[])

SharpPlot.DrawStepChart Method (Int32[],Int32[])

Stepped line from integer array of height data and step-start values.

public void DrawStepChart(
    int[] data,
    int[] stepStartValues
);

See also ...

SharpPlot Members | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: DrawStepChart Method (Int32[])

SharpPlot.DrawStepChart Method (Int32[])

Stepped line from integer array of height data and implied step-start values.

public void DrawStepChart(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: DrawTable Method

SharpPlot.DrawTable Method

Construct table from a set of columns (or rows) of data.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(0,0,0,0);
sp.DrawFrame();
tabledata = new int[][]{new int[]{18,27,31,1},new int[]{12,9,7,3}};  // Two Columns
sp.SetYLabels(new string[]{"North","South","East","West"});
sp.SetXLabels(new string[]{"Pots","Pans"});
sp.YCaption = "Summary";
sp.TableStyle = TableStyles.Boxed|TableStyles.GridLines|TableStyles.FitWidth;
sp.SetValueFont("ARB",10);
sp.SetLabelFont("ARB",11);
sp.SetCaptionFont("ARB",11);
sp.DrawTable(tabledata);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawTable(int[] data);
  • public void DrawTable(string[] data);
  • public void DrawTable(double[] data);
  • public void DrawTable(int[][] data);
  • public void DrawTable(double[][] data);
  • public void DrawTable(string[][] tabledata);

Description

Tables are often used very effectively in combination with other charts to add summarized information. For example a plot of a stock price might include a small table of the low and high values for the past year, and maybe a comparison with the industry sector.

Tables in SharpPlot are often used in conjunction with Grouping and Splitting to create hierarchical summaries from raw database information. Spanned row-headers are often used to make the effect of the categorisation clear to the reader.

By default, arrays of arrays are taken as columns of items, but if it is more convenient this can be changed around by setting the DataStyle to Rows. If the data is already summarised and formatted, you can pass arrays of strings rather than numeric values here.

Note that the cell font is controlled by SharpPlot.SetValueFont.

Stand-alone Tables

If you call sp.DrawTable directly in a new frame (or a new cell in a trellis) it checks for any of the heading, subhead and footnote and decorates the table appropriately. If you add a table to an existing chart (effectively using it as a structured note) these settings are ignored by default. You can have them picked up by setting the UseHeaders style.

See also ...

Tabulating data | SharpPlot Members | SharpPlot.DataStyle Property | SharpPlot.TableStyle Property | SharpPlot.SetTablePosition Method


SharpPlot 3.71 User Manual: DrawTable Method (String[][])

SharpPlot.DrawTable Method (String[][])

Build a table from an array of arrays of strings, giving cells in columns.

public void DrawTable(
    string[][] tabledata
);

See also ...

SharpPlot Members | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: DrawTable Method (String[])

SharpPlot.DrawTable Method (String[])

One-column table from a string array.

public void DrawTable(
    string[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: DrawTable Method (Double[][])

SharpPlot.DrawTable Method (Double[][])

Table from an array of double arrays.

public void DrawTable(
    double[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: DrawTable Method (Double[])

SharpPlot.DrawTable Method (Double[])

One-column table from a double array.

public void DrawTable(
    double[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: DrawTable Method (Int32[][])

SharpPlot.DrawTable Method (Int32[][])

Table from an array of integer arrays.

public void DrawTable(
    int[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: DrawTable Method (Int32[])

SharpPlot.DrawTable Method (Int32[])

One-column table from an integer array.

public void DrawTable(
    int[] data
);

See also ...

SharpPlot Members | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: DrawTowerChart Method

SharpPlot.DrawTowerChart Method

Do 3D grid, and construct towerchart from simple rectangular set of heights.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(0,12,18,4);
towers = new int[][]{new int[]{77,65,12},new int[]{34,29,11}};
sp.TowerChartStyle = TowerChartStyles.WallShading|TowerChartStyles.GridLines;
sp.ZAxisStyle = ZAxisStyles.ForceZero;
sp.SetZTickMarks(20);
sp.Perspective = 6;
sp.SetAxisStyle(Color.Gray,LineStyle.Solid,0.5);
sp.DrawTowerChart(towers);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawTowerChart(int[] zData);
  • public void DrawTowerChart(double[] zData);
  • public void DrawTowerChart(int[][] zData);
  • public void DrawTowerChart(double[][] zData);

Description

Towercharts are simply grouped barcharts with the bars drawn ‘behind’ each other rather than in groups along the X-axis. They are best used where the visual effect is more important than the readability of the data values, as it is almost impossible to read the ‘height’ values reliably, and it is very likely that in a crowded chart some towers will be completely obscured.

It may be necessary to allow the user to adjust the tower-spacing and viewpoint to get a clear picture of the relative heights of the towers, and it is generally best to sort the data so that the taller towers are further away from the viewpoint.

See also ...

Tower charts for 3D bars | SharpPlot Members | SharpPlot.TowerChartStyle Property | SharpPlot.SetViewpoint Method


SharpPlot 3.71 User Manual: DrawTowerChart Method (Double[][])

SharpPlot.DrawTowerChart Method (Double[][])

Tower chart from an array of arrays of height values.

public void DrawTowerChart(
    double[][] zData
);

See also ...

SharpPlot Members | SharpPlot.DrawTowerChart Method


SharpPlot 3.71 User Manual: DrawTowerChart Method (Int32[][])

SharpPlot.DrawTowerChart Method (Int32[][])

Tower chart from an array of integer arrays of height values.

public void DrawTowerChart(
    int[][] zData
);

See also ...

SharpPlot Members | SharpPlot.DrawTowerChart Method


SharpPlot 3.71 User Manual: DrawTowerChart Method (Double[])

SharpPlot.DrawTowerChart Method (Double[])

Column chart from an array of height values.

public void DrawTowerChart(
    double[] zData
);

See also ...

SharpPlot Members | SharpPlot.DrawTowerChart Method


SharpPlot 3.71 User Manual: DrawTowerChart Method (Int32[])

SharpPlot.DrawTowerChart Method (Int32[])

Column chart from an integer array of height values.

public void DrawTowerChart(
    int[] zData
);

See also ...

SharpPlot Members | SharpPlot.DrawTowerChart Method


SharpPlot 3.71 User Manual: DrawTraceChart Method

SharpPlot.DrawTraceChart Method

Seismometer-style chart with multiple parallel traces.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
tracedata = new int[][]{new int[]{0,4,9,12,5,5,10,2},new int[]{0,5,7,8,3,2,9,1},new
         int[]{0,3,3,4,0,1,4,1}};
sp.YAxisStyle = YAxisStyles.GridLines|YAxisStyles.ArrowedAxis;
sp.IAxisStyle = IAxisStyles.PlainAxis;
sp.DrawTraceChart(tracedata);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawTraceChart(int[][] data);
  • public void DrawTraceChart(double[][] data);
  • public void DrawTraceChart(int[][] data,int[] xValues);
  • public void DrawTraceChart(double[][] data,int[] xValues);
  • public void DrawTraceChart(int[][] data,double[] xValues);
  • public void DrawTraceChart(double[][] data,double[] xValues);

Description

Trace charts are a slightly specialist style of plot, originally designed for data from devices like seismographs and EEGs where multiple pens trace out (almost) parallel lines. Each pen is allocated a tickmark on the Y-axis and then an ‘inner axis’ is created for it (naturally these inner axes are all scaled identically). The trace may be filled (a style of chart often used to show inventories in a tank-farm at an oil refinery) or it may be drawn symmetrically to create a style called a ‘Kite diagram’ which often appears in botanical studies of vegetation coverage.

See also ...

Trace charts for multiple series | SharpPlot Members | SharpPlot.TraceChartStyle Property


SharpPlot 3.71 User Manual: DrawTraceChart Method (Double[][],Double[])

SharpPlot.DrawTraceChart Method (Double[][],Double[])

Draw a set of parallel traces from an array of arrays of Y-values and an array of X-values.

public void DrawTraceChart(
    double[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: DrawTraceChart Method (Double[][],Int32[])

SharpPlot.DrawTraceChart Method (Double[][],Int32[])

Draw a set of traces from an array of arrays of Y-values and an integer array of X-values.

public void DrawTraceChart(
    double[][] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: DrawTraceChart Method (Double[][])

SharpPlot.DrawTraceChart Method (Double[][])

Draw a set of traces from an array of arrays of Y-values against a nominal or bundled X-axis.

public void DrawTraceChart(
    double[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: DrawTraceChart Method (Int32[][],Double[])

SharpPlot.DrawTraceChart Method (Int32[][],Double[])

Draw a set of traces from an integer array of arrays of Y-values and an array of X-values.

public void DrawTraceChart(
    int[][] data,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: DrawTraceChart Method (Int32[][],Int32[])

SharpPlot.DrawTraceChart Method (Int32[][],Int32[])

Draw a set of traces from an integer array of arrays of Y-values and an integer array of X-values.

public void DrawTraceChart(
    int[][] data,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: DrawTraceChart Method (Int32[][])

SharpPlot.DrawTraceChart Method (Int32[][])

Draw a set of traces from an integer array of arrays of Y-values against a nominal X-axis.

public void DrawTraceChart(
    int[][] data
);

See also ...

SharpPlot Members | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: DrawTreeMap Method

SharpPlot.DrawTreeMap Method

Construct map from integer values, level vector, and altitude.

Example

sp.Reset(width,height);
sp.SetMargins(6,6,6,6);

sp.BarEdgeNib = 0;

sp.SetAltitudeColors(new Color[]{Color.Maroon,Color.Gray,Color.Lime});
sp.SetFillStyles(FillStyle.GradientTop);
sp.TreeMapStyle = (TreeMapStyles.ValueTags|TreeMapStyles.AltitudeShading);
sp.ValueTagFormat = "£####M";
sp.SetZRange(0,5);
sp.ZCaption = "Daily difference";

sp.SetXLabelFont("ARB",6,ColorTranslator.FromHtml("#FFD491"));  // Orange

sp.SetXLabels(new string[]{"Main block","Parent block","Child1","Child2"});

area = new int[] {123,56,23,33};
level = new int[] {0,0,1,1};
alt = new int[] {5,3,0,1};

sp.DrawTreeMap(area,level,alt);

Overloads

  • public void DrawTreeMap(int[] data);
  • public void DrawTreeMap(double[] data);
  • public void DrawTreeMap(int[] data,int[] level);
  • public void DrawTreeMap(double[] data,int[] level);
  • public void DrawTreeMap(double[] data,int level,double[] alt);
  • public void DrawTreeMap(int[] data,int[] level,int[] alt);
  • public void DrawTreeMap(int[] data,int[] level,double[] alt);
  • public void DrawTreeMap(double[] data,int[] level,int[] alt);
  • public void DrawTreeMap(double[] data,int[] level,double[] alt);

Description

Draws a standard Heatmap from a tree of area values.

data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).
alt
Extra dimension for altitude coloring.

See also ...

SharpPlot Members | SharpPlot.TreeMapStyle Property


SharpPlot 3.71 User Manual: DrawTreeMap Method (Int32[],Int32[],Double[])

SharpPlot.DrawTreeMap Method (Int32[],Int32[],Double[])

Construct map from integer values, level vector, and altitude.

public void DrawTreeMap(
    int[] data,
    int[] level,
    double[] alt
);
data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).
alt
Extra dimension for altitude coloring.

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Int32[],Int32[],Int32[])

SharpPlot.DrawTreeMap Method (Int32[],Int32[],Int32[])

Construct map from values, level vector, and integer altitude.

public void DrawTreeMap(
    int[] data,
    int[] level,
    int[] alt
);
data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).
alt
Extra dimension for altitude coloring.

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Double[],Int32[],Int32[])

SharpPlot.DrawTreeMap Method (Double[],Int32[],Int32[])

Construct map from values, level vector, and integer altitude.

public void DrawTreeMap(
    double[] data,
    int[] level,
    int[] alt
);
data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).
alt
Extra dimension for altitude coloring.

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Double[],Int32,Double[])

SharpPlot.DrawTreeMap Method (Double[],Int32,Double[])

Construct map from values, single level and altitude vectors.

public void DrawTreeMap(
    double[] data,
    int level,
    double[] alt
);
data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).
alt
Extra dimension for altitude coloring.

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Double[],Int32[])

SharpPlot.DrawTreeMap Method (Double[],Int32[])

Construct map from values and level vectors.

public void DrawTreeMap(
    double[] data,
    int[] level
);
data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Int32[],Int32[])

SharpPlot.DrawTreeMap Method (Int32[],Int32[])

Construct map from integer values and level vectors.

public void DrawTreeMap(
    int[] data,
    int[] level
);
data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Double[])

SharpPlot.DrawTreeMap Method (Double[])

Construct map from values only.

public void DrawTreeMap(
    double[] data
);
data
Area of each rectangle.

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Int32[])

SharpPlot.DrawTreeMap Method (Int32[])

Construct map from integer values only.

public void DrawTreeMap(
    int[] data
);
data
Area of each rectangle.

See also ...

SharpPlot Members | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: DrawTreeMap Method (Double[],Int32[],Double[])

SharpPlot.DrawTreeMap Method (Double[],Int32[],Double[])

Construct map from values, level vector, and integer altitude.

public void DrawTreeMap(
    double[] data,
    int[] level,
    int[] alt
);
data
Area of each rectangle.
level
Depth in tree structure (level-0 are roots).
alt
Extra dimension for altitude coloring.


SharpPlot 3.71 User Manual: DrawTriangle Method

SharpPlot.DrawTriangle Method

Create a triangle chart (relative proportions of exactly 3 series):

Example

samples = new int[,] {{3,4,4},{4,2,2},{3,4,2},{4,3,1}};

sp.SetMargins(12,6,0,0);
sp.TriangleStyle = TriangleStyles.GridLines|TriangleStyles.Markers;
sp.SetMarkers(Marker.Bullet);

sp.XCaption = "Na";
sp.YCaption = "K";
sp.ZCaption = "Ca";

sp.DrawTriangle(samples);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawTriangle(int[][] data);
  • public void DrawTriangle(double[][] data);
  • public void DrawTriangle(int[,] data);
  • public void DrawTriangle(double[,] data);
  • public void DrawTriangle(int[] s1,int[] s2,int[] s3);
  • public void DrawTriangle(double[] s1,double[] s2,double[] s3);

Description

This chart is typically used to profile a series of samples of the 3 key constituents of some raw material or industrial process. The data may be shown as proportions or percentages, but it will always be normalised into the range 0-1. If only 2 sets of samples are given, the third set is deduced by subtraction from 1 or 100 as appropriate.

Various styles can be used to vary the appearance of the chart, but the axis range and tick spacing are pre-determined here.

See also ...

Triangle plots for 3-way proportions | SharpPlot Members | SharpPlot.TriangleStyle Property


SharpPlot 3.71 User Manual: DrawTriangle Method (Int32[][])

SharpPlot.DrawTriangle Method (Int32[][])

Triangle plot from 3 matching series of counts.

public void DrawTriangle(
    int[][] data
);
data
Exactly 3 matching series of counts or proportions.

See also ...

SharpPlot Members | SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: DrawTriangle Method (Double[0:,0:])

SharpPlot.DrawTriangle Method (Double[0:,0:])

Triangle plot from a 3-col matrix of proportions.

public void DrawTriangle(
    double[,] data
);
data
Exactly 3 matching series of counts or proportions.

See also ...

SharpPlot Members | SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: DrawTriangle Method (Int32[0:,0:])

SharpPlot.DrawTriangle Method (Int32[0:,0:])

Triangle plot from a 3-col matrix of counts.

public void DrawTriangle(
    int[,] data
);
data
Exactly 3 matching series of counts or proportions.

See also ...

SharpPlot Members | SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: DrawTriangle Method (Double[],Double[],Double[])

SharpPlot.DrawTriangle Method (Double[],Double[],Double[])

Triangle plot of 3 arrays of proportions.

public void DrawTriangle(
    double[] s1,
    double[] s2,
    double[] s3
);
s1
First set of counts.
s2
Second set of counts.
s3
Third set of counts.

See also ...

SharpPlot Members | SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: DrawTriangle Method (Int32[],Int32[],Int32[])

SharpPlot.DrawTriangle Method (Int32[],Int32[],Int32[])

Triangle plot of 3 arrays of counts.

public void DrawTriangle(
    int[] s1,
    int[] s2,
    int[] s3
);
s1
First set of counts.
s2
Second set of counts.
s3
Third set of counts.

See also ...

SharpPlot Members | SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: DrawTriangle Method (Double[][])

SharpPlot.DrawTriangle Method (Double[][])

Triangle plot from 3 matching series of counts.

public void DrawTriangle(
    int[][] data
);
data
Exactly 3 matching series of counts or proportions.

See also ...

SharpPlot Members | SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: DrawVectors Method

SharpPlot.DrawVectors Method

Create a vector diagram (showing a directed graph, or current flows):

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
x1 = new int[] {77,25,43,42,93,32,81,14,64,4,71,98};
y1 = new int[] {17,48,55,24,52,74,31,98,70,63,63,43};
x2 = new int[] {93,31,51,50,114,40,99,19,78,7,86,121};
y2 = new int[] {24,57,65,31,63,85,41,110,83,75,75,53};
sp.VectorStyle = VectorStyles.ArrowLines;
sp.DrawVectors(x1,y1,x2,y2);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawVectors(int[,] data);
  • public void DrawVectors(int[] x1,int[] y1,int[] x2,int[] y2);
  • public void DrawVectors(double[] x1,double[] y1,double[] x2,double[] y2);
  • public void DrawVectors(int[][] data);
  • public void DrawVectors(double[][] data);
  • public void DrawVectors(double[,] data);

Description

This method takes a matrix (or regular array) of xyxy pairs and draws a set of lines connecting each pair of points. The lines can be marked on the ‘target’ end with arrows, or marked at the root/target ends with the current marker.

Two good uses of this chart type are for drawing any style of directed graph (typically a PERT chart or assembly diagram), or representing a vector field, such as current flows or wind speeds on a map. Value Tags are written along the lines, and are always centered. They may contain multiple lines of text.

See also ...

Vector fields and directed graphs | SharpPlot Members | SharpPlot.DataStyle Property | SharpPlot.VectorStyle Property


SharpPlot 3.71 User Manual: DrawVectors Method (Int32[0:,0:])

SharpPlot.DrawVectors Method (Int32[0:,0:])

Vector plot from an integer matrix of xyxy pairs.

public void DrawVectors(
    int[,] data
);
data
4 series of x y x y.

See also ...

SharpPlot Members | SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: DrawVectors Method (Int32[],Int32[],Int32[],Int32[])

SharpPlot.DrawVectors Method (Int32[],Int32[],Int32[],Int32[])

Vector plot from 4 series.

public void DrawVectors(
    int[] x1,
    int[] y1,
    int[] x2,
    int[] y2
);
x1
deceiv #.cc.checkforargs into believing this is mult-arg so that DrawVectors(a b c d) does DrawVectors(a,b,c,d) and not DrawVectors(new double[][]{a,b,c,d}) for #.qa.figs.VectorFigs.
y1
4 series of x y x y.
x2
deceiv #.cc.checkforargs into believing this is mult-arg so that DrawVectors(a b c d) does DrawVectors(a,b,c,d) and not DrawVectors(new double[][]{a,b,c,d}) for #.qa.figs.VectorFigs.
y2
4 series of x y x y.

See also ...

SharpPlot Members | SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: DrawVectors Method (Double[],Double[],Double[],Double[])

SharpPlot.DrawVectors Method (Double[],Double[],Double[],Double[])

Vector plot from 4 series.

public void DrawVectors(
    double[] x1,
    double[] y1,
    double[] x2,
    double[] y2
);
x1
deceiv #.cc.checkforargs into believing this is mult-arg so that DrawVectors(a b c d) does DrawVectors(a,b,c,d) and not DrawVectors(new double[][]{a,b,c,d}) for #.qa.figs.VectorFigs.
y1
4 series of x y x y.
x2
deceiv #.cc.checkforargs into believing this is mult-arg so that DrawVectors(a b c d) does DrawVectors(a,b,c,d) and not DrawVectors(new double[][]{a,b,c,d}) for #.qa.figs.VectorFigs.
y2
4 series of x y x y.

See also ...

SharpPlot Members | SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: DrawVectors Method (Int32[][])

SharpPlot.DrawVectors Method (Int32[][])

Vector plot from series of xyxy.

public void DrawVectors(
    int[][] data
);
data
4 series of x y x y.

See also ...

SharpPlot Members | SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: DrawVectors Method (Double[][])

SharpPlot.DrawVectors Method (Double[][])

Vector plot from series of xyxy.

public void DrawVectors(
    double[][] data
);
data
4 series of x y x y.

See also ...

SharpPlot Members | SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: DrawVectors Method (Double[0:,0:])

SharpPlot.DrawVectors Method (Double[0:,0:])

Vector plot from 4 series of x y x y.

public void DrawVectors(
    double[,] data
);
data
4 series of x y x y.

See also ...

SharpPlot Members | SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: DrawVennDiagram Method

SharpPlot.DrawVennDiagram Method

Draw a Venn diagram using supplied membership data.

public void DrawVennDiagram(
    int[] regionValues
);

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,4,4);
sp.VennDiagramStyle = VennDiagramStyles.Filled;
sp.DrawVennDiagram(new int[] {27,19,8});

The short tutorial has several more variations on the basic design.

Description

The Venn diagram shows a diagrammatic view of Set membership data, using the correct proportions for the simply case with 2 populations (and 1 overlap) and a simple diagram with intersecting circles for the 3-area case.

Only simple proportional (2-area) and diagrammatic (3-area) diagrams are supported.

See also ...

Venn diagrams | SharpPlot Members | SharpPlot.VennDiagramStyle Property


SharpPlot 3.71 User Manual: DrawXBarChart Method

SharpPlot.DrawXBarChart Method

Create Barchart (vertical only) with given rather than logical X-axis.

Example

sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
sp.XAxisStyle = XAxisStyles.ForceZero;
data = new int[] {18,27,31,12,19,23};
xdata = new int[] {4,7,8,13,14,17};
sp.DrawXBarChart(data,xdata);

The short tutorial shows a few of the possibilities and some sample code.

Overloads

  • public void DrawXBarChart(int[] yValues,int[] xValues);
  • public void DrawXBarChart(double[] yValues,int[] xValues);
  • public void DrawXBarChart(int[] yValues,double[] xValues);
  • public void DrawXBarChart(double[] yValues,double[] xValues);
  • public void DrawXBarChart(int[][] yValues,int[] xValues);
  • public void DrawXBarChart(double[][] yValues,int[] xValues);
  • public void DrawXBarChart(int[][] yValues,double[] xValues);
  • public void DrawXBarChart(double[][] yValues,double[] xValues);

Description

Conventional barcharts have a purely notional X-axis – the bars are equally spaced and the bar widths are calculated from the required inter-bar spacing. In the XBar chart, you have full control over the placement of the bars and the widths – this chart would typically be used to show time on the X-axis and occasional major events (say hurricanes or earthquakes) using the bars to indicat the severity.

The widths of the bars may also be individually controlled, so it is possible to indicate more than one feature of the event using both the height and width of the bar.

See also ...

X Bar charts for positioned bars | SharpPlot Members | SharpPlot.XBarChartStyle Property | SharpPlot.SetBarWidths Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Double[][],Double[])

SharpPlot.DrawXBarChart Method (Double[][],Double[])

XBarchart from multiple data series and x-values.

public void DrawXBarChart(
    double[][] yValues,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Double[][],Int32[])

SharpPlot.DrawXBarChart Method (Double[][],Int32[])

XBarchart from multiple data series and integer x-values.

public void DrawXBarChart(
    double[][] yValues,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Int32[][],Double[])

SharpPlot.DrawXBarChart Method (Int32[][],Double[])

XBarchart from multiple integer data series and numeric x-values.

public void DrawXBarChart(
    int[][] yValues,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Int32[][],Int32[])

SharpPlot.DrawXBarChart Method (Int32[][],Int32[])

XBarchart from multiple integer data series and x-values.

public void DrawXBarChart(
    int[][] yValues,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Double[],Double[])

SharpPlot.DrawXBarChart Method (Double[],Double[])

XBarchart from a single data series and x-values.

public void DrawXBarChart(
    double[] yValues,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Double[],Int32[])

SharpPlot.DrawXBarChart Method (Double[],Int32[])

XBarchart from a single data series and integer x-values.

public void DrawXBarChart(
    double[] yValues,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Int32[],Double[])

SharpPlot.DrawXBarChart Method (Int32[],Double[])

XBarchart from a single integer data series and numeric x-values.

public void DrawXBarChart(
    int[] yValues,
    double[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: DrawXBarChart Method (Int32[],Int32[])

SharpPlot.DrawXBarChart Method (Int32[],Int32[])

XBarchart from a single integer data series and integer x-values.

public void DrawXBarChart(
    int[] yValues,
    int[] xValues
);

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: FindExtremes Method

SharpPlot.FindExtremes Method

Find extreme values from array of arrays of y values and x-values. This returns the lower left and upper right corners of the rectangle bounding your data, allowing for the Curves style if this has been set. You may want to use the numbers it returns to ensure your axis ranges are set to include the curved lines connecting the points as well as the points themselves.

public double[] FindExtremes(
    double[][] data,
    int[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.
  • public double[] FindExtremes(int[] data);
  • public double[] FindExtremes(double[] data);
  • public double[] FindExtremes(int[][] data);
  • public double[] FindExtremes(double[][] data);
  • public double[] FindExtremes(int[] data,int[] xValues);
  • public double[] FindExtremes(double[] data,int[] xValues);
  • public double[] FindExtremes(int[] data,double[] xValues);
  • public double[] FindExtremes(double[] data,double[] xValues);
  • public double[] FindExtremes(int[][] data,int[] xValues);
  • public double[] FindExtremes(double[][] data,int[] xValues);
  • public double[] FindExtremes(int[][] data,double[] xValues);
  • public double[] FindExtremes(double[][] data,double[] xValues);

Note that the Curves option will compute the Bezier control points which always encompass the generated curve completely. This may slightly over-estimate the required range if the flexibility parameter is set very high.

See also ...

Curves are used to join data points | SharpPlot Members | SharpPlot.Flexibility Property | SharpPlot.SetXDataRange Method | SharpPlot.SetYDataRange Method


SharpPlot 3.71 User Manual: FindExtremes Method (Double[][],Double[])

SharpPlot.FindExtremes Method (Double[][],Double[])

Find extreme values from array of arrays of y values and x-values.

public double[] FindExtremes(
    double[][] data,
    double[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

Usage

Required for any app which uses ‘Curves’ and needs to set the axis ranges. Will slightly over-estimate as it gets the Bezier control points which are always outside the envelope of the cubic curve.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Int32[],Double[])

SharpPlot.FindExtremes Method (Int32[],Double[])

Find extreme values from integer array of y-values and double array of x-values.

public double[] FindExtremes(
    int[] data,
    double[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Int32[],Int32[])

SharpPlot.FindExtremes Method (Int32[],Int32[])

Find extreme values from integer array of y-values and x-values.

public double[] FindExtremes(
    int[] data,
    int[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Int32[])

SharpPlot.FindExtremes Method (Int32[])

Find extreme values from integer array of y-values and implied x-values.

public double[] FindExtremes(
    int[] data
);
data
Array (of arrays) of y values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Double[][],Int32[])

SharpPlot.FindExtremes Method (Double[][],Int32[])

Find extreme values from array of arrays of y-values and integer x-values.

public double[] FindExtremes(
    double[][] data,
    int[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Double[][])

SharpPlot.FindExtremes Method (Double[][])

Find extreme values from array of arrays of y-values and implied x-values.

public double[] FindExtremes(
    double[][] data
);
data
Array (of arrays) of y values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Double[],Double[])

SharpPlot.FindExtremes Method (Double[],Double[])

Find extreme values from array of y-values and array of x-values.

public double[] FindExtremes(
    double[] data,
    double[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Double[],Int32[])

SharpPlot.FindExtremes Method (Double[],Int32[])

Find extreme values from array of y-values and integer array of x-values.

public double[] FindExtremes(
    double[] data,
    int[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Double[])

SharpPlot.FindExtremes Method (Double[])

Find extreme values from array of y-values and implied x-values.

public double[] FindExtremes(
    double[] data
);
data
Array (of arrays) of y values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Int32[][],Double[])

SharpPlot.FindExtremes Method (Int32[][],Double[])

Find extreme values from integer array of arrays of y-values and double x-values.

public double[] FindExtremes(
    int[][] data,
    double[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Int32[][],Int32[])

SharpPlot.FindExtremes Method (Int32[][],Int32[])

Find extreme values from integer array of arrays of y-values and x-values.

public double[] FindExtremes(
    int[][] data,
    int[] xValues
);
data
Array (of arrays) of y values.
xValues
Array of x values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: FindExtremes Method (Int32[][])

SharpPlot.FindExtremes Method (Int32[][])

Find extreme values from integer array of arrays of y-values and implied x-values.

public double[] FindExtremes(
    int[][] data
);
data
Array (of arrays) of y values.
return value
Bounding box co-ordinates.

See also ...

SharpPlot Members | SharpPlot.FindExtremes Method


SharpPlot 3.71 User Manual: GetAltitudeColors Method

SharpPlot.GetAltitudeColors Method

Get the array of colors used in Altitude Colors.

public Color[] GetAltitudeColors();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetCharsets Method

SharpPlot.GetCharsets Method

Return the list of used characters for each used font.

public string[][] GetCharsets();

Result

Three string[] lists : fontnames, fontstyles, charsets.

Description

The result is three lists of strings :

  • First is list of font names, as registered by the Operating System
  • Second is corresponding list of fontstyles (one of “Regular” “Bold” “Italic” “Bold, Italic”, as returned by FontStyle.ToString)
  • Third is corresponding list of character subsets.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetCoefficients Method

SharpPlot.GetCoefficients Method

Coefficients from regression model.

public double[] GetCoefficients();

Example

double[] coeff = sp.GetCoefficients();
double intercept = coeff[0];
double slope = coeff[1];

These are returned in order of increasing power, so for a linear model the returned array will have 2 elements giving intercept and slope. They could be used to compute Y-values for a specific set of ‘benchmark’ X-values and draw some guidelines on the chart or just to add a note describing the model.

See also ...

Model fit | SharpPlot Members | SharpPlot.GetFittedValues Method | SharpPlot.GetResiduals Method


SharpPlot 3.71 User Manual: GetColors Method

SharpPlot.GetColors Method

Get the array of colors used by upcoming series.

public Color[] GetColors();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetFillStyles Method

SharpPlot.GetFillStyles Method

Get an array of fill-styles used by upcoming series.

public FillStyle[] GetFillStyles();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetFittedValues Method

SharpPlot.GetFittedValues Method

Fitted values from regression model.

public double[] GetFittedValues();

This returns the item-by-item values as computed from the regression equation.

See also ...

Model fit | SharpPlot Members | SharpPlot.GetCoefficients Method | SharpPlot.GetResiduals Method


SharpPlot 3.71 User Manual: GetITickPositions Method

SharpPlot.GetITickPositions Method

I ticks (calc) READONLY.

public double[] GetITickPositions();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetKeyBoxes Method

SharpPlot.GetKeyBoxes Method

Key boxes – bounding boxes of last round of drawn keys, given as a list of 4-item double vectors (top left bottom right) in absolute paper coordinates from bottom left.

This list is reset every time a new round of keys is drawn.

public double[][] GetKeyBoxes();

See also ...

SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: GetKeyIndices Method

SharpPlot.GetKeyIndices Method

Get int[] setting for Key indices.

public int[] GetKeyIndices();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetLabelMask Method

SharpPlot.GetLabelMask Method

Label mask.

public bool[] GetLabelMask();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetLineStyles Method

SharpPlot.GetLineStyles Method

Get the array of line-styles to be used by upcoming series.

public LineStyle[] GetLineStyles();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetMarkerColors Method

SharpPlot.GetMarkerColors Method

Get the array of colors used in Marker Colors.

public Color[] GetMarkerColors();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetMarkers Method

SharpPlot.GetMarkers Method

Get the array of markers for upcoming series.

public Marker[] GetMarkers();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetNetworkMapLinkArc Method

SharpPlot.GetNetworkMapLinkArc Method

NetworkMap Link Arc as given by user.

public double[] GetNetworkMapLinkArc();

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: GetNetworkMapSelfArc Method

SharpPlot.GetNetworkMapSelfArc Method

NetworkMap Self Arc, as given by user.

public double[] GetNetworkMapSelfArc();

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: GetNextNote Method

SharpPlot.GetNextNote Method

This call returns the vertical position (baseline) for the following note after a note which has been wrapped.

public double GetNextNote(double vspace);

Returns the correct position for the next note text in points (absolute style) or chart co-ords (relative style). You can use this to position a set of notes (for example a subheading followed by one or more wrapped paragraphs) correctly on the chart.

vpos = sp.NextNote(6);  // add 6pt headspace
sp.DrawNote("Hi",50,vpos);  // follow on

This spaces vertically down by <vspace> (in points always) from the calculated baseline for the next text output. Call this with no argument to have the text flow naturally, or 12 to add a line of space between paragraphs. The resulting <vpos> is returned in chart co-ordinates if you positioned your note this way, or in absolute (points) co-ordinates relative to the lower left corner of the current frame if you placed your note with style ‘absolute’.


SharpPlot 3.71 User Manual: GetPaperSize Method

SharpPlot.GetPaperSize Method

Get paper size as a 2-item double vector (width height).

public double[] GetPaperSize();

Result

Paper size as a 2-item double vector (width height).

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetPenWidths Method

SharpPlot.GetPenWidths Method

Get the array of line-widths for upcoming series.

public double[] GetPenWidths();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetResiduals Method

SharpPlot.GetResiduals Method

Residuals – point-by-point differences between the datapoints and the computed model.

public double[] GetResiduals();

See also ...

Model fit | SharpPlot Members | SharpPlot.GetCoefficients Method | SharpPlot.GetFittedValues Method


SharpPlot 3.71 User Manual: GetTextSize Method

SharpPlot.GetTextSize Method

Get text width and height in points.

Overloads

  • public double[] GetTextSize(string text,string fontName,double fontSize);
  • public double[] GetTextSize(string text,string fontName,double fontSize,double lineSpacing);

Result

Size of text as {width, height}.

Description

Newline characters are interpreted.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetTextSize Method (String,String,Double)

SharpPlot.GetTextSize Method (String,String,Double)

Get text width and height in points, given font name and size.

public double[] GetTextSize(
    string text,
    string fontName,
    double fontSize
);
text
text to measure (newlines are interpreted).
fontName
font face name.
fontSize
font size in points.
return value
size of text as {width, height}.

See also ...

SharpPlot Members | SharpPlot.GetTextSize Method


SharpPlot 3.71 User Manual: GetTextSize Method (String,String,Double,Double)

SharpPlot.GetTextSize Method (String,String,Double,Double)

Get text width and height in points.

public double[] GetTextSize(
    string text,
    string fontName,
    double fontSize,
    double lineSpacing
);
text
text to measure (newlines are interpreted).
fontName
font face name.
fontSize
font size in points.
lineSpacing
line spacing (defaults to 1.2 for 20% line spacing).
return value
size of text as {width, height}.

See also ...

SharpPlot Members | SharpPlot.GetTextSize Method


SharpPlot 3.71 User Manual: GetTrellisBoxes Method

SharpPlot.GetTrellisBoxes Method

Get the current trellis boxes as a list of (x y x y) coordinates.

public double[][] GetTrellisBoxes();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetViewpoint Method

SharpPlot.GetViewpoint Method

Get 3D viewpoint given a set of roll,pitch,yaw values in degrees.

public double[] GetViewpoint();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetXTickPositions Method

SharpPlot.GetXTickPositions Method

Find the computed values of the X-tickmarks.

public double[] GetXTickPositions();

This may be useful in positioning chart notes, for example to place a note at the last X-tickmark and the topmost Y-tickmark when both X and Y axes have been ranged from the data.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetYTickPositions Method

SharpPlot.GetYTickPositions Method

Find the computed values of the Y-tickmarks.

public double[] GetYTickPositions();

This may be useful in positioning chart notes, for example to place a note at the first X-tickmark and the topmost Y-tickmark.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GetZTickPositions Method

SharpPlot.GetZTickPositions Method

Calculated Z tickmarks.

public double[] GetZTickPositions();

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: GroupBy Method

SharpPlot.GroupBy Method

Prepare key-based grouping criterion prior to plotting data. This is typically used to summarize data which results from a database query. It may be called more than once to set up a hierarchy of summaries, typically used with the table chart.

Example

sp.GroupBy(barleyvariety);
sp.GroupBy(barleyfarm,GroupByFunction.Average);

See the tutorial on grouping and splitting data for more examples.

Overloads

  • public void GroupBy(string[] values,string[] categories,GroupByFunction groupingFunction);
  • public void GroupBy(string[] values,string[] categories);
  • public void GroupBy(string[] values,GroupByFunction groupingFunction);
  • public void GroupBy(string[] values);
  • public void GroupBy(int[] values,int[] categories,GroupByFunction groupingFunction);
  • public void GroupBy(int[] values,int[] categories);
  • public void GroupBy(int[] values,GroupByFunction groupingFunction);
  • public void GroupBy(int[] values);

See also ...

Grouping and Splitting database data | SharpPlot Members


SharpPlot 3.71 User Manual: GroupBy Method (String[],String[],GroupByFunction)

SharpPlot.GroupBy Method (String[],String[],GroupByFunction)

Group data into preset categories, specifying the grouping function to use (such as Count or Average).

public void GroupBy(
    string[] values,
    string[] categories,
    GroupByFunction groupingFunction
);

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: GroupBy Method (Int32[])

SharpPlot.GroupBy Method (Int32[])

Group integer data into default categories using summation.

public void GroupBy(
    int[] values
);

The ‘bins’ will simply be the distinct values in the data, taken in order of first appearance.

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: GroupBy Method (String[],String[])

SharpPlot.GroupBy Method (String[],String[])

Group data into preset categories, using summation.

public void GroupBy(
    string[] values,
    string[] categories
);

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: GroupBy Method (String[],GroupByFunction)

SharpPlot.GroupBy Method (String[],GroupByFunction)

Group data into default categories, specifying the grouping function to use (such as Count or Average).

public void GroupBy(
    string[] values,
    GroupByFunction groupingFunction
);

The ‘bins’ will simply be the distinct values in the data, taken in order of first appearance.

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: GroupBy Method (String[])

SharpPlot.GroupBy Method (String[])

Group data into default categories, using summation.

public void GroupBy(
    string[] values
);

The ‘bins’ will simply be the distinct values in the data, taken in order of first appearance.

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: GroupBy Method (Int32[],Int32[],GroupByFunction)

SharpPlot.GroupBy Method (Int32[],Int32[],GroupByFunction)

Group integer data into preset categories, specifying the grouping function to use (such as Count or Average).

public void GroupBy(
    int[] values,
    int[] categories,
    GroupByFunction groupingFunction
);

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: GroupBy Method (Int32[],Int32[])

SharpPlot.GroupBy Method (Int32[],Int32[])

Group integer data into preset categories, using simple summation.

public void GroupBy(
    int[] values,
    int[] categories
);

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: GroupBy Method (Int32[],GroupByFunction)

SharpPlot.GroupBy Method (Int32[],GroupByFunction)

Group integer data into default categories, specifying the grouping function to use (such as Count or Average).

public void GroupBy(
    int[] values,
    GroupByFunction groupingFunction
);

The ‘bins’ will simply be the distinct values in the data, taken in order of first appearance.

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: IncludeSource Method

SharpPlot.IncludeSource Method

Add arbitrary (SVG/EPS) content to beginning or end of output stream.

Example

string svgfiters = "<defs> <filter id=\"MyShadow\"> <feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"12\" result=\"blur\"/> " +
                    "<feOffset in=\"blur\" dx=\"24\" dy=\"20\" result=\"offsetBlur\"/> <feMerge> <feMergeNode in=\"offsetBlur\"/> " +
                    "<feMergeNode in=\"SourceGraphic\"/> </feMerge> </filter> </defs>";

sp.IncludeSource(svgfilter); // include filter in SVG definition
sp.AddEffect(ScriptTarget.Heading,"#MyShadow"); // use filter on heading
sp.DefineFont("AS","Arial,Sans","filter:url(#MyShadow)"); // define a font with filter
sp.SetFootnoteFont("AS"); // use font

Overloads

  • public void IncludeSource(string arbitraryText);
  • public void IncludeSource(string[] arbitraryText);
  • public void IncludeSource(string[] arbitraryText,bool atEnd);
  • public void IncludeSource(string arbitraryText,bool atEnd);

This would typically be used to prepend SVG filters to the final output. It can also add arbitrary content to the end of the generated output, by setting the atEnd value to true.

The source has to match the output format that will be used for the chart. For example if you include SVG but export the chart as EPS, the included SVG will corrupt the output EPS. If you need to export your chart in different output format AND have format-specific prologues, you can set the prologue argument of the Render functions (e.g. SharpPlot.RenderEps).

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: IncludeSource Method (String)

SharpPlot.IncludeSource Method (String)

Add SVG filter to front of output stream.

public void IncludeSource(
    string arbitraryText
);
arbitraryText
content to include.

See also ...

SharpPlot Members | SharpPlot.IncludeSource Method


SharpPlot 3.71 User Manual: IncludeSource Method (String[])

SharpPlot.IncludeSource Method (String[])

Add SVG filter or EPS header passed as array of strings to front of output stream.

public void IncludeSource(
    string[] arbitraryText
);
arbitraryText
content to include.

See also ...

SharpPlot Members | SharpPlot.IncludeSource Method


SharpPlot 3.71 User Manual: IncludeSource Method (String[],Boolean)

SharpPlot.IncludeSource Method (String[],Boolean)

Add SVG filter or EPS header passed as array of strings to either end of output.

public void IncludeSource(
    string[] arbitraryText,
    bool atEnd
);
arbitraryText
content to include.
atEnd
flag to put inclusion at end of stream (defaults to false).

See also ...

SharpPlot Members | SharpPlot.IncludeSource Method


SharpPlot 3.71 User Manual: IncludeSource Method (String,Boolean)

SharpPlot.IncludeSource Method (String,Boolean)

Add arbitrary (SVG/EPS) content to beginning or end of output stream.

public void IncludeSource(
    string arbitraryText,
    bool atEnd
);
arbitraryText
content to include.
atEnd
flag to put inclusion at end of stream (defaults to false).

See also ...

SharpPlot Members | SharpPlot.IncludeSource Method


SharpPlot 3.71 User Manual: MapCoords - Convert chart co-ordinates to points

SharpPlot.MapCoords – Convert chart co-ordinates to points

Maps values from chart axes to points, relative to current origin. Returns two matching arrays of x and y values. This is useful for positioning text output and drawing arbitrary text, for example to annotate data points.

Example

yvec = sp.GetYTickPositions();

sp.NoteStyle = NoteStyles.Absolute;
nyv = sp.MapCoords(0,yvec)[1];

foreach (double ny in nyv)
  sp.DrawNote("Hello",0,ny);

Overloads

  • public double[][] MapCoords(double xval,double yval);
  • public double[][] MapCoords(double xval,double[] yv);
  • public double[][] MapCoords(double[] xv,double yval);
  • public double[][] MapCoords(double[] xv,double[] yv);

Description

When positioning text, it may be useful to convert from the co-ordinate system of the chart (defined by the (x,y) axes) to points. This allows you to use Absolute Positioning of Notes or Keys which is much more useful when making simple typographic adjustments, such as centre-lining text on the x-height of the font.

This simple utility takes note of the current state of the chart, and converts matching arrays of x and y values to an array of arrays of points, with appropriate origin for use with the AbsolutePosition style.

See also ...

SharpPlot Members | SharpPlot.GetXTickPositions Method | SharpPlot.GetYTickPositions Method


SharpPlot 3.71 User Manual: MapCoords Method (Double[],Double[])

SharpPlot.MapCoords Method (Double[],Double[])

Maps a matched pair of (x,y) co-ordinate arrays to points.

public double[][] MapCoords(
    double[] xv,
    double[] yv
);

See also ...

SharpPlot Members | SharpPlot.MapCoords – Convert chart co-ordinates to points


SharpPlot 3.71 User Manual: MapCoords Method (Double,Double[])

SharpPlot.MapCoords Method (Double,Double[])

Convert array of y-values.

public double[][] MapCoords(
    double xval,
    double[] yv
);

See also ...

SharpPlot Members | SharpPlot.MapCoords – Convert chart co-ordinates to points


SharpPlot 3.71 User Manual: MapCoords Method (Double[],Double)

SharpPlot.MapCoords Method (Double[],Double)

Convert array of x-values.

public double[][] MapCoords(
    double[] xv,
    double yval
);

See also ...

SharpPlot Members | SharpPlot.MapCoords – Convert chart co-ordinates to points


SharpPlot 3.71 User Manual: MapCoords Method (Double,Double)

SharpPlot.MapCoords Method (Double,Double)

Convert singleton (x,y) pair.

public double[][] MapCoords(
    double xval,
    double yval
);

See also ...

SharpPlot Members | SharpPlot.MapCoords – Convert chart co-ordinates to points


SharpPlot 3.71 User Manual: NewCell Method

SharpPlot.NewCell Method

Move to the next cell in the current trellis.

This will reset cycles unless ResetOption is set to ResetOptions.CyclesPersist.

public void NewCell();

Example

sp.NewCell();

See also ...

SharpPlot Members | SharpPlot.ResetOption Property | SharpPlot.TrellisStyle Property


SharpPlot 3.71 User Manual: NewFrame Method

SharpPlot.NewFrame Method

Clear the area for a new chart with an optional new frame size and position. Properties are reset according to the current ResetOption.

Example

sp.NewFrame(4,220,280,210);

Overloads

  • public void NewFrame();
  • public void NewFrame(double width,double height);
  • public void NewFrame(double left,double top,double width,double height);

The default is to use the entire page for the chart, overlaying any previous chart. Otherwise it would be normal to set both position and size, to add a second chart anywhere in a defined region. This call can be used repeatedly to create an arbitrarily complex page with multiple graphics. For a simple tiled layout, it may be easier to have the trellis computed for you, and for an iteration through the same chart settings with repeated data, DrawMultiple will also handle the calculation of position and size for a set of similar frames.

See also ...

SharpPlot Members | SharpPlot.ResetOption Property


SharpPlot 3.71 User Manual: NewFrame Method

SharpPlot.NewFrame Method

Use all the available paper for the chart.

public void NewFrame();

See also ...

SharpPlot Members | SharpPlot.NewFrame Method


SharpPlot 3.71 User Manual: NewFrame Method (Double,Double)

SharpPlot.NewFrame Method (Double,Double)

Base the frame in the top corner.

public void NewFrame(
    double width,
    double height
);

See also ...

SharpPlot Members | SharpPlot.NewFrame Method


SharpPlot 3.71 User Manual: NewFrame Method (Double,Double,Double,Double)

SharpPlot.NewFrame Method (Double,Double,Double,Double)

Clear the area for a new chart with new frame size and position.

public void NewFrame(
    double left,
    double top,
    double width,
    double height
);

See also ...

SharpPlot Members | SharpPlot.NewFrame Method


SharpPlot 3.71 User Manual: NewPage Method

SharpPlot.NewPage Method

Page throw (useful for PDF only at present). By default this resets all properties back to their initial values according to the current ResetOption, but you can pass false here in which case options are not reset .

Overloads

  • public void NewPage();
  • public void NewPage(bool reset);

Example

sp.NewPage();

By setting suitable bookmarks, you can easily create an indexed chart portfolio as a PDF with an indented outline tree. This can be a good way to distribute a large number of related charts in a single document.

See also ...

SharpPlot Members | SharpPlot.ResetOption Property | SharpPlot.AddBookmark Method


SharpPlot 3.71 User Manual: NewPage Method

SharpPlot.NewPage Method

Page-throw resetting all properties.

public void NewPage();

See also ...

SharpPlot Members | SharpPlot.NewPage Method


SharpPlot 3.71 User Manual: NewPage Method (Boolean)

SharpPlot.NewPage Method (Boolean)

Page throw with option to skip full reset.

public void NewPage(
    bool reset
);

See also ...

SharpPlot Members | SharpPlot.NewPage Method


SharpPlot 3.71 User Manual: NewYAxis Method

SharpPlot.NewYAxis Method

Partial reset to allow independent secondary Y-axis.

public void NewYAxis();

This call resets all the properties associated with the Y-axis, allowing any number of independently ranged vertical axes. The default alignment is ‘right’ but you may change the axis style, or use the XIntercept property, to place the new axis anywhere you like. This allows you to have as many Y-axes as you like, but more than 2 is unlikely to work well in practice.

Example

sp.NewYAxis();

This method is typically used for charts which compare two series with very different ranges, for example currencies such as the Dollar and the Yen.

See also ...

SharpPlot Members | SharpPlot.XIntercept Property


SharpPlot 3.71 User Manual: NextNote Method (Double)

SharpPlot.NextNote Method (Double)

Find the correct baseline for a follow-on note when the previous note may have been wrapped. The result is suitable for passing to DrawNote as the second argument (the y-position).

public double NextNote(
    double headspace
);

Example

  sp.DrawNote("Hello from a wrapped note to check vertical spacing",2,20,0,1);
  next = sp.NextNote(12);  // 12pt headspace
  sp.DrawNote("Hello from another note",2,next);

The argument may be zero (to have the normal line-spacing applied) or may give additional inter-paragraph space in points. The return value will be in chart co-ordinates unless the note style has been set to ‘Absolute’ in which case it will be in points.

See also ...

SharpPlot.DrawNote Method


SharpPlot 3.71 User Manual: ReadComment Method

SharpPlot.ReadComment Method

Recover a text comment, saved in any of the textual output formats. Only comments with associated keys can be recovered using this utility. This method may be called with a filename or the string result from any of the RenderXxx methods.

Example

sp.AddComment("This is some text with a key","NOTE1");
sp.AddComment("Now is the time for ALL good men to come to the aid of the party!","NOTE2",true);

// Recover both notes from EPS file
string note1 = SharpPlot.ReadComment("sample.eps","NOTE1");
string note2 = SharpPlot.ReadComment("sample.eps","NOTE2",true);

Overloads

  • public static string ReadComment(string filename,string key);
  • public static string ReadComment(string filename,string key,bool decode);

If the text was compressed when added to the chart with AddComment, you must pass the decode flag here to reverse the compression. Comments are protected against ‘bad’ XML characters in SVG and VML output whether or not they are compressed and this is reversed here before extraction.

See also ...

SharpPlot.AddComment Method


SharpPlot 3.71 User Manual: ReadComment Method (String,String)

SharpPlot.ReadComment Method (String,String)

Read uncompressed note by key.

public static string ReadComment(
    string filename,
    string key
);
filename
Name of file or string containing rendered content.
key
Short text used to identify original comment.
return value
Recovered text.

See also ...

SharpPlot Members | SharpPlot.ReadComment Method


SharpPlot 3.71 User Manual: ReadComment Method (String,String,Boolean)

SharpPlot.ReadComment Method (String,String,Boolean)

Recover comment given filename (or content as string), key and compression flag.

public static string ReadComment(
    string filename,
    string key,
    bool decode
);
filename
Name of file or string containing rendered content.
key
Short text used to identify original comment.
decode
Flag to deflate comment text.
return value
Recovered text.

See also ...

SharpPlot Members | SharpPlot.ReadComment Method


SharpPlot 3.71 User Manual: ReadPdfStream Method

SharpPlot.ReadPdfStream Method

Recover a page of content from a compressed PDF. This is intended for debugging use, where there may have been a problem with Acrobat Reader failing to interpret the document. It is designed to read documents created by SharpPlot and is unlikely to work on other PDFs.

Example

// Recover a compressed page from a PDF for inspection
 string page = SharpPlot.ReadPdfStream(@"c:\temp\xx.pdf",1,true);

Overloads

  • public static string ReadPdfStream(string filename,int pageno);
  • public static string ReadPdfStream(string filename,int pageno,bool decode);

If the PDF was compressed you must pass the decode flag here to reverse the compression.


SharpPlot 3.71 User Manual: ReadPdfStream Method (String,Int32,Boolean)

SharpPlot.ReadPdfStream Method (String,Int32,Boolean)

Recover page given filename, page-number and compression flag.

public static string ReadPdfStream(
    string filename,
    int pageno,
    bool decode
);

See also ...

SharpPlot Members | SharpPlot.ReadPdfStream Method


SharpPlot 3.71 User Manual: ReadPdfStream Method (String,Int32)

SharpPlot.ReadPdfStream Method (String,Int32)

Read uncompressed page.

public static string ReadPdfStream(
    string filename,
    int pageno
);

See also ...

SharpPlot Members | SharpPlot.ReadPdfStream Method


SharpPlot 3.71 User Manual: RedrawAxes Method

SharpPlot.RedrawAxes Method

Overdraws the existing axes where data has obscured them. If this is called before any cjharts have been drawn, it flushes out all the fixed elements, such as headings, axes and gridlines.

public void RedrawAxes();

Example

sp.RedrawAxes();
  • public void RedrawAxes();
  • public void RedrawAxes(bool isFramed);

Where the chart axes have been draw with the ‘Framed’ style you should pass true here to have the complete frame redrawn. The default is just to over-draw the axes as specified in X and Y Axis styles. Similarly for exploded axes.

  • public void RedrawAxes();
  • public void RedrawAxes(bool isFramed);
  • public void RedrawAxes(bool isFramed,bool isExploded);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: RedrawAxes Method (Boolean,Boolean)

SharpPlot.RedrawAxes Method (Boolean,Boolean)

Overdraws the existing axes where data has obscured them, framing/exploding the chart if required.

public void RedrawAxes(
    bool isFramed,
    bool isExploded
);
isFramed
[todo]
isExploded
[todo]

Description

Used very rarely to tidy up axes which have been partially obscured by data May be called before any chart to have the axes and headings flushed out.

See also ...

SharpPlot Members | SharpPlot.RedrawAxes Method


SharpPlot 3.71 User Manual: RedrawAxes Method (Boolean)

SharpPlot.RedrawAxes Method (Boolean)

Redraw with framed and unexploded axes.

public void RedrawAxes(
    bool isFramed
);
isFramed
[todo]

See also ...

SharpPlot Members | SharpPlot.RedrawAxes Method


SharpPlot 3.71 User Manual: RedrawAxes Method

SharpPlot.RedrawAxes Method

Redraw unframed and unexploded axes.

public void RedrawAxes();

See also ...

SharpPlot Members | SharpPlot.RedrawAxes Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method

SharpPlot.RenderAnimatedSvg Method

Return chart rendered as animated SVG, with one frame per page.

If the delay is 0, then the user can flick through pages with keyboard arrows or mouse wheel.

Overloads

  • public string RenderAnimatedSvg();
  • public string RenderAnimatedSvg(double delay);
  • public string RenderAnimatedSvg(double delay,SvgMode mode);
  • public string RenderAnimatedSvg(double delay,SvgMode mode,double dpi);
  • public string RenderAnimatedSvg(double delay,SvgMode mode,double dpi,string header);

Result

chart as animated SVG.

Example

   svg = sp.RenderAnimatedSvg(1); // Render chart as animated SVG, 1 second per page;

See also ...

SharpPlot Members | SharpPlot.RenderSvg Method | SharpPlot.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method

SharpPlot.RenderAnimatedSvg Method

Return chart as animated SVG at one page per second, with fixed size at 96 dpi.

public string RenderAnimatedSvg();

Result

chart as animated SVG.

See also ...

SharpPlot Members | SharpPlot.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double)

SharpPlot.RenderAnimatedSvg Method (Double)

Return chart as animated SVG with fixed size SVG at 96 dpi.

public string RenderAnimatedSvg(
    double delay
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
return value
chart as animated SVG.

See also ...

SharpPlot Members | SharpPlot.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode)

SharpPlot.RenderAnimatedSvg Method (Double,SvgMode)

Return chart as animated SVG with given aspect setting.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
return value
chart as animated SVG.

See also ...

SharpPlot Members | SharpPlot.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode,Double)

SharpPlot.RenderAnimatedSvg Method (Double,SvgMode,Double)

Return chart as animated SVG with given aspect setting and resolution.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode,
    double dpi
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
return value
chart as animated SVG.

See also ...

SharpPlot Members | SharpPlot.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode,Double,String)

SharpPlot.RenderAnimatedSvg Method (Double,SvgMode,Double,String)

Return chart rendered as animated SVG, with one frame per page.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode,
    double dpi,
    string header
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
header
Arbitrary SVG code to include before chart.
return value
chart as animated SVG.

See also ...

SharpPlot Members | SharpPlot.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderBitmap Method

SharpPlot.RenderBitmap Method

Return completed chart rendered through raster engine.

Example

bitmap cht = sp.RenderBitmap(72);
cht.Save("cht.png",System.Drawing.Imaging.ImageFormat.Png);

Return Value

The result of this call is a Bitmap object, rendered by default at 96dpi. Ths is may then be saved to disk in any of the common image formats, typically PNG or JPEG to benefit from image compression. GIF is not recommended for images with gradient fills as it is limited to 256 colours and is likely to show some banding.

For images to be used in printed material, you probably should use at least 300dpi to get acceptable quality.

The text will be anti-aliased by default, but you may over-ride the text-rendering algorithm by passing in the standard .Net rendering hint as a final option.

If your chart has made use of hyperlinks or JavaScript calls, you will need to create an accompanying image map, and include it in the completed webpage.

Overloads

  • public Bitmap RenderBitmap();
  • public Bitmap RenderBitmap(double dpi);
  • public Bitmap RenderBitmap(double dpi,TextRenderingHint textmode);

Example

This script creates a simple chart and renders it for display in a web page:

<%@ page language="VB" AutoEventWireup="True"%>
<%@ Import Namespace = "System.Drawing" %>
<%@ Import Namespace = "System.Drawing.Imaging" %>
<%@ Import Namespace = "Causeway" %>

<Script Runat="Server">
  Sub Page_Load(sender as Object, e as EventArgs)
    Dim sp As Causeway.SharpPlot =  New Causeway.SharpPlot()
    sp.DrawPieChart(New Integer(){34,23})

    Dim bitmap As Bitmap
    bitmap = sp.RenderBitmap()
    Dim stream As System.IO.MemoryStream
    stream = New System.IO.MemoryStream()
    bitmap.Save(stream, ImageFormat.Png)

    Response.Clear()
    Response.ClearHeaders()
    Response.ContentType = "image/png"
    Response.BinaryWrite(stream.ToArray())
    Response.End()

  End Sub
</Script>

Note the lines:

    Response.ContentType = "image/png"
    Response.BinaryWrite(stream.ToArray())

which set the correct type for the returned image and then return the rendered chart as a binary stream. To write the completed image to file, you could use:

   // Create a bitmap and save as PNG ...
    Bitmap chart = sp.RenderBitmap(72);
    chart.Save("Simple.png",System.Drawing.Imaging.ImageFormat.Png);
    Console.WriteLine("Image written to Simple.png at 72dpi");

See also ...

SharpPlot Members | SharpPlot.RenderImageMap Method | SharpPlot.SaveImage Method


SharpPlot 3.71 User Manual: RenderBitmap Method (Double,TextRenderingHint)

SharpPlot.RenderBitmap Method (Double,TextRenderingHint)

Return complete chart as Bitmap rendered at given resolution and text rendering mode.

public Bitmap RenderBitmap(
    double dpi,
    TextRenderingHint textmode
);
dpi
Resolution to use, in dots per inch (defaults to 96).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
return value
Completed chart as a Bitmap object.

See also ...

SharpPlot Members | SharpPlot.RenderBitmap Method


SharpPlot 3.71 User Manual: RenderBitmap Method

SharpPlot.RenderBitmap Method

Return completed chart as Bitmap at 96 dpi.

public Bitmap RenderBitmap();

Result

Completed chart as a Bitmap object.

See also ...

SharpPlot Members | SharpPlot.RenderBitmap Method


SharpPlot 3.71 User Manual: RenderBitmap Method (Double)

SharpPlot.RenderBitmap Method (Double)

Return completed chart as Bitmap at given resolution.

public Bitmap RenderBitmap(
    double dpi
);
dpi
Resolution to use, in dots per inch (defaults to 96).
return value
Completed chart as a Bitmap object.

See also ...

SharpPlot Members | SharpPlot.RenderBitmap Method


SharpPlot 3.71 User Manual: RenderChartLog Method

SharpPlot.RenderChartLog Method

Return completed chart as a readable log with optional prescan.

The optional prescan flag will parse any HTML tagged text into simple settings of font and associated text fragments. It will also ensure 7-bit ASCII output by HTML-encoding any hi-bit or Unicode characters.

The standard log only records drawing instructions – this makes it ideal for text comparison tools to check for changes to graphics output. The optional detail flag will add logging of internal settings (used for animations and JavaScript handlers) if you need to debug these.

Overloads

  • public string RenderChartLog();
  • public string RenderChartLog(bool prescan);
  • public string RenderChartLog(bool prescan,bool detail);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: RenderChartLog Method

SharpPlot.RenderChartLog Method

Return unprocessed, undetailed log.

public string RenderChartLog();

Result

Readable version of internal chart macros.

See also ...

SharpPlot Members | SharpPlot.RenderChartLog Method


SharpPlot 3.71 User Manual: RenderChartLog Method (Boolean)

SharpPlot.RenderChartLog Method (Boolean)

Return undetailed log, with optional pre-scan flag.

public string RenderChartLog(
    bool prescan
);
prescan
Flag to allow the prescan code to run on the intermediate page format.
return value
Readable version of internal chart macros.

See also ...

SharpPlot Members | SharpPlot.RenderChartLog Method


SharpPlot 3.71 User Manual: RenderChartLog Method (Boolean,Boolean)

SharpPlot.RenderChartLog Method (Boolean,Boolean)

Return log with optional pre-scan and detail flags.

public string RenderChartLog(
    bool prescan,
    bool detail
);
prescan
Flag to allow the prescan code to run on the intermediate page format.
detail
Flag to allow ids and other detail to be shown in addition to basic logging.
return value
Readable version of internal chart macros.

See also ...

SharpPlot Members | SharpPlot.RenderChartLog Method


SharpPlot 3.71 User Manual: RenderDocument Method

SharpPlot.RenderDocument Method

Return completed chart as a Document instance for page-level manipulation.

Overloads

  • public Document RenderDocument();
  • public Document RenderDocument(int page);
  • public Document RenderDocument(int[] pages);

See also ...

Document Class | SharpPlot Members


SharpPlot 3.71 User Manual: RenderDocument Method

SharpPlot.RenderDocument Method

Return chart as a Document instance.

public Document RenderDocument();

Result

Document containing chart.

See also ...

SharpPlot Members | SharpPlot.RenderDocument Method


SharpPlot 3.71 User Manual: RenderDocument Method (Int32)

SharpPlot.RenderDocument Method (Int32)

Return selected chart page as a Document instance.

public Document RenderDocument(
    int page
);
page
Chart page to put into Document.
return value
Document containing chart.

See also ...

SharpPlot Members | SharpPlot.RenderDocument Method


SharpPlot 3.71 User Manual: RenderDocument Method (Int32[])

SharpPlot.RenderDocument Method (Int32[])

Return selected charts pages as a Document instance.

public Document RenderDocument(
    int[] pages
);
pages
Chart pages to put into Document (in that order).
return value
Document containing chart.

See also ...

SharpPlot Members | SharpPlot.RenderDocument Method


SharpPlot 3.71 User Manual: RenderEps Method

SharpPlot.RenderEps Method

Return completed chart rendered through EPS engine.

Example

string mono = sp.RenderEps(1,true); // render first page as monochrome

Return Value

The result of this call is a string representation of an Encapsulated PostScript document. It is a single-page PostScript file that may be written to file as text for inclusion in a compound document which is to be printed on any PostScript device. If the final output is to be monochrome, it is better to have SharpPlot render the chart in black and white at this point, rather than rely on the printer to greyscale it.

Note that this does not save any preview information in the file, so if it is printed on a non-PostScript printer all the images will show only as placeholders, with the chart title and date of creation as notes.

If you require any ‘special’ PostScript to be run on the front of the file, you may include it as the third parameter.

Overloads

  • public string RenderEps();
  • public string RenderEps(bool forceMonochrome);
  • public string RenderEps(bool forceMonochrome,string prologue);

See also ...

SharpPlot Members | SharpPlot.TitleBar Property | SharpPlot.SaveEps Method


SharpPlot 3.71 User Manual: RenderEps Method (Boolean,String)

SharpPlot.RenderEps Method (Boolean,String)

Return completed chart as EPS with monochrome switch and PostScript prologue.

public string RenderEps(
    bool forceMonochrome,
    string prologue
);
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before first page.
return value
Completed chart as Encapsulated PostScript.

See also ...

SharpPlot Members | SharpPlot.RenderEps Method


SharpPlot 3.71 User Manual: RenderEps Method

SharpPlot.RenderEps Method

Return completed chart as full-color EPS.

public string RenderEps();

Result

Completed chart as Encapsulated PostScript.

See also ...

SharpPlot Members | SharpPlot.RenderEps Method


SharpPlot 3.71 User Manual: RenderEps Method (Boolean)

SharpPlot.RenderEps Method (Boolean)

Return completed chart as EPS with monochrome switch.

public string RenderEps(
    bool forceMonochrome
);
forceMonochrome
Disable color support (defaults to false).
return value
Completed chart as Encapsulated PostScript.

See also ...

SharpPlot Members | SharpPlot.RenderEps Method


SharpPlot 3.71 User Manual: RenderImageMap Method

SharpPlot.RenderImageMap Method

Return tags to make an HTML imagemap for completed chart.

Example

string map = sp.RenderImageMap(72);

Return Value

The result of this call is a string containing an HTML client-side imagemap. This is designed to accompany a Bitmap, and is scaled by default to match a 96dpi rendering. This may be written to a webpage to allow hyperlinks and simple JavaScript calls to work with images as well as VML or SVG pages.

Note that the Chart Name is used as the reference for the image, so it would be helpful for readability to use a non-default name here. Note also that the order of the area tags is intentionally reversed, so that the items drawn last get precedence in the map.

Overloads

  • public string RenderImageMap();
  • public string RenderImageMap(double dpi);

Example

A typical imagemap for a 3-sector piechart would look like:

<map id=tutor2b>
 <area shape="poly" coords="216,174, ... ,71" href="http://www.causeway.co.uk" />
 <area shape="poly" coords="216,174, ... ,259" href="http://www.grapl.net" />
 <area shape="poly" coords="216,174, ... ,93" href="http://www.sharpplot.com" />
</map>

Here, polygons are used to approximate the outline of each pie sector. For a scatterplot, circles would be drawn around each point (4 pixel radius) and for barcharts rectangles are used to match the outline of each bar.

See also ...

SharpPlot Members | SharpPlot.RenderBitmap Method | SharpPlot.SetChartName Method


SharpPlot 3.71 User Manual: RenderImageMap Method (Double)

SharpPlot.RenderImageMap Method (Double)

Return HTML imagemap at given resolution.

public string RenderImageMap(
    double dpi
);
dpi
Chart resolution to use, in dots per inch (defaults to 96).
return value
HTML imagemap for chart.

See also ...

SharpPlot Members | SharpPlot.RenderImageMap Method


SharpPlot 3.71 User Manual: RenderImageMap Method

SharpPlot.RenderImageMap Method

Return HTML imagemap at 96dpi.

public string RenderImageMap();

Result

HTML imagemap for chart.

See also ...

SharpPlot Members | SharpPlot.RenderImageMap Method


SharpPlot 3.71 User Manual: RenderJsonChartMap

SharpPlot.RenderJsonChartMap

Return a JSON-formatted array to facilitate active graphics applications.

public string RenderJsonChartMap();

Example

string map = sp.RenderJsonChartMap();

Description

All data items processed by the chart construction create hotspots which may react to mouse events. There are 3 types of hotspot recorded, depending on the chart type:

  1. Rectangles – used by barcharts and also any text regions such as headings and axis labels
  2. Circles – used by ScatterPlots to create a fixed-radius area around all markers
  3. Polygons – used by Piecharts to outline each wedge (in 20deg segments)

If AddAttibutes has been used to put handlers on text items, hotspots will be created for these. Otherwise there will be on hotspot for each data item, keyed by chart name and series name. A typical array would contain several of these, for example a barchart with 2 data series (each with 3 bars) would generate a section of the array like this:

["Apparel","Hats","rect",[84,249,123,362],[["title","Hat 3"]]],
["Apparel","Hats","rect",[249,174,288,362],[["title","Hat 5"]]],
["Apparel","Hats","rect",[413,99,452,362],[["title","Hat 7"]]],
["Apparel","Coats","rect",[147,61,186,362],[["title","Coat 8"]]],
["Apparel","Coats","rect",[311,174,350,362],[["title","Coat 5"]]],
["Apparel","Coats","rect",[476,212,515,362],[["title","Coat 4"]]],

Here we have named both the chart “Apparel”” and each series to make the example clearer. By default, SharpPlot will generate names “chart1” and ‘Series1,Series2” for you.

The format of each hotspot is standard, and consists of:

  1. The chart name as a string
  2. The series name as a string
  3. The hotspot type as a string (“rect”,”circ”, or “poly” as used in ImageMaps)
  4. The hotspot location as an array. Rectangles are x,y,x,y, circles are x,y,r, polys are x,y, ... x,y pairs.
  5. Additional attributes as an array of Property,Value pairs of strings.

If we add some attributes to the chart legend, the map will contain lines like this:

["Guesses","Key","rect",[59,392,157,407],[["KeyFactor","100"],["KeyStyle","Low"]]],
["Guesses","Key","rect",[161,392,261,407],[["KeyFactor","200"],["KeyStyle","Medium"]]],
["Guesses","Key","rect",[266,392,374,407],[["KeyFactor","300"],["KeyStyle","High"]]],

Here the second element is the value from the HotspotType enumeration, rather than a series identifier.

The entire array will be enclosed with an opening ‘[’ and a closing ‘];’ to allow the programmer to recover the content with a simple eval statement and then to add appropriate behaviours when the mouse is within any of the defined regions.

Overloads

  • public string RenderJsonChartMap(bool withdata);
  • public string RenderJsonChartMap(bool withdata,double dpi);

See also ...

Active charts in GUI Applications | SharpPlot Members | HotspotType Enumeration


SharpPlot 3.71 User Manual: RenderJsonChartMap Method (Boolean,Double)

SharpPlot.RenderJsonChartMap Method (Boolean,Double)

Return JSON for chart at specified resolution, optionally including data.

public string RenderJsonChartMap(
    bool withdata,
    double dpi
);
withdata
Include chart data into JSON – data arrays may make output very large for high-density plots.
dpi
Coordinate resolution to use, in dots per inch (defaults to 96).
return value
Chart map as JSON.

See also ...

SharpPlot Members | SharpPlot.RenderJsonChartMap


SharpPlot 3.71 User Manual: RenderJsonChartMap Method (Boolean)

SharpPlot.RenderJsonChartMap Method (Boolean)

Return JSON for chart at 96 dpi, optionally including data.

public string RenderJsonChartMap(
    bool withdata
);
withdata
Include chart data into JSON – data arrays may make output very large for high-density plots.
return value
Chart map as JSON.

See also ...

SharpPlot Members | SharpPlot.RenderJsonChartMap


SharpPlot 3.71 User Manual: RenderMetafile Method

SharpPlot.RenderMetafile Method

Return completed chart rendered as a Metafile object.

You may need to experiment with the optimum EmfType parameter. Modern software should read the new GDI+ metafile tags correctly (EmfPlusOnly), but older applications may require the old tags as a fallback (EmfOnly). The default is to use both forms (EmfPlusDual), but this may make the file larger than you need.

Example

metafile cht = sp.RenderMetafile();

Return Value

The result of this call is a Metafile object which may be used as required to save the chart to file, or display it on an application control such as a PictureBox. There is no result if the user passes a Stream – the EMF content is simply appended to the stream.

Overloads

  • public void RenderMetafile(Stream stream);
  • public void RenderMetafile(Stream stream,EmfType emftype);
  • public void RenderMetafile(Stream stream,EmfType emftype,TextRenderingHint textmode);
  • public void RenderMetafile(Stream stream,EmfType emftype,TextRenderingHint textmode,double dpi);
  • public Metafile RenderMetafile();
  • public Metafile RenderMetafile(EmfType emftype);
  • public Metafile RenderMetafile(EmfType emftype,TextRenderingHint textmode);
  • public Metafile RenderMetafile(EmfType emftype,TextRenderingHint textmode,double dpi);

See also ...

SharpPlot Members | SharpPlot.SaveImage Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream)

SharpPlot.RenderMetafile Method (Stream)

Write completed chart as Metafile to given Stream.

public void RenderMetafile(
    Stream stream
);
stream
Stream to output Metafile to.
return value
Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream,EmfType)

SharpPlot.RenderMetafile Method (Stream,EmfType)

Write completed chart as Metafile with given format to given Stream.

public void RenderMetafile(
    Stream stream,
    EmfType emftype
);
stream
Stream to output Metafile to.
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
return value
Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream,EmfType,TextRenderingHint)

SharpPlot.RenderMetafile Method (Stream,EmfType,TextRenderingHint)

Write completed chart as Metafile with given format and text rendering to given Stream.

public void RenderMetafile(
    Stream stream,
    EmfType emftype,
    TextRenderingHint textmode
);
stream
Stream to output Metafile to.
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
return value
Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream,EmfType,TextRenderingHint,Double)

SharpPlot.RenderMetafile Method (Stream,EmfType,TextRenderingHint,Double)

Write completed chart as Metafile with given format and text rendering to given Stream.

public void RenderMetafile(
    Stream stream,
    EmfType emftype,
    TextRenderingHint textmode,
    double dpi
);
stream
Stream to output Metafile to.
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
dpi
Resolution in dots per inch (defaults to 96).
return value
Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method

SharpPlot.RenderMetafile Method

Return completed chart as Metafile.

public Metafile RenderMetafile();

Result

Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (EmfType)

SharpPlot.RenderMetafile Method (EmfType)

Return completed chart as Metafile with given format.

public Metafile RenderMetafile(
    EmfType emftype
);
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
return value
Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (EmfType,TextRenderingHint)

SharpPlot.RenderMetafile Method (EmfType,TextRenderingHint)

Return completed chart as Metafile with given format and text rendering.

public Metafile RenderMetafile(
    EmfType emftype,
    TextRenderingHint textmode
);
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
return value
Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (EmfType,TextRenderingHint,Double)

SharpPlot.RenderMetafile Method (EmfType,TextRenderingHint,Double)

Return or stream completed chart as one of the Extended Metafile formats.

public Metafile RenderMetafile(
    EmfType emftype,
    TextRenderingHint textmode,
    double dpi
);
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
dpi
Resolution in dots per inch (defaults to 96).
return value
Returned Metafile object.

See also ...

SharpPlot Members | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderPageMap Method

SharpPlot.RenderPageMap Method

Return an instance of the PageMap class to allow active graphics applications with completed chart.

public PageMap RenderPageMap();

Result

PageMap instance for completed chart.

See also ...

Active charts in GUI Applications | SharpPlot Members | PageMap.PageMap Members


SharpPlot 3.71 User Manual: RenderPdf Method

SharpPlot.RenderPdf Method

Return completed chart rendered through through PDF engine.

The default is to have the document open in the user’s default mode, to embed all non-standard TrueType fonts and to compress the PDF content. You can set the PdfMode to open the outlines window, or to start with the document in full-screen view (useful for presentations).

By default, all fonts except the ‘base-14’ set will be embedded in the document automatically. If you are sure that all your potential viewers will have the fonts you have used, then set the noembed list to the names of the safe fonts, for example “Verdana,Perpetua” would be typical. This will make the document very much smaller, and the Acrobat Reader will usually be quite successful in substituting missing fonts if you are unlucky.

Compression is standard in PDF production (as well as reducing the document size it makes the material much harder to tamper with) but you may turn it off, either to assist in debugging a rendering problem or to preserve comments added with AddComment . Typically this would be to have a post-processing job catalogue the documents using tags saved in the comments.

Example

string mypdf = sp.RenderPdf();

Return Value

The result of this call is a string representation of an Adobe PDF. This may be written to file as text or returned via HTTP as type “application/pdf” to have it displayed by a web-browser.

   // Create a PDF and write the chart to it ...
    StreamWriter sw = new StreamWriter("Chart1.pdf",false,System.Text.Encoding.ASCII);
    string chart = sp.RenderPdf(PdfMode.ShowOutlines);
    sw.Write(chart);
    sw.Close();

Overloads

  • public string RenderPdf();
  • public string RenderPdf(PdfMode mode);
  • public string RenderPdf(PdfMode mode,bool deflate);
  • public string RenderPdf(PdfMode mode,bool deflate,string noembed);

Embedding the PDF into a webpage

If you want to write the PDF content directly into a webpage, you should give it the correct content type “application/pdf”, and link to it with an appropriate <embed> tag such as:

<embed src="makepdf.aspx" height=300 width=640 type="application/pdf" >

The PdfMode parameter of RenderPDF should be set to FullScreen here, which causes the Acrobat Reader to occupy the entire frame set up by the <embed> tag with no toolbars or scrollbars. If you render a multipage PDF here, set the flag to ShowOutlines and allow enough extra space for the outline pane and Acrobat Reader toolbars. You will probably need to experiment to get the height and width to look correct.

See also ...

SharpPlot Members | SharpPlot.SavePdf Method | PdfMode Enumeration


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode,Boolean,String)

SharpPlot.RenderPdf Method (PdfMode,Boolean,String)

PDF will be opened in a specified mode, with selected embedded fonts and optional compression.

public string RenderPdf(
    PdfMode mode,
    bool deflate,
    string noembed
);
mode
Controls how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
noembed
Selected fonts to be omitted (comma-separated list of names).
return value
Completed chart as PDF.

See also ...

SharpPlot Members | SharpPlot.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method

SharpPlot.RenderPdf Method

PDF will be opened in user’s default view with all fonts embedded and will be compressed.

public string RenderPdf();

Result

Completed chart as PDF.

See also ...

SharpPlot Members | SharpPlot.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode)

SharpPlot.RenderPdf Method (PdfMode)

PDF will have all non-native fonts embedded and is compressed.

public string RenderPdf(
    PdfMode mode
);
mode
Controls how the PDF is shown on opening.
return value
Completed chart as PDF.

See also ...

SharpPlot Members | SharpPlot.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode,Boolean)

SharpPlot.RenderPdf Method (PdfMode,Boolean)

PDF optionally compressed and will open in chosen mode with all fonts embedded.

public string RenderPdf(
    PdfMode mode,
    bool deflate
);
mode
Controls how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
return value
Completed chart as PDF.

See also ...

SharpPlot Members | SharpPlot.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPS Method

SharpPlot.RenderPS Method

Return chart rendered as raw PostScript.

Example

sp.RenderPS();

Return Value

The result of this call is a string representation of a PostScript document. This may be written to file as text or directly to any PostScript device. If the final output is to be monochrome, it is better to have SharpPlot render the chart in black and white at this point, rather than rely on the printer to greyscale it. The prologue may contain arbitrary PostScript code to include before first page.

Overloads

  • public string RenderPS();
  • public string RenderPS(bool forceMonochrome);
  • public string RenderPS(bool forceMonochrome,bool mediaBox);
  • public string RenderPS(bool forceMonochrome,bool mediaBox,string prologue);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: RenderPS Method (Boolean,Boolean,String)

SharpPlot.RenderPS Method (Boolean,Boolean,String)

Return completed chart as PostScript with monochrome and mediabox flags and extra PS prologue.

public string RenderPS(
    bool forceMonochrome,
    bool mediaBox,
    string prologue
);
forceMonochrome
Disable color support (defaults to false).
mediaBox
Embed the viewbox size as DSC (defaults to true).
prologue
Arbitrary PostScript code to include before first page.
return value
Completed chart as PostScript.

See also ...

SharpPlot Members | SharpPlot.RenderPS Method


SharpPlot 3.71 User Manual: RenderPS Method

SharpPlot.RenderPS Method

Return PostScript in full color.

public string RenderPS();

Result

Completed chart as PostScript.

See also ...

SharpPlot Members | SharpPlot.RenderPS Method


SharpPlot 3.71 User Manual: RenderPS Method (Boolean)

SharpPlot.RenderPS Method (Boolean)

Return PostScript with monochrome flag.

public string RenderPS(
    bool forceMonochrome
);
forceMonochrome
Disable color support (defaults to false).
return value
Completed chart as PostScript.

See also ...

SharpPlot Members | SharpPlot.RenderPS Method


SharpPlot 3.71 User Manual: RenderPS Method (Boolean,Boolean)

SharpPlot.RenderPS Method (Boolean,Boolean)

Return PostScript with monochrome and mediabox flags.

public string RenderPS(
    bool forceMonochrome,
    bool mediaBox
);
forceMonochrome
Disable color support (defaults to false).
mediaBox
Embed the viewbox size as DSC (defaults to true).
return value
Completed chart as PostScript.

See also ...

SharpPlot Members | SharpPlot.RenderPS Method


SharpPlot 3.71 User Manual: RenderSvg Method

SharpPlot.RenderSvg Method

Return completed chart rendered through SVG engine.

Example

string mysvg = sp.RenderSvg(SvgMode.FixedAspect);

Return Value

The result of this call is a string representation of an SVG document. This may be written to file as text for inclusion in a webpage, or returned via HTTP with content type “image/svg+xml”.

Most modern browsers (including Microsoft Internet Explorer 9 – 2011) natively support SVG. So not only they will display SVG files save with SaveSvg, but you can also inline the string returned by RenderSvg directly into you HTML body.

For compatibility with older browsers, you can embed the SVG using the <embed> tag :

<embed src="mychart.svg" height=300 width=640 type="image/svg+xml">

Overloads

  • public string RenderSvg();
  • public string RenderSvg(SvgMode mode);
  • public string RenderSvg(SvgMode mode,double dpi);
  • public string RenderSvg(SvgMode mode,double dpi,string header);

See also ...

SharpPlot Members | SharpPlot.SaveSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double,String)

SharpPlot.RenderSvg Method (SvgMode,Double,String)

Return completed chart as SVG with given aspect setting, resolution and extra header text.

public string RenderSvg(
    SvgMode mode,
    double dpi,
    string header
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
header
Arbitrary SVG code to include before chart.
return value
Completed chart as SVG.

See also ...

SharpPlot Members | SharpPlot.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method

SharpPlot.RenderSvg Method

Return completed chart as fixed size SVG at 96 DPI.

public string RenderSvg();

Result

Completed chart as SVG.

See also ...

SharpPlot Members | SharpPlot.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode)

SharpPlot.RenderSvg Method (SvgMode)

Return completed chart as SVG with given aspect setting at 96 DPI.

public string RenderSvg(
    SvgMode mode
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
return value
Completed chart as SVG.

See also ...

SharpPlot Members | SharpPlot.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double)

SharpPlot.RenderSvg Method (SvgMode,Double)

Return completed chart as SVG with given aspect setting and resolution.

public string RenderSvg(
    SvgMode mode,
    double dpi
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
return value
Completed chart as SVG.

See also ...

SharpPlot Members | SharpPlot.RenderSvg Method


SharpPlot 3.71 User Manual: RenderVml Method

SharpPlot.RenderVml Method

Return completed chart rendered as Vector Markup (VML).

VML is not supported by Microsoft and should not be used, unless for backwards compatibility reasons.

public string RenderVml();

Return Value

The result of this call is a string representation of a partial HTML document. This may be written to file as text, or returned via HTTP as a section in a normal webpage. You may have several VML sections in a single page. They are automatically named with the current chart name if this is set to a non-default value.

If your page has any VML content, it must begin with the standard VML header to define the behavior of the <v:xxx> tags to the browser.

Example

string myvml = sp.RenderVml();

Overloads

  • public string RenderVml();
  • public string RenderVml(bool showPaper);
  • public string RenderVml(bool showPaper,double dpi);
  • public string RenderVml(bool showPaper,double dpi,bool html);

Sizing the rendered graphic

The default is to express all text sizes and positions in pts (72 pts = 1 inch) and to use pts to give the size of the entire block of VML. If you prefer to use pixels, you can pass the required dpi conversion (passing 96 here will have no visible effect on most video adaptors at default resolution). This allows you to fix the size of the graphic more reliably on websites which use pixels for design reasons. It also allows you to make thumbnails of the charts with no extra processing.

Working with VML

Please note that VML is a Microsoft-specific format and is only supported in Internet Explorer 5.5 and above. However it runs ‘native’ in the browser and can be used to put an entire page inline, rather than required callbacks to the server to obtain charts as SVG or raster images.

To make IE understand the VML tags, you MUST include the appropriate behavior tag in the header, so the sample code shown below is typical of what you need to create a functional webpage:

   // Render to HTML file as VML
    StreamWriter sw = new StreamWriter("Simple.htm",false,System.Text.Encoding.ASCII);
    string chart = sp.RenderVml(false);
    sw.Write("<html>");
    sw.Write("<head>");
    sw.Write(sp.VmlHeader);  // Add the header detail
    sw.Write("<title>SharpPlot - Simple chart</title>");
    sw.Write("</head>");
    sw.Write("<body>");
    sw.Write(chart);
    sw.Write("</body>");
    sw.Write("</html>");
    sw.Close();

This will create a complete page with your chart shown correctly within it.

Rendering the finished chart as VML

This is the simplest option for internet use, as the chart can be included directly into the html page under construction:

string mychart = sp.RenderVml()

The call to RenderVml completes the current chart and returns the entire chart definition as a simple XML string bounded by <div> .... </div> tags. For this to be shown by the browser, you must ensure that your page has the correct VML header section to declare the XML namespace:

<xml:namespace prefix="v"/>
<style>
 v\:* {behavior=url(#default#VML)}
</style>

You can include these yourself, or have SharpPlot define them for you:

string vmlHeader = sp.VmlHeader

This must go right at the top of the page, before even the <head> section. You can then construct the remainder of the page as normal, including as many VML sections as you need, as part of the HTML output stream.

See also ...

SharpPlot Members | SharpPlot.VmlHeader Property | SharpPlot.SaveVml Method | SharpPlot.SetChartName Method


SharpPlot 3.71 User Manual: RenderVml Method

SharpPlot.RenderVml Method

Return completed chart as VML with points units.

public string RenderVml();

Result

Completed chart as VML.

See also ...

SharpPlot Members | SharpPlot.RenderVml Method


SharpPlot 3.71 User Manual: RenderVml Method (Boolean)

SharpPlot.RenderVml Method (Boolean)

Return completed chart as VML with points units and optional paper outline.

public string RenderVml(
    bool showPaper
);
showPaper
Flag to creata a drop-shadow outline.
return value
Completed chart as VML.

See also ...

SharpPlot Members | SharpPlot.RenderVml Method


SharpPlot 3.71 User Manual: RenderVml Method (Boolean,Double)

SharpPlot.RenderVml Method (Boolean,Double)

Return completed chart as VML with with specified resolution and optional paper outline.

public string RenderVml(
    bool showPaper,
    double dpi
);
showPaper
Flag to creata a drop-shadow outline.
dpi
VML Resolution in dots per inch (default is 0 for fully scalable).
return value
Completed chart as VML.

See also ...

SharpPlot Members | SharpPlot.RenderVml Method


SharpPlot 3.71 User Manual: RenderVml Method (Boolean,Double,Boolean)

SharpPlot.RenderVml Method (Boolean,Double,Boolean)

Return completed chart as VML with optional paper outline, resolution, and HTML wrapping.

public string RenderVml(
    bool showPaper,
    double dpi,
    bool html
);
showPaper
Flag to creata a drop-shadow outline.
dpi
VML Resolution in dots per inch (default is 0 for fully scalable).
html
Flag to create a full HTML page rather than just a div block to be incorporated in a webpage (defaults to false).
return value
Completed chart as VML.

See also ...

SharpPlot Members | SharpPlot.RenderVml Method


SharpPlot 3.71 User Manual: RenderXaml Method

SharpPlot.RenderXaml Method

This method returns the chart expressed as a XAML Canvas at target resolution (defaults to 96dpi). The chart can be viewed on the web in most common browsers with the SilverLight plugin.

Example

string xaml = sp.RenderXaml(96);    // Save as bare Canvas at 96 dpi

Overloads

  • public string RenderXaml();
  • public string RenderXaml(double dpi);
  • public string RenderXaml(double dpi,string header);
  • public string RenderXaml(double dpi,string header,bool html);

Description

To make use of this format on the internet you can wrap the XAML content in HTML by setting the html flag to true. The page will reference the silverlight.js file supplied with the plugin, and also the silverplot.js file supplied with SharpPlot. This is very convenient for initial testing, but you will probably want to make your own wrapper page for production use. In any case, the web browser will need a SilverLight plugin.

See also ...

SharpPlot Members | SharpPlot.SaveXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method

SharpPlot.RenderXaml Method

Return completed chart as XAML at 96 dpi.

public string RenderXaml();

Result

XAML Canvas containing completed chart.

See also ...

SharpPlot Members | SharpPlot.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double)

SharpPlot.RenderXaml Method (Double)

Return completed chart as XAML with given resolution.

public string RenderXaml(
    double dpi
);
dpi
Resolution to use, in dots per inch (defaults to 96).
return value
XAML Canvas containing completed chart.

See also ...

SharpPlot Members | SharpPlot.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,String)

SharpPlot.RenderXaml Method (Double,String)

Return completed chart as XAML with given resolution and extra header content.

public string RenderXaml(
    double dpi,
    string header
);
dpi
Resolution to use, in dots per inch (defaults to 96).
header
Arbitrary XAML code to include at top of Canvas.
return value
XAML Canvas containing completed chart.

See also ...

SharpPlot Members | SharpPlot.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,String,Boolean)

SharpPlot.RenderXaml Method (Double,String,Boolean)

Return completed chart as XAML with given resolution, extra header content and optional HTML wrapping.

public string RenderXaml(
    double dpi,
    string header,
    bool html
);
dpi
Resolution to use, in dots per inch (defaults to 96).
header
Arbitrary XAML code to include at top of Canvas.
html
Wrap XAML Canvas into an HTML page, using Silverlight.js and Silverplot.js (defaults to false).
return value
XAML Canvas containing completed chart.

See also ...

SharpPlot Members | SharpPlot.RenderXaml Method


SharpPlot 3.71 User Manual: Reset Method

SharpPlot.Reset Method

Clear SharpPlot to new paper size. All settings are reset to default, and all previous charts/pages are suppressed.

This is the same are instanciating a new SharpPlot object. For fine-tuned reset of properties without losing previous charts, see ResetProperties

public void Reset();

Overloads

  • public void Reset();
  • public void Reset(double width,double height);
  • public void Reset(double[] papersize);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: ResetKey Method

SharpPlot.ResetKey Method

Removes any accumulated legend placeholders.

public void ResetKey();

Example

sp.ResetKey();

This may be useful if any graphing methods (such as DrawLineGraph) have been used to place arbitrary guidelines or other artwork before the actual data is drawn. The key placeholders which will be accumulated by the prior drawing commands should be cleared to prevent them appearing in the legend.


SharpPlot 3.71 User Manual: ResetProperties Method

SharpPlot.ResetProperties Method

All properties except trellis definitions are returned to default values.

Some settings can be preserved with ResetOption.

public void ResetProperties();

Example

sp.ResetProperties();

This may be required if you have a trellis of several charts, and want properties to persist across some, but not all of them.

To reset any individual property to its default value, you can generally call its Set method with no arguments, for example:

sp.SetYRange(1000); // Maximum
sp.SetYRange(-20,20); // Span
sp.SetYRange(); // Return to unset state

For a simple scalar property which takes a double, use double.Nan to return it to default.

See also ...

SharpPlot Members | SharpPlot.ResetOption Property | SharpPlot.TrellisStyle Property


SharpPlot 3.71 User Manual: Reset Method

SharpPlot.Reset Method

Retains existing page size.

public void Reset();

See also ...

SharpPlot Members | SharpPlot.Reset Method


SharpPlot 3.71 User Manual: Reset Method (Double,Double)

SharpPlot.Reset Method (Double,Double)

Clear SharpPlot to new paper size.

public void Reset(
    double width,
    double height
);

See also ...

SharpPlot Members | SharpPlot.Reset Method


SharpPlot 3.71 User Manual: Reset Method (Double[])

SharpPlot.Reset Method (Double[])

Clear SharpPlot to new paper size.

public void Reset(
    double[] papersize
);

See also ...

SharpPlot Members | SharpPlot.Reset Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method

SharpPlot.SaveAnimatedGif Method

Save chart rendered through raster engine as an animated GIF file, one frame per page.

Animated GIF cannot be rendered as an in-memory C# object because .Net does not support animated GIF format.

Overloads

  • public void SaveAnimatedGif(string filename);
  • public void SaveAnimatedGif(string filename,double delay);
  • public void SaveAnimatedGif(string filename,double delay,double dpi);
  • public void SaveAnimatedGif(string filename,double delay,double dpi,TextRenderingHint textmode);

Example

   sp.SaveAnimatedGif("chart.gif",1,72);
            // Save chart as animated gif at 72 DPI, 1 second per page;

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String)

SharpPlot.SaveAnimatedGif Method (String)

Save animated GIF at 96 dpi, 1 frame per second.

public void SaveAnimatedGif(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double)

SharpPlot.SaveAnimatedGif Method (String,Double)

Save animated GIF at given resolution, 1 frame per second.

public void SaveAnimatedGif(
    string filename,
    double delay
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double,Double)

SharpPlot.SaveAnimatedGif Method (String,Double,Double)

Save animated GIF at given resolution and animation delay.

public void SaveAnimatedGif(
    string filename,
    double delay,
    double dpi
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double,Double,TextRenderingHint)

SharpPlot.SaveAnimatedGif Method (String,Double,Double,TextRenderingHint)

Save chart rendered through raster engine as an animated GIF file, one frame per page.

public void SaveAnimatedGif(
    string filename,
    double delay,
    double dpi,
    TextRenderingHint textmode
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).
dpi
Resolution to use, in dots per inch (defaults to 96).
textmode
Text rendering mode to use (defaults to TextRenderingHint.AntiAlias).

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method

SharpPlot.SaveAnimatedSvg Method

Save chart to named file as animated SVG, with one frame per page.

If the delay is 0, then the user can flick through pages with keyboard arrows or mouse wheel.

Overloads

  • public void SaveAnimatedSvg(string filename);
  • public void SaveAnimatedSvg(string filename,double delay);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode,double dpi);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode,double dpi,string header);

Example

   sp.SaveAnimatedSvg("chart.svg",1); // Save chart as animated SVG, 1 second per page;

See also ...

SharpPlot Members | SharpPlot.RenderAnimatedSvg Method | SharpPlot.SaveSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String)

SharpPlot.SaveAnimatedSvg Method (String)

Save chart as animated SVG at 1 page per second, with fixed size at 96dpi.

public void SaveAnimatedSvg(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double)

SharpPlot.SaveAnimatedSvg Method (String,Double)

Save chart as animated SVG with fixed size at 96dpi.

public void SaveAnimatedSvg(
    string filename,
    double delay
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode)

SharpPlot.SaveAnimatedSvg Method (String,Double,SvgMode)

Save chart as animated SVG with given aspect ratio setting.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode,Double)

SharpPlot.SaveAnimatedSvg Method (String,Double,SvgMode,Double)

Save chart as animated SVG with given aspect setting and resolution.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode,
    double dpi
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode,Double,String)

SharpPlot.SaveAnimatedSvg Method (String,Double,SvgMode,Double,String)

Save chart to named file as animated SVG, with one frame per page.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode,
    double dpi,
    string header
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).
header
Arbitrary SVG code to include before chart.

See also ...

SharpPlot Members | SharpPlot.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveChartLog Method

SharpPlot.SaveChartLog Method

Saves a debug log to a text file. This may be useful in helping to identify errors when the chart is rendered.

Example

sp.SaveChartLog("debug.log");

Overloads

  • public void SaveChartLog(string filename);
  • public void SaveChartLog(string filename,bool prescan);
  • public void SaveChartLog(string filename,bool prescan,bool detail);

The optional prescan flag will parse any HTML tagged text into simple settings of font and associated text fragments. It will also ensure 7-bit ASCII output by HTML-encoding any hi-bit or Unicode characters.

The standard log only records drawing instructions – this makes it ideal for text comparison tools to check for changes to graphics output. The optional detail flag will add logging of internal settings (used for animations and JavaScript handlers) if you need to debug these.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SaveChartLog Method (String,Boolean,Boolean)

SharpPlot.SaveChartLog Method (String,Boolean,Boolean)

Save log with prescan and detail level.

public void SaveChartLog(
    string filename,
    bool prescan,
    bool detail
);
filename
Name of output text file.
prescan
Flag to allow the prescan code to run on the intermediate page format.
detail
Flag to allow ids and other detail to be shown in addition to basic logging.

See also ...

SharpPlot Members | SharpPlot.SaveChartLog Method


SharpPlot 3.71 User Manual: SaveChartLog Method (String)

SharpPlot.SaveChartLog Method (String)

Save unprocessed, undetailed log.

public void SaveChartLog(
    string filename
);
filename
Name of output text file.

See also ...

SharpPlot Members | SharpPlot.SaveChartLog Method


SharpPlot 3.71 User Manual: SaveChartLog Method (String,Boolean)

SharpPlot.SaveChartLog Method (String,Boolean)

Save undetailed log, specifying pre-scan flag.

public void SaveChartLog(
    string filename,
    bool prescan
);
filename
Name of output text file.
prescan
Flag to allow the prescan code to run on the intermediate page format.

See also ...

SharpPlot Members | SharpPlot.SaveChartLog Method


SharpPlot 3.71 User Manual: SaveEps Method

SharpPlot.SaveEps Method

Saves the current chart to a text file in Encapsulated PostScript format. See RenderEps for more details on this format.

Example

sp.SaveEps("chart.eps",false);

Overloads

  • public void SaveEps(string filename);
  • public void SaveEps(string filename,bool forceMonochrome);
  • public void SaveEps(string filename,bool forceMonochrome,string prologue);

See also ...

SharpPlot Members | SharpPlot.RenderEps Method


SharpPlot 3.71 User Manual: SaveEps Method (String,Boolean,String)

SharpPlot.SaveEps Method (String,Boolean,String)

Save completed chart as EPS with monochrome switch and PostScript prologue.

public void SaveEps(
    string filename,
    bool forceMonochrome,
    string prologue
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before first page.

See also ...

SharpPlot Members | SharpPlot.SaveEps Method


SharpPlot 3.71 User Manual: SaveEps Method (String)

SharpPlot.SaveEps Method (String)

Save completed chart as full-color EPS.

public void SaveEps(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SaveEps Method


SharpPlot 3.71 User Manual: SaveEps Method (String,Boolean)

SharpPlot.SaveEps Method (String,Boolean)

Save completed chart as EPS with monochrome switch.

public void SaveEps(
    string filename,
    bool forceMonochrome
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).

See also ...

SharpPlot Members | SharpPlot.SaveEps Method


SharpPlot 3.71 User Manual: SaveImage Method

SharpPlot.SaveImage Method

The chart is written to file in the required image format (Bitmap if not supplied)

Example

sp.SaveImage("chart.png",System.Drawing.Imaging.ImageFormat.Png,144);
sp.SaveImage("chart.emf",System.Drawing.Imaging.ImageFormat.Emf);

Overloads

  • public void SaveImage(string filename);
  • public void SaveImage(string filename,ImageFormat format);
  • public void SaveImage(string filename,ImageFormat format,double dpi);
  • public void SaveImage(string filename,ImageFormat format,double dpi,TextRenderingHint textmode);
  • public void SaveImage(string filename,ImageFormat format,double dpi,TextRenderingHint textmode,EmfType emftype);

Description

To prepare an image for publication, you may need a DPI setting of 300-1200 depending on the demands of the repro house. For a chart to be shown on the web, a resolution of 96dpi is generally adequate. The text will be anti-aliased by default, but you may over-ride the text-rendering algorithm by passing in the standard .Net rendering hint as a final option.

For charts saved as Metafiles you may need to experiment with the optimum EmfType parameter. Modern software should read the new GDI+ metafile tags correctly (EmfPlusOnly), but older applications may require the old tags as a fallback (EmfOnly). The default is to use both forms (EmfPlusDual), but this may make the file larger than you need.

See also ...

SharpPlot Members | SharpPlot.RenderBitmap Method | SharpPlot.RenderMetafile Method


SharpPlot 3.71 User Manual: SaveImage Method (String)

SharpPlot.SaveImage Method (String)

Save completed chart as Bitmap at 96 dpi.

public void SaveImage(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat)

SharpPlot.SaveImage Method (String,ImageFormat)

Save completed chart at given format at 96 dpi.

public void SaveImage(
    string filename,
    ImageFormat format
);
filename
Name of output file.
format
Image format to use for file.

See also ...

SharpPlot Members | SharpPlot.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat,Double)

SharpPlot.SaveImage Method (String,ImageFormat,Double)

Save completed chart at given format and resolution.

public void SaveImage(
    string filename,
    ImageFormat format,
    double dpi
);
filename
Name of output file.
format
Image format to use for file.
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

SharpPlot Members | SharpPlot.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat,Double,TextRenderingHint)

SharpPlot.SaveImage Method (String,ImageFormat,Double,TextRenderingHint)

Save completed chart at given file format with given resolution and text rendering.

public void SaveImage(
    string filename,
    ImageFormat format,
    double dpi,
    TextRenderingHint textmode
);
filename
Name of output file.
format
Image format to use for file.
dpi
Resolution to use, in dots per inch (defaults to 96).
textmode
Text rendering mode to use (defaults to TextRenderingHint.AntiAlias).

See also ...

SharpPlot Members | SharpPlot.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat,Double,TextRenderingHint,EmfType)

SharpPlot.SaveImage Method (String,ImageFormat,Double,TextRenderingHint,EmfType)

Save completed chart rendered through raster engine as an image file.

public void SaveImage(
    string filename,
    ImageFormat format,
    double dpi,
    TextRenderingHint textmode,
    EmfType emftype
);
filename
Name of output file.
format
Image format to use for file.
dpi
Resolution to use, in dots per inch (defaults to 96).
textmode
Text rendering mode to use (defaults to TextRenderingHint.AntiAlias).
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).

See also ...

SharpPlot Members | SharpPlot.SaveImage Method


SharpPlot 3.71 User Manual: SavePdf Method

SharpPlot.SavePdf Method

This saves your chart in Portable Document Format for distribution to anyone who has the Adobe Acrobat Reader 4.0 or higher. See the RenderPdf method for more information.

Example

sp.SavePdf("chart.pdf",PdfMode.FullScreen);

Overloads

  • public void SavePdf(string filename);
  • public void SavePdf(string filename,PdfMode mode);
  • public void SavePdf(string filename,PdfMode mode,bool deflate);
  • public void SavePdf(string filename,PdfMode mode,bool deflate,string noembed);

See also ...

SharpPlot Members | SharpPlot.RenderPdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode,Boolean,String)

SharpPlot.SavePdf Method (String,PdfMode,Boolean,String)

PDF will be opened in a specified mode, with selected embedded fonts and optional compression.

public void SavePdf(
    string filename,
    PdfMode mode,
    bool deflate,
    string noembed
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
noembed
Allow selected fonts to be omitted (comma-separated list of names).

See also ...

SharpPlot Members | SharpPlot.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String)

SharpPlot.SavePdf Method (String)

PDF will be opened in user’s default view with all fonts embedded and will be compressed.

public void SavePdf(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode)

SharpPlot.SavePdf Method (String,PdfMode)

PDF will have all non-native fonts embedded and is compressed.

public void SavePdf(
    string filename,
    PdfMode mode
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.

See also ...

SharpPlot Members | SharpPlot.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode,Boolean)

SharpPlot.SavePdf Method (String,PdfMode,Boolean)

PDF optionally compressed and will open in chosen mode with all fonts embedded.

public void SavePdf(
    string filename,
    PdfMode mode,
    bool deflate
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).

See also ...

SharpPlot Members | SharpPlot.SavePdf Method


SharpPlot 3.71 User Manual: SavePS Method

SharpPlot.SavePS Method

The chart is saved to a text file in raw PostScript format. See the <SharpPlot-RenderPS>RenderPS for more information.

Example

sp.SavePS("chart.ps",false,true);

Overloads

  • public void SavePS(string filename);
  • public void SavePS(string filename,bool forceMonochrome);
  • public void SavePS(string filename,bool forceMonochrome,bool mediaBox);
  • public void SavePS(string filename,bool forceMonochrome,bool mediaBox,string prologue);

See also ...

SharpPlot Members | SharpPlot.RenderPS Method


SharpPlot 3.71 User Manual: SavePS Method (String,Boolean,Boolean,String)

SharpPlot.SavePS Method (String,Boolean,Boolean,String)

Save completed chart as PostScript with monochrome and mediabox flag and extra PostScript prologue.

public void SavePS(
    string filename,
    bool forceMonochrome,
    bool mediaBox,
    string prologue
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).
mediaBox
Embed the viewbox size as DSC (defaults to true).
prologue
Arbitrary PostScript code to include before first page.

See also ...

SharpPlot Members | SharpPlot.SavePS Method


SharpPlot 3.71 User Manual: SavePS Method (String)

SharpPlot.SavePS Method (String)

Save completed chart as PostScript with full colour.

public void SavePS(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SavePS Method


SharpPlot 3.71 User Manual: SavePS Method (String,Boolean)

SharpPlot.SavePS Method (String,Boolean)

Save completed chart as PostScript with monochrome flag.

public void SavePS(
    string filename,
    bool forceMonochrome
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).

See also ...

SharpPlot Members | SharpPlot.SavePS Method


SharpPlot 3.71 User Manual: SavePS Method (String,Boolean,Boolean)

SharpPlot.SavePS Method (String,Boolean,Boolean)

Save completed chart as PostScript with monochrome and mediabox flags.

public void SavePS(
    string filename,
    bool forceMonochrome,
    bool mediaBox
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).
mediaBox
Embed the viewbox size as DSC (defaults to true).

See also ...

SharpPlot Members | SharpPlot.SavePS Method


SharpPlot 3.71 User Manual: SaveSvg Method

SharpPlot.SaveSvg Method

This saves your chart as a Scalable Vector Graphic. The SvgMode option allows some control over the way the chart is scaled by the Adobe SVG viewer when it is embedded in a webpage. The header text may be used to add extra attributes into the svg tag which starts the XML document.

Example

sp.SaveSvg("chart.svg",SvgMode.FixedAspect);

Overloads

  • public void SaveSvg(string filename);
  • public void SaveSvg(string filename,SvgMode mode);
  • public void SaveSvg(string filename,SvgMode mode,double dpi);
  • public void SaveSvg(string filename,SvgMode mode,double dpi,string header);

See RenderSvg for more information on the support for this format in various browsers.

See also ...

SharpPlot Members | SharpPlot.RenderSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double,String)

SharpPlot.SaveSvg Method (String,SvgMode,Double,String)

Save completed chart as SVG with aspect setting, resolution and extra header text.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi,
    string header
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
header
Arbitrary SVG code to include before chart.

See also ...

SharpPlot Members | SharpPlot.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String)

SharpPlot.SaveSvg Method (String)

Save completed chart as SVG with fixed size at 96 DPI.

public void SaveSvg(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode)

SharpPlot.SaveSvg Method (String,SvgMode)

Save completed chart as SVG with given aspect ratio setting at 96 DPI.

public void SaveSvg(
    string filename,
    SvgMode mode
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).

See also ...

SharpPlot Members | SharpPlot.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double)

SharpPlot.SaveSvg Method (String,SvgMode,Double)

Save completed chart as SVG with given aspect setting and resolution.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).

See also ...

SharpPlot Members | SharpPlot.SaveSvg Method


SharpPlot 3.71 User Manual: SaveVml Method

SharpPlot.SaveVml Method

This saves a complete webpage in HTML format, including your chart rendered as VML.

VML is not supported by Microsoft and should not be used, unless for backwards compatibility reasons.

Example

sp.SaveVml("webpage.htm",false);

Overloads

  • public void SaveVml(string filename);
  • public void SaveVml(string filename,bool showPaper);
  • public void SaveVml(string filename,bool showPaper,double dpi);
  • public void SaveVml(string filename,bool showPaper,double dpi,bool html);

See RenderVml for more information on the suitability of this format.

See also ...

SharpPlot Members | SharpPlot.RenderVml Method


SharpPlot 3.71 User Manual: SaveVml Method (String,Boolean,Double,Boolean)

SharpPlot.SaveVml Method (String,Boolean,Double,Boolean)

Save chart to webpage, rendered as VML with optional paper outline, resolution, and HTML wrapping.

public void SaveVml(
    string filename,
    bool showPaper,
    double dpi,
    bool html
);
filename
Name of output file.
showPaper
Flag to creata a drop-shadow outline.
dpi
VML Resolution in dots per inch (default is 96dpi) (0 will be fully scalable).
html
Flag to create a full HTML page rather than just a div block to be incorporated in a webpage (defaults to true).

See also ...

SharpPlot Members | SharpPlot.SaveVml Method


SharpPlot 3.71 User Manual: SaveVml Method (String)

SharpPlot.SaveVml Method (String)

Save chart as an HTML page without drawing paper, using pts unit.

public void SaveVml(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SaveVml Method


SharpPlot 3.71 User Manual: SaveVml Method (String,Boolean)

SharpPlot.SaveVml Method (String,Boolean)

Save chart as a string of HTML code with optional paper and resolution.

public void SaveVml(
    string filename,
    bool showPaper
);
filename
Name of output file.
showPaper
Flag to creata a drop-shadow outline.

See also ...

SharpPlot Members | SharpPlot.SaveVml Method


SharpPlot 3.71 User Manual: SaveVml Method (String,Boolean,Double)

SharpPlot.SaveVml Method (String,Boolean,Double)

Save chart as HTML with optional paper outline and resolution.

public void SaveVml(
    string filename,
    bool showPaper,
    double dpi
);
filename
Name of output file.
showPaper
Flag to creata a drop-shadow outline.
dpi
VML Resolution in dots per inch (default is 96dpi) (0 will be fully scalable).

See also ...

SharpPlot Members | SharpPlot.SaveVml Method


SharpPlot 3.71 User Manual: SaveXaml Method

SharpPlot.SaveXaml Method

This method saves the chart expressed as a XAML Canvas with given resolution (defaults to 96 dpi).

Example

sp.SaveXaml("foo.xaml");    // Save as bare Canvas for inclusion

Overloads

  • public void SaveXaml(string filename);
  • public void SaveXaml(string filename,double dpi);
  • public void SaveXaml(string filename,double dpi,string header);
  • public void SaveXaml(string filename,double dpi,string header,bool html);

See RenderXaml for more information.

See also ...

SharpPlot Members | SharpPlot.RenderXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String)

SharpPlot.SaveXaml Method (String)

Save completed chart as XAML at 96 dpi.

public void SaveXaml(
    string filename
);
filename
Name of output file.

See also ...

SharpPlot Members | SharpPlot.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double)

SharpPlot.SaveXaml Method (String,Double)

Save completed chart as XAML with given resolution.

public void SaveXaml(
    string filename,
    double dpi
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

SharpPlot Members | SharpPlot.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,String)

SharpPlot.SaveXaml Method (String,Double,String)

Save completed chartas XAML with given resolution and extra header content.

public void SaveXaml(
    string filename,
    double dpi,
    string header
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
header
Arbitrary XAML code to include at top of Canvas.

See also ...

SharpPlot Members | SharpPlot.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,String,Boolean)

SharpPlot.SaveXaml Method (String,Double,String,Boolean)

Save completed chart as XAML with given resolution, extra header content and optional HTML wrapping.

public void SaveXaml(
    string filename,
    double dpi,
    string header,
    bool html
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
header
Arbitrary XAML code to include at top of Canvas.
html
Wrap XAML Canvas into an HTML page, using Silverlight.js and Silverplot.js (defaults to false).

See also ...

SharpPlot Members | SharpPlot.SaveXaml Method


SharpPlot 3.71 User Manual: SetAltitudeColors Method

SharpPlot.SetAltitudeColors Method

Set an array of colors for use by altitude-shaded plots. If a single color is used, it will be smoothly graded to white. An array of colors will be used as step values, and an equal number of interpolated colors created between each pair.

Example

sp.SetAltitudeColors(Color.DarkKhaki); // Good for a landscape map
sp.SetAltitudeColors(new Color[]{Color.Navy,Color.Green,Color.Red,Color.Yellow});
// Typical false-color set

Overloads

  • public void SetAltitudeColors(Color value);
  • public void SetAltitudeColors(string value);
  • public void SetAltitudeColors(Color[] colors);

Altitude shading is supported by the contour plot, and the cloud chart with a fitted response surface. You can also have altitude-shaded markers as a BubbleChart style.


SharpPlot 3.71 User Manual: SetAltitudeColors Method (Color[])

SharpPlot.SetAltitudeColors Method (Color[])

Set an array of colors to be used in Altitude Colors.

public void SetAltitudeColors(
    Color[] colors
);

See also ...

SharpPlot Members | SharpPlot.SetAltitudeColors Method


SharpPlot 3.71 User Manual: SetAltitudeColors Method (Color)

SharpPlot.SetAltitudeColors Method (Color)

Single altitude color grades to white.

public void SetAltitudeColors(
    Color value
);

See also ...

SharpPlot Members | SharpPlot.SetAltitudeColors Method


SharpPlot 3.71 User Manual: SetAltitudeColors Method (String)

SharpPlot.SetAltitudeColors Method (String)

Interpret a list of color names as a color array.

public void SetAltitudeColors(
    string value
);

See also ...

SharpPlot Members | SharpPlot.SetAltitudeColors Method


SharpPlot 3.71 User Manual: SetArrowStyle Method

SharpPlot.SetArrowStyle Method

Set arrow format given any of (Arrow size, sweep angle, fill pattern).

Positive size gives absolute arrow size in points, negative size gives proportion to line width, zero lets SharpPlot pick a good default.

Sweep angle is in degrees :

  • outward-pointing, inward-filled from 0 to 90 degrees
  • inward-pointing, outward-filled from -90 to 0 degrees
  • inward-pointing, inward-filled from 90 to 180 degrees
  • outward-pointing, outward-filled from -180 to -90 degrees

The first two ranges of values makes the tip of the arrow sit on the end of the line segment, while the last two make the foot of the arrow sit on it.

Example

sp.SetArrowStyle(-3); // Arrow size is three times the pen width
sp.SetArrowStyle(6,-30);
// Positive size is fixed in points - Negative angle for inward arrow
sp.SetArrowStyle(12,30,FillStyle.Unfilled); // Size,angle,line-only

Overloads

  • public void SetArrowStyle(double arrowSize);
  • public void SetArrowStyle(double arrowSize,double arrowAngle);
  • public void SetArrowStyle(double arrowSize,double arrowAngle,FillStyle fillStyle);

See also ...

Arrow Lines | SharpPlot Members


SharpPlot 3.71 User Manual: SetArrowStyle Method (Double,Double)

SharpPlot.SetArrowStyle Method (Double,Double)

Arrow size and sweep angle.

public void SetArrowStyle(
    double arrowSize,
    double arrowAngle
);
arrowSize
Length of arrowhead in points (negative is proportional to line width) (default is 10pt).
arrowAngle
Shape of arrowhead in degrees (negative values are inward-pointing).

See also ...

SharpPlot Members | SharpPlot.SetArrowStyle Method


SharpPlot 3.71 User Manual: SetArrowStyle Method (Double)

SharpPlot.SetArrowStyle Method (Double)

Arrowhead length.

public void SetArrowStyle(
    double arrowSize
);
arrowSize
Length of arrowhead in points (negative is proportional to line width) (default is 10pt).

See also ...

SharpPlot Members | SharpPlot.SetArrowStyle Method


SharpPlot 3.71 User Manual: SetArrowStyle Method (Double,Double,FillStyle)

SharpPlot.SetArrowStyle Method (Double,Double,FillStyle)

Set Arrow format from Arrow size, with optional sweep angle and fill pattern.

public void SetArrowStyle(
    double arrowSize,
    double arrowAngle,
    FillStyle fillStyle
);
arrowSize
Length of arrowhead in points (negative is proportional to line width) (default is 10pt).
arrowAngle
Shape of arrowhead in degrees (negative values are inward-pointing).
fillStyle
How arrowhead is shaded.

See also ...

SharpPlot Members | SharpPlot.SetArrowStyle Method


SharpPlot 3.71 User Manual: SetAxesScales Method

SharpPlot.SetAxesScales Method

Set axes scales as ratio : Y/X, Z/X

Example

sp.SetAxesScales(1); // force all normal axes (using the same scale)

Overloads

  • public void SetAxesScales();
  • public void SetAxesScales(double value);
  • public void SetAxesScales(int[] value);
  • public void SetAxesScales(double[] value);

Description

Gives the axes scales ratio as a list of numbers. First number is Y/X scale ratio. Second number is Z/X scale ratio. A single number is applied to all axes. A zero can be used to disable the scale ratio (and revert to independent axes scales).

Note that to observe the axes scales, the axes ranges may have to be extended, so that SetXRange, SetYRange SetZRange only give the minimum range and not the exact range.

See also ...

Balanced Axis | SharpPlot.XIntercept Property | SharpPlot.YIntercept Property


SharpPlot 3.71 User Manual: SetAxesScales Method (Double)

SharpPlot.SetAxesScales Method (Double)

Set Axes scales to a single value.

public void SetAxesScales(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetAxesScales Method


SharpPlot 3.71 User Manual: SetAxesScales Method (Int32[])

SharpPlot.SetAxesScales Method (Int32[])

Set Axes scales to a integer array.

public void SetAxesScales(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetAxesScales Method


SharpPlot 3.71 User Manual: SetAxesScales Method

SharpPlot.SetAxesScales Method

Reset Axes scales to default.

public void SetAxesScales();

See also ...

SharpPlot Members | SharpPlot.SetAxesScales Method


SharpPlot 3.71 User Manual: SetAxesScales Method (Double[])

SharpPlot.SetAxesScales Method (Double[])

Set Axes scales given an array of numbers or a single value.

public void SetAxesScales(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetAxesScales Method


SharpPlot 3.71 User Manual: SetAxisStyle Method

SharpPlot.SetAxisStyle Method

Set Axis format given any of color, lineStyle and lineweight (pts).

Example

sp.SetAxisStyle(Color.White,LineStyle.Solid,1.2);
sp.SetAxisStyle(Color.Navy);
sp.SetAxisStyle(4); // Heavy lines

Overloads

  • public void SetAxisStyle(Color lineColor);
  • public void SetAxisStyle(double lineWidth);
  • public void SetAxisStyle(LineStyle lineStyle);
  • public void SetAxisStyle(Color lineColor,LineStyle lineStyle);
  • public void SetAxisStyle(Color lineColor,LineStyle lineStyle,double lineWidth);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetAxisStyle Method (Color,LineStyle,Double)

SharpPlot.SetAxisStyle Method (Color,LineStyle,Double)

Set Axis format given color, lineStyle and lineweight.

public void SetAxisStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: SetAxisStyle Method (Color,LineStyle)

SharpPlot.SetAxisStyle Method (Color,LineStyle)

Set Axis format color and lineStyle.

public void SetAxisStyle(
    Color lineColor,
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: SetAxisStyle Method (Color)

SharpPlot.SetAxisStyle Method (Color)

Set Axis format color only.

public void SetAxisStyle(
    Color lineColor
);

See also ...

SharpPlot Members | SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: SetAxisStyle Method (LineStyle)

SharpPlot.SetAxisStyle Method (LineStyle)

Set Axis format line-style only.

public void SetAxisStyle(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: SetAxisStyle Method (Double)

SharpPlot.SetAxisStyle Method (Double)

Set Axis format line-weight (pts) only.

public void SetAxisStyle(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetAxisStyle Method


SharpPlot 3.71 User Manual: SetBackground Method

SharpPlot.SetBackground Method

Set Paper color and shading style from any of fill-color, fill-style, edge-width (pts).

Example

sp.SetBackground(Color.Bisque,FillStyle.GradientBottomRight);

Overloads

  • public void SetBackground(Color fillColor);
  • public void SetBackground(double edgeWidth);
  • public void SetBackground(FillStyle fillStyle);
  • public void SetBackground(Color fillColor,FillStyle fillStyle);
  • public void SetBackground(Color fillColor,FillStyle fillStyle,double edgeWidth);

See also ...

SharpPlot Members | FillStyle Struct


SharpPlot 3.71 User Manual: SetBackground Method (Color,FillStyle,Double)

SharpPlot.SetBackground Method (Color,FillStyle,Double)

Set Paper shading (fill-color, fill-style, edge-width).

public void SetBackground(
    Color fillColor,
    FillStyle fillStyle,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetBackground Method


SharpPlot 3.71 User Manual: SetBackground Method (Color,FillStyle)

SharpPlot.SetBackground Method (Color,FillStyle)

Set Paper fill-color and shading.

public void SetBackground(
    Color fillColor,
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetBackground Method


SharpPlot 3.71 User Manual: SetBackground Method (Color)

SharpPlot.SetBackground Method (Color)

Set Paper fill-color only.

public void SetBackground(
    Color fillColor
);

See also ...

SharpPlot Members | SharpPlot.SetBackground Method


SharpPlot 3.71 User Manual: SetBackground Method (FillStyle)

SharpPlot.SetBackground Method (FillStyle)

Set Paper shading only.

public void SetBackground(
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetBackground Method


SharpPlot 3.71 User Manual: SetBackground Method (Double)

SharpPlot.SetBackground Method (Double)

Set Paper edge-width (pts) only.

public void SetBackground(
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetBackground Method


SharpPlot 3.71 User Manual: SetBarWidths Method

SharpPlot.SetBarWidths Method

Set Bar widths for XBarchart and Gantt chart.

Example

sp.SetBarWidths(new int[] {7,7,4,5});

Overloads

  • public void SetBarWidths(double value);
  • public void SetBarWidths(int[] value);
  • public void SetBarWidths(double[] value);

The widths are given in axis units.

See also ...

SharpPlot Members | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: SetBarWidths Method (Double[])

SharpPlot.SetBarWidths Method (Double[])

Set Bar widths given a double vector.

public void SetBarWidths(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetBarWidths Method


SharpPlot 3.71 User Manual: SetBarWidths Method (Double)

SharpPlot.SetBarWidths Method (Double)

Set Bar widths to a single value.

public void SetBarWidths(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetBarWidths Method


SharpPlot 3.71 User Manual: SetBarWidths Method (Int32[])

SharpPlot.SetBarWidths Method (Int32[])

Set Bar widths to a integer array.

public void SetBarWidths(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetBarWidths Method


SharpPlot 3.71 User Manual: SetBaselineStyle Method

SharpPlot.SetBaselineStyle Method

Set Baseline format given any of color, lineStyle and lineweight (pts). this has the same default appearance as the chart axes, but any element of the style may be reset.

Example

sp.SetBaselineStyle(Color.Navy,LineStyle.Solid,1.2);
sp.SetBaselineStyle(LineStyle.Invisible);

Overloads

  • public void SetBaselineStyle(Color lineColor);
  • public void SetBaselineStyle(double lineWidth);
  • public void SetBaselineStyle(LineStyle lineStyle);
  • public void SetBaselineStyle(Color lineColor,LineStyle lineStyle);
  • public void SetBaselineStyle(Color lineColor,LineStyle lineStyle,double lineWidth);

A common use of this function would be to select the Invisible LineStyle to have the line eliminated from the chart.

See also ...

SharpPlot.Baseline Property


SharpPlot 3.71 User Manual: SetBaselineStyle Method (Color,LineStyle,Double)

SharpPlot.SetBaselineStyle Method (Color,LineStyle,Double)

Set Baseline format given color, lineStyle and lineweight.

public void SetBaselineStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);
lineColor
[todo]
lineStyle
Dash pattern (builtin or custom).
lineWidth
Width of line in points.

See also ...

SharpPlot Members | SharpPlot.SetBaselineStyle Method


SharpPlot 3.71 User Manual: SetBaselineStyle Method (Color,LineStyle)

SharpPlot.SetBaselineStyle Method (Color,LineStyle)

Set Baseline format color and lineStyle.

public void SetBaselineStyle(
    Color lineColor,
    LineStyle lineStyle
);
lineColor
[todo]
lineStyle
Dash pattern (builtin or custom).

See also ...

SharpPlot Members | SharpPlot.SetBaselineStyle Method


SharpPlot 3.71 User Manual: SetBaselineStyle Method (Color)

SharpPlot.SetBaselineStyle Method (Color)

Set Baseline format color only.

public void SetBaselineStyle(
    Color lineColor
);
lineColor
[todo]

See also ...

SharpPlot Members | SharpPlot.SetBaselineStyle Method


SharpPlot 3.71 User Manual: SetBaselineStyle Method (LineStyle)

SharpPlot.SetBaselineStyle Method (LineStyle)

Set Baseline format line-style only.

public void SetBaselineStyle(
    LineStyle lineStyle
);
lineStyle
Dash pattern (builtin or custom).

See also ...

SharpPlot Members | SharpPlot.SetBaselineStyle Method


SharpPlot 3.71 User Manual: SetBaselineStyle Method (Double)

SharpPlot.SetBaselineStyle Method (Double)

Set Baseline format line-weight (pts) only.

public void SetBaselineStyle(
    double lineWidth
);
lineWidth
Width of line in points.

See also ...

SharpPlot Members | SharpPlot.SetBaselineStyle Method


SharpPlot 3.71 User Manual: SetCaptionFont Method

SharpPlot.SetCaptionFont Method

Set Caption font given any of fontname, point-size, style, color.

Example

sp.SetCaptionFont("Tahoma,Arial,Sans",12); // Provide fallback fonts
sp.SetCaptionFont("Times",12,Color.Navy);

Overloads

  • public void SetCaptionFont(string fontName);
  • public void SetCaptionFont(double fontSize);
  • public void SetCaptionFont(Color fontColor);
  • public void SetCaptionFont(FontStyle fontStyle);
  • public void SetCaptionFont(string fontName,double fontSize);
  • public void SetCaptionFont(string fontName,Color fontColor);
  • public void SetCaptionFont(double fontSize,Color fontColor);
  • public void SetCaptionFont(string fontName,FontStyle fontStyle);
  • public void SetCaptionFont(FontStyle fontStyle,Color fontColor);
  • public void SetCaptionFont(string fontName,double fontSize,Color fontColor);
  • public void SetCaptionFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetCaptionFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetCaptionFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

This method sets all three captions in a single call.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetCaptionFont Method (String,Double,FontStyle,Color)

SharpPlot.SetCaptionFont Method (String,Double,FontStyle,Color)

Set Caption font from fontname, point-size, style and color.

public void SetCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (Double,Color)

SharpPlot.SetCaptionFont Method (Double,Color)

Set Caption font point-size and color.

public void SetCaptionFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (String,Double,Color)

SharpPlot.SetCaptionFont Method (String,Double,Color)

Set Caption font name, point-size and color.

public void SetCaptionFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (String,FontStyle,Color)

SharpPlot.SetCaptionFont Method (String,FontStyle,Color)

Set Caption font name, style and color.

public void SetCaptionFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (String,Double,FontStyle)

SharpPlot.SetCaptionFont Method (String,Double,FontStyle)

Set Caption font name, point-size and style.

public void SetCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (String)

SharpPlot.SetCaptionFont Method (String)

Set Caption font fontname only.

public void SetCaptionFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (Double)

SharpPlot.SetCaptionFont Method (Double)

Set Caption font point-size only.

public void SetCaptionFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (Color)

SharpPlot.SetCaptionFont Method (Color)

Set Caption font Color only.

public void SetCaptionFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (FontStyle)

SharpPlot.SetCaptionFont Method (FontStyle)

Set Caption font style only.

public void SetCaptionFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (String,Double)

SharpPlot.SetCaptionFont Method (String,Double)

Set Caption font name and point-size.

public void SetCaptionFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (String,FontStyle)

SharpPlot.SetCaptionFont Method (String,FontStyle)

Set Caption font name and style.

public void SetCaptionFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (String,Color)

SharpPlot.SetCaptionFont Method (String,Color)

Set Caption font name and color.

public void SetCaptionFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCaptionFont Method (FontStyle,Color)

SharpPlot.SetCaptionFont Method (FontStyle,Color)

Set Caption font style and color.

public void SetCaptionFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetCaptionFont Method


SharpPlot 3.71 User Manual: SetCellSize Method

SharpPlot.SetCellSize Method

Set Cellsize (width,height) from width and height.

public void SetCellSize(
    double width,
    double height
);

Example

sp.SetCellSize(100,60);

This call is used to allow an initial scatterplot to create a series of frames to hold a set of miniature charts, each drawn at a particular x,y location. The default is 72,72 points.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetChartBackground Method

SharpPlot.SetChartBackground Method

Set Chart background shading style from any of fill-color, fill-style, edge-width (pts).

Example

sp.SetChartBackground(Color.Navy,FillStyle.Opacity42);

Overloads

  • public void SetChartBackground(Color fillColor);
  • public void SetChartBackground(double edgeWidth);
  • public void SetChartBackground(FillStyle fillStyle);
  • public void SetChartBackground(Color fillColor,FillStyle fillStyle);
  • public void SetChartBackground(Color fillColor,FillStyle fillStyle,double edgeWidth);

This paints the region bounded by the chart axes.

See also ...

SharpPlot Members | FillStyle Struct


SharpPlot 3.71 User Manual: SetChartBackground Method (Color,FillStyle,Double)

SharpPlot.SetChartBackground Method (Color,FillStyle,Double)

Set Chart background shading (fill-color, fill-style, edge-width).

public void SetChartBackground(
    Color fillColor,
    FillStyle fillStyle,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetChartBackground Method


SharpPlot 3.71 User Manual: SetChartBackground Method (Color,FillStyle)

SharpPlot.SetChartBackground Method (Color,FillStyle)

Set Chart background fill-color and shading.

public void SetChartBackground(
    Color fillColor,
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetChartBackground Method


SharpPlot 3.71 User Manual: SetChartBackground Method (Color)

SharpPlot.SetChartBackground Method (Color)

Set Chart background fill-color only.

public void SetChartBackground(
    Color fillColor
);

See also ...

SharpPlot Members | SharpPlot.SetChartBackground Method


SharpPlot 3.71 User Manual: SetChartBackground Method (FillStyle)

SharpPlot.SetChartBackground Method (FillStyle)

Set Chart background shading only.

public void SetChartBackground(
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetChartBackground Method


SharpPlot 3.71 User Manual: SetChartBackground Method (Double)

SharpPlot.SetChartBackground Method (Double)

Set Chart background edge-width (pts) only.

public void SetChartBackground(
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetChartBackground Method


SharpPlot 3.71 User Manual: SetChartName Method

SharpPlot.SetChartName Method

Assign a non-default name to the current chart.

public void SetChartName(
    string newName
);

Example

sp.SetChartName("Summary");

Description

Assigning the chart a recognisable name has a number of effects, depending on the output medium. In web formats it causes all significant chart elements (data series, or any ScriptTarget item such as the main heading) to be given an id in the html tag. This allows you to write JavaScript code to (for example) have each data series drawn in a bold line when the mouse is over the matching legend entry.

It will also add an anchor tag to the chart in VML output.

If your application is tracking hotspots using the Active Charts components, it will be very helpful for debugging to have console output report nicely named charts and series.

See also ...

Active charts in GUI Applications | SharpPlot Members | SharpPlot.SetSeriesNames Method | HotspotInfo Struct


SharpPlot 3.71 User Manual: SetColors Method

SharpPlot.SetColors Method

Set an array of colors for use by upcoming data series. The array is reused cyclically by all the series which follow.

Example

sp.SetColors(new Color[]{Color.Navy,Color.Maroon});

Overloads

  • public void SetColors(Color value);
  • public void SetColors(string value);
  • public void SetColors(Color[] colors);

A single color will ensure all series are colored identically until this is set again.

Note that ‘extra’ lines such as TrendLine and ModelFit use the color cycle also – this allows you to set chosen colors for all the significant elements in the chart.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetColors Method (Color)

SharpPlot.SetColors Method (Color)

All upcoming series get this color.

public void SetColors(
    Color value
);

See also ...

SharpPlot Members | SharpPlot.SetColors Method


SharpPlot 3.71 User Manual: SetColors Method (String)

SharpPlot.SetColors Method (String)

Interpret a list of color names as a color array.

public void SetColors(
    string value
);

See also ...

SharpPlot Members | SharpPlot.SetColors Method


SharpPlot 3.71 User Manual: SetColors Method (Color[])

SharpPlot.SetColors Method (Color[])

Set an array of colors to be used by upcoming series.

public void SetColors(
    Color[] colors
);


SharpPlot 3.71 User Manual: SetContourStyle Method

SharpPlot.SetContourStyle Method

Set Contour format given any of color, lineStyle and lineweight (pts).

Example

sp.SetContourStyle(Color.Red,LineStyle.Dash,1.2);

Overloads

  • public void SetContourStyle(Color lineColor);
  • public void SetContourStyle(double lineWidth);
  • public void SetContourStyle(LineStyle lineStyle);
  • public void SetContourStyle(Color lineColor,LineStyle lineStyle);
  • public void SetContourStyle(Color lineColor,LineStyle lineStyle,double lineWidth);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetContourStyle Method (Color,LineStyle,Double)

SharpPlot.SetContourStyle Method (Color,LineStyle,Double)

Set Contour format given color, lineStyle and lineweight.

public void SetContourStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetContourStyle Method


SharpPlot 3.71 User Manual: SetContourStyle Method (Color,LineStyle)

SharpPlot.SetContourStyle Method (Color,LineStyle)

Set Contour format color and lineStyle.

public void SetContourStyle(
    Color lineColor,
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetContourStyle Method


SharpPlot 3.71 User Manual: SetContourStyle Method (Color)

SharpPlot.SetContourStyle Method (Color)

Set Contour format color only.

public void SetContourStyle(
    Color lineColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourStyle Method


SharpPlot 3.71 User Manual: SetContourStyle Method (LineStyle)

SharpPlot.SetContourStyle Method (LineStyle)

Set Contour format line-style only.

public void SetContourStyle(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetContourStyle Method


SharpPlot 3.71 User Manual: SetContourStyle Method (Double)

SharpPlot.SetContourStyle Method (Double)

Set Contour format line-weight (pts) only.

public void SetContourStyle(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetContourStyle Method


SharpPlot 3.71 User Manual: SetContourTagFont Method

SharpPlot.SetContourTagFont Method

Set the font used to write contour-line tags given any of fontname, point-size, style, color.

Example

sp.SetContourTagFont("Arial",9); // Default color, but a little larger
sp.SetContourTagFont("Arial",6,FontStyle.Bold,Color.White);
// Small and bold for altitude-shaded charts

Overloads

  • public void SetContourTagFont(string fontName);
  • public void SetContourTagFont(double fontSize);
  • public void SetContourTagFont(Color fontColor);
  • public void SetContourTagFont(FontStyle fontStyle);
  • public void SetContourTagFont(string fontName,double fontSize);
  • public void SetContourTagFont(string fontName,Color fontColor);
  • public void SetContourTagFont(double fontSize,Color fontColor);
  • public void SetContourTagFont(string fontName,FontStyle fontStyle);
  • public void SetContourTagFont(FontStyle fontStyle,Color fontColor);
  • public void SetContourTagFont(string fontName,double fontSize,Color fontColor);
  • public void SetContourTagFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetContourTagFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetContourTagFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);


SharpPlot 3.71 User Manual: SetContourTagFont Method (String,Double,FontStyle,Color)

SharpPlot.SetContourTagFont Method (String,Double,FontStyle,Color)

Set ContourTag font from fontname, point-size, style and color.

public void SetContourTagFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (Double,Color)

SharpPlot.SetContourTagFont Method (Double,Color)

Set ContourTag font point-size and color.

public void SetContourTagFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (String,Double,Color)

SharpPlot.SetContourTagFont Method (String,Double,Color)

Set ContourTag font name, point-size and color.

public void SetContourTagFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (String,FontStyle,Color)

SharpPlot.SetContourTagFont Method (String,FontStyle,Color)

Set ContourTag font name, style and color.

public void SetContourTagFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (String,Double,FontStyle)

SharpPlot.SetContourTagFont Method (String,Double,FontStyle)

Set ContourTag font name, point-size and style.

public void SetContourTagFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (String)

SharpPlot.SetContourTagFont Method (String)

Set ContourTag font fontname only.

public void SetContourTagFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (Double)

SharpPlot.SetContourTagFont Method (Double)

Set ContourTag font point-size only.

public void SetContourTagFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (Color)

SharpPlot.SetContourTagFont Method (Color)

Set ContourTag font Color only.

public void SetContourTagFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (FontStyle)

SharpPlot.SetContourTagFont Method (FontStyle)

Set ContourTag font style only.

public void SetContourTagFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (String,Double)

SharpPlot.SetContourTagFont Method (String,Double)

Set ContourTag font name and point-size.

public void SetContourTagFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (String,FontStyle)

SharpPlot.SetContourTagFont Method (String,FontStyle)

Set ContourTag font name and style.

public void SetContourTagFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (String,Color)

SharpPlot.SetContourTagFont Method (String,Color)

Set ContourTag font name and color.

public void SetContourTagFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetContourTagFont Method (FontStyle,Color)

SharpPlot.SetContourTagFont Method (FontStyle,Color)

Set ContourTag font style and color.

public void SetContourTagFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetContourTagFont Method


SharpPlot 3.71 User Manual: SetDataWindow Method

SharpPlot.SetDataWindow Method

Window for data from an array of integers.

Example

sp.SetDataWindow(new int[]{20,60});

Overloads

  • public void SetDataWindow(int value);
  • public void SetDataWindow(int[] value);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetDataWindow Method (Int32[])

SharpPlot.SetDataWindow Method (Int32[])

Window for data.

public void SetDataWindow(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetDataWindow Method


SharpPlot 3.71 User Manual: SetDataWindow Method (Int32)

SharpPlot.SetDataWindow Method (Int32)

Set Window for data from a single value.

public void SetDataWindow(
    int value
);

See also ...

SharpPlot Members | SharpPlot.SetDataWindow Method


SharpPlot 3.71 User Manual: SetDatumLineStyle Method

SharpPlot.SetDatumLineStyle Method

Set DatumLine style given any of color, lineStyle and lineweight (pts).

Example

sp.SetDatumLineStyle(Color.Maroon,new LineStyle(new int[] {12,4,24,4})); // Long dashes

Overloads

  • public void SetDatumLineStyle(Color lineColor);
  • public void SetDatumLineStyle(double lineWidth);
  • public void SetDatumLineStyle(LineStyle lineStyle);
  • public void SetDatumLineStyle(Color lineColor,LineStyle lineStyle);
  • public void SetDatumLineStyle(Color lineColor,LineStyle lineStyle,double lineWidth);

Datum lines are drawn as specified by the user, or automatically at major tickmarks which exceed the Datumline threshold (default 160% of standard tick length).

See also ...

SharpPlot Members | SharpPlot.SetXDatumLines Method | SharpPlot.SetYDatumLines Method | SharpPlot.SetZDatumLines Method | LineStyle Struct


SharpPlot 3.71 User Manual: SetDatumLineStyle Method (Color,LineStyle,Double)

SharpPlot.SetDatumLineStyle Method (Color,LineStyle,Double)

Set DatumLine style given color, lineStyle and lineweight.

public void SetDatumLineStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineStyle Method


SharpPlot 3.71 User Manual: SetDatumLineStyle Method (Color,LineStyle)

SharpPlot.SetDatumLineStyle Method (Color,LineStyle)

Set DatumLine style color and lineStyle.

public void SetDatumLineStyle(
    Color lineColor,
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineStyle Method


SharpPlot 3.71 User Manual: SetDatumLineStyle Method (Color)

SharpPlot.SetDatumLineStyle Method (Color)

Set DatumLine style color only.

public void SetDatumLineStyle(
    Color lineColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineStyle Method


SharpPlot 3.71 User Manual: SetDatumLineStyle Method (LineStyle)

SharpPlot.SetDatumLineStyle Method (LineStyle)

Set DatumLine style line-style only.

public void SetDatumLineStyle(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineStyle Method


SharpPlot 3.71 User Manual: SetDatumLineStyle Method (Double)

SharpPlot.SetDatumLineStyle Method (Double)

Set DatumLine style line-weight (pts) only.

public void SetDatumLineStyle(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineStyle Method


SharpPlot 3.71 User Manual: SetDatumLineTags Method

SharpPlot.SetDatumLineTags Method

Set tags to be written above each datum line given a string array or a simple string.

Example

sp.SetYDatumLines(new int[] {25,50}); // Acceptable range
sp.SetDatumLineTags(new string[]{"Lower limit","Upper limit"}); // Matching labels

Overloads

  • public void SetDatumLineTags(string label);
  • public void SetDatumLineTags(int[] values);
  • public void SetDatumLineTags(string[] labels);
  • public void SetDatumLineTags(double[] values);
  • public void SetDatumLineTags(string[][] labels);

Notes

The tags are written above (or vertically to the left) of Y and X datum lines at the end of the line opposite to the axis, so by default you will see YDatum lines at the right-hand side of the chart, written just above each line.

Tags are taken in X,Y,Z order if you need to label tags on more than one axis in the same chart.

For contour plots, the tags are written on the lines in the same style as the contour labels.

See also ...

SharpPlot.DatumTagStyle Property | SharpPlot.SetDatumTagFont Method | SharpPlot.SetXDatumLines Method | SharpPlot.SetYDatumLines Method | SharpPlot.SetZDatumLines Method


SharpPlot 3.71 User Manual: SetDatumLineTags Method (String[])

SharpPlot.SetDatumLineTags Method (String[])

Set Datumline tags from an array of strings.

public void SetDatumLineTags(
    string[] labels
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: SetDatumLineTags Method (String)

SharpPlot.SetDatumLineTags Method (String)

Set Datumline tags with a comma-separated string.

public void SetDatumLineTags(
    string label
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: SetDatumLineTags Method (String[][])

SharpPlot.SetDatumLineTags Method (String[][])

Set multiple rows of labels.

public void SetDatumLineTags(
    string[][] labels
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: SetDatumLineTags Method (Int32[])

SharpPlot.SetDatumLineTags Method (Int32[])

Format Datumline tags from an integer array with current formatter.

public void SetDatumLineTags(
    int[] values
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: SetDatumLineTags Method (Double[])

SharpPlot.SetDatumLineTags Method (Double[])

Format Datumline tags from a numeric array with current formatter.

public void SetDatumLineTags(
    double[] values
);

See also ...

SharpPlot Members | SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method

SharpPlot.SetDatumTagFont Method

Set the font used to write datum-line tags given any of fontname, point-size, style, color.

Example

sp.SetDatumTagFont("Arial",10); // Default color, but a little larger
sp.SetDatumTagFont("Arial",6,FontStyle.Bold); // Small and bold

Overloads

  • public void SetDatumTagFont(string fontName);
  • public void SetDatumTagFont(double fontSize);
  • public void SetDatumTagFont(Color fontColor);
  • public void SetDatumTagFont(FontStyle fontStyle);
  • public void SetDatumTagFont(string fontName,double fontSize);
  • public void SetDatumTagFont(string fontName,Color fontColor);
  • public void SetDatumTagFont(double fontSize,Color fontColor);
  • public void SetDatumTagFont(string fontName,FontStyle fontStyle);
  • public void SetDatumTagFont(FontStyle fontStyle,Color fontColor);
  • public void SetDatumTagFont(string fontName,double fontSize,Color fontColor);
  • public void SetDatumTagFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetDatumTagFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetDatumTagFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String,Double,FontStyle,Color)

SharpPlot.SetDatumTagFont Method (String,Double,FontStyle,Color)

Set DatumTag font from fontname, point-size, style and color.

public void SetDatumTagFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (Double,Color)

SharpPlot.SetDatumTagFont Method (Double,Color)

Set DatumTag font point-size and color.

public void SetDatumTagFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String,Double,Color)

SharpPlot.SetDatumTagFont Method (String,Double,Color)

Set DatumTag font name, point-size and color.

public void SetDatumTagFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String,FontStyle,Color)

SharpPlot.SetDatumTagFont Method (String,FontStyle,Color)

Set DatumTag font name, style and color.

public void SetDatumTagFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String,Double,FontStyle)

SharpPlot.SetDatumTagFont Method (String,Double,FontStyle)

Set DatumTag font name, point-size and style.

public void SetDatumTagFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String)

SharpPlot.SetDatumTagFont Method (String)

Set DatumTag font fontname only.

public void SetDatumTagFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (Double)

SharpPlot.SetDatumTagFont Method (Double)

Set DatumTag font point-size only.

public void SetDatumTagFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (Color)

SharpPlot.SetDatumTagFont Method (Color)

Set DatumTag font Color only.

public void SetDatumTagFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (FontStyle)

SharpPlot.SetDatumTagFont Method (FontStyle)

Set DatumTag font style only.

public void SetDatumTagFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String,Double)

SharpPlot.SetDatumTagFont Method (String,Double)

Set DatumTag font name and point-size.

public void SetDatumTagFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String,FontStyle)

SharpPlot.SetDatumTagFont Method (String,FontStyle)

Set DatumTag font name and style.

public void SetDatumTagFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (String,Color)

SharpPlot.SetDatumTagFont Method (String,Color)

Set DatumTag font name and color.

public void SetDatumTagFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetDatumTagFont Method (FontStyle,Color)

SharpPlot.SetDatumTagFont Method (FontStyle,Color)

Set DatumTag font style and color.

public void SetDatumTagFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetEdgeStyle Method

SharpPlot.SetEdgeStyle Method

Set Edge format given any of color, lineStyle and lineweight (pts).

Example

sp.SetEdgeStyle(Color.White,LineStyle.Solid,2);

Overloads

  • public void SetEdgeStyle(Color lineColor);
  • public void SetEdgeStyle(double lineWidth);
  • public void SetEdgeStyle(LineStyle lineStyle);
  • public void SetEdgeStyle(Color lineColor,LineStyle lineStyle);
  • public void SetEdgeStyle(Color lineColor,LineStyle lineStyle,double lineWidth);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetEdgeStyle Method (Color,LineStyle,Double)

SharpPlot.SetEdgeStyle Method (Color,LineStyle,Double)

Set Edge format given color, lineStyle and lineweight.

public void SetEdgeStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetEdgeStyle Method


SharpPlot 3.71 User Manual: SetEdgeStyle Method (Color,LineStyle)

SharpPlot.SetEdgeStyle Method (Color,LineStyle)

Set Edge format color and lineStyle.

public void SetEdgeStyle(
    Color lineColor,
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetEdgeStyle Method


SharpPlot 3.71 User Manual: SetEdgeStyle Method (Color)

SharpPlot.SetEdgeStyle Method (Color)

Set Edge format color only.

public void SetEdgeStyle(
    Color lineColor
);

See also ...

SharpPlot Members | SharpPlot.SetEdgeStyle Method


SharpPlot 3.71 User Manual: SetEdgeStyle Method (LineStyle)

SharpPlot.SetEdgeStyle Method (LineStyle)

Set Edge format line-style only.

public void SetEdgeStyle(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetEdgeStyle Method


SharpPlot 3.71 User Manual: SetEdgeStyle Method (Double)

SharpPlot.SetEdgeStyle Method (Double)

Set Edge format line-weight (pts) only.

public void SetEdgeStyle(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetEdgeStyle Method


SharpPlot 3.71 User Manual: SetEffects Method

SharpPlot.SetEffects Method

Effect list for use by upcoming data series.

Example

pietile = "<defs> <filter id=\"pietile\"> <desc>Produces a 3D "+
"lighting effect suitable for pies and lines</desc> "+
"<feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"12\" "+
"result=\"blur\"/> <feOffset in=\"blur\" dx=\"12\" dy=\"9\" "+
"result=\"offsetBlur\"/> <feSpecularLighting in=\"blur\" "+
"surfaceScale=\"5\" specularConstant=\"1\" specularExponent=\"30\" "+
"style=\"lighting-color:White\" result=\"specOut\"> <fePointLight "+
"x=\"-5000\" y=\"-10000\" z=\"20000\"/> </feSpecularLighting> "+
"<feComposite in=\"specOut\" in2=\"SourceAlpha\" operator=\"in\" "+
"result=\"specOut\"/> <feComposite in=\"SourceGraphic\" "+
"in2=\"specOut\" operator=\"arithmetic\" k1=\"0\" k2=\"1\" k3=\"1\" "+
"k4=\"0\" result=\"litPaint\"/> <feMerge> <feMergeNode "+
"in=\"offsetBlur\"/> <feMergeNode in=\"litPaint\"/> "+
"</feMerge> </filter> </defs>";
sp.IncludeSource(pietile);
sp.SetEffects("filter:url(#pietile)");

Overloads

  • public void SetEffects(string effect);
  • public void SetEffects(string[] effects);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetEffects Method (String[])

SharpPlot.SetEffects Method (String[])

Set Effect cycle – array of strings defining effects.

public void SetEffects(
    string[] effects
);

See also ...

SharpPlot Members | SharpPlot.SetEffects Method


SharpPlot 3.71 User Manual: SetEffects Method (String)

SharpPlot.SetEffects Method (String)

Set a single effect.

public void SetEffects(
    string effect
);

See also ...

SharpPlot Members | SharpPlot.SetEffects Method


SharpPlot 3.71 User Manual: SetEquationNumericFormat Method

SharpPlot.SetEquationNumericFormat Method

Set Equation numeric format from a simple string or an array of strings.

A single string gives numeric formatter for all coefficients and correlation factors.

Otherwise, the first string gives the correlation factor numeric format, then the following strings give the numeric format for each coefficient, in ascending order of fit, X then Y.

Example

sp.SetEquationNumericFormat(new string[]{"0.000","#.##E00","##.##x"});
// Correlation, Coefficient[0], Coefficient[1]

Overloads

  • public void SetEquationNumericFormat();
  • public void SetEquationNumericFormat(string item);
  • public void SetEquationNumericFormat(string[] value);

See also ...

Using Picture Formatters | Annotate Model fit | Model fit | SharpPlot Members | SharpPlot.EquationFormat Property


SharpPlot 3.71 User Manual: SetEquationNumericFormat Method (String)

SharpPlot.SetEquationNumericFormat Method (String)

Set numeric format for all equation items.

public void SetEquationNumericFormat(
    string item
);

See also ...

SharpPlot Members | SharpPlot.SetEquationNumericFormat Method


SharpPlot 3.71 User Manual: SetEquationNumericFormat Method

SharpPlot.SetEquationNumericFormat Method

Reset Equation numeric format.

public void SetEquationNumericFormat();

See also ...

SharpPlot Members | SharpPlot.SetEquationNumericFormat Method


SharpPlot 3.71 User Manual: SetEquationNumericFormat Method (String[])

SharpPlot.SetEquationNumericFormat Method (String[])

Set Equation numeric format from a simple string or an array of strings.

public void SetEquationNumericFormat(
    string[] value
);

See also ...

SharpPlot Members | SharpPlot.SetEquationNumericFormat Method


SharpPlot 3.71 User Manual: SetEquationPosition Method

SharpPlot.SetEquationPosition Method

Set Equation position from x,y.

Example

sp.SetEquationPosition(new int[] {10,10});

Overloads

  • public void SetEquationPosition(double xPosition);
  • public void SetEquationPosition(double xPosition,double yPosition);

See also ...

SharpPlot Members | SharpPlot.EquationIndex Property | SharpPlot.EquationStyle Property


SharpPlot 3.71 User Manual: SetFillStyles Method

SharpPlot.SetFillStyles Method

Fill Patterns for use by upcoming data series. The patterns will be reused cyclically for any data-series which require shaded areas (typically barcharts or surface-shaded line-graphs).

Example

sp.SetFillStyles(new FillStyle[]{FillStyle.Saturate30,FillStyle.Saturate60});

Overloads

  • public void SetFillStyles(FillStyle fillStyle);
  • public void SetFillStyles(FillStyle[] fillStyles);

Calling this with a single FillStyle sets this as the style for all filled series from now on.

See also ...

SharpPlot Members | FillStyle Struct


SharpPlot 3.71 User Manual: SetFillStyles Method (FillStyle[])

SharpPlot.SetFillStyles Method (FillStyle[])

Set an array of fill-styles for use by upcoming series.

public void SetFillStyles(
    FillStyle[] fillStyles
);

See also ...

SharpPlot Members | SharpPlot.SetFillStyles Method


SharpPlot 3.71 User Manual: SetFillStyles Method (FillStyle)

SharpPlot.SetFillStyles Method (FillStyle)

Use only this fill style for all series.

public void SetFillStyles(
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetFillStyles Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method

SharpPlot.SetFootnoteFont Method

Set Footnote font given any of fontname, point-size, style, color.

Example

sp.SetFootnoteFont("Arial,Sans",12,FontStyle.Italic,Color.Gray);

Overloads

  • public void SetFootnoteFont(string fontName);
  • public void SetFootnoteFont(double fontSize);
  • public void SetFootnoteFont(Color fontColor);
  • public void SetFootnoteFont(FontStyle fontStyle);
  • public void SetFootnoteFont(string fontName,double fontSize);
  • public void SetFootnoteFont(string fontName,Color fontColor);
  • public void SetFootnoteFont(double fontSize,Color fontColor);
  • public void SetFootnoteFont(string fontName,FontStyle fontStyle);
  • public void SetFootnoteFont(FontStyle fontStyle,Color fontColor);
  • public void SetFootnoteFont(string fontName,double fontSize,Color fontColor);
  • public void SetFootnoteFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetFootnoteFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetFootnoteFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String,Double,FontStyle,Color)

SharpPlot.SetFootnoteFont Method (String,Double,FontStyle,Color)

Set Footnote font from fontname, point-size, style and color.

public void SetFootnoteFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (Double,Color)

SharpPlot.SetFootnoteFont Method (Double,Color)

Set Footnote font point-size and color.

public void SetFootnoteFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String,Double,Color)

SharpPlot.SetFootnoteFont Method (String,Double,Color)

Set Footnote font name, point-size and color.

public void SetFootnoteFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String,FontStyle,Color)

SharpPlot.SetFootnoteFont Method (String,FontStyle,Color)

Set Footnote font name, style and color.

public void SetFootnoteFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String,Double,FontStyle)

SharpPlot.SetFootnoteFont Method (String,Double,FontStyle)

Set Footnote font name, point-size and style.

public void SetFootnoteFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String)

SharpPlot.SetFootnoteFont Method (String)

Set Footnote font fontname only.

public void SetFootnoteFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (Double)

SharpPlot.SetFootnoteFont Method (Double)

Set Footnote font point-size only.

public void SetFootnoteFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (Color)

SharpPlot.SetFootnoteFont Method (Color)

Set Footnote font Color only.

public void SetFootnoteFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (FontStyle)

SharpPlot.SetFootnoteFont Method (FontStyle)

Set Footnote font style only.

public void SetFootnoteFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String,Double)

SharpPlot.SetFootnoteFont Method (String,Double)

Set Footnote font name and point-size.

public void SetFootnoteFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String,FontStyle)

SharpPlot.SetFootnoteFont Method (String,FontStyle)

Set Footnote font name and style.

public void SetFootnoteFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (String,Color)

SharpPlot.SetFootnoteFont Method (String,Color)

Set Footnote font name and color.

public void SetFootnoteFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFootnoteFont Method (FontStyle,Color)

SharpPlot.SetFootnoteFont Method (FontStyle,Color)

Set Footnote font style and color.

public void SetFootnoteFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetFootnoteFont Method


SharpPlot 3.71 User Manual: SetFrameBackground Method

SharpPlot.SetFrameBackground Method

Set Frame background shading style from any of fill-color, fill-style, edge-width (pts).

Example

sp.SetFrameBackground(Color.WhiteSmoke,FillStyle.Solid);

Overloads

  • public void SetFrameBackground(Color fillColor);
  • public void SetFrameBackground(double edgeWidth);
  • public void SetFrameBackground(FillStyle fillStyle);
  • public void SetFrameBackground(Color fillColor,FillStyle fillStyle);
  • public void SetFrameBackground(Color fillColor,FillStyle fillStyle,double edgeWidth);

See also ...

SharpPlot Members | FillStyle Struct


SharpPlot 3.71 User Manual: SetFrameBackground Method (Color,FillStyle,Double)

SharpPlot.SetFrameBackground Method (Color,FillStyle,Double)

Set Frame background shading (fill-color, fill-style, edge-width).

public void SetFrameBackground(
    Color fillColor,
    FillStyle fillStyle,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetFrameBackground Method


SharpPlot 3.71 User Manual: SetFrameBackground Method (Color,FillStyle)

SharpPlot.SetFrameBackground Method (Color,FillStyle)

Set Frame background fill-color and shading.

public void SetFrameBackground(
    Color fillColor,
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetFrameBackground Method


SharpPlot 3.71 User Manual: SetFrameBackground Method (Color)

SharpPlot.SetFrameBackground Method (Color)

Set Frame background fill-color only.

public void SetFrameBackground(
    Color fillColor
);

See also ...

SharpPlot Members | SharpPlot.SetFrameBackground Method


SharpPlot 3.71 User Manual: SetFrameBackground Method (FillStyle)

SharpPlot.SetFrameBackground Method (FillStyle)

Set Frame background shading only.

public void SetFrameBackground(
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetFrameBackground Method


SharpPlot 3.71 User Manual: SetFrameBackground Method (Double)

SharpPlot.SetFrameBackground Method (Double)

Set Frame background edge-width (pts) only.

public void SetFrameBackground(
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetFrameBackground Method


SharpPlot 3.71 User Manual: SetGridLineStyle Method

SharpPlot.SetGridLineStyle Method

Set Gridline format given any of color, lineStyle and lineweight (pts).

Example

sp.SetGridLineStyle(Color.Gray,LineStyle.Solid,0.5);

Overloads

  • public void SetGridLineStyle(Color lineColor);
  • public void SetGridLineStyle(double lineWidth);
  • public void SetGridLineStyle(LineStyle lineStyle);
  • public void SetGridLineStyle(Color lineColor,LineStyle lineStyle);
  • public void SetGridLineStyle(Color lineColor,LineStyle lineStyle,double lineWidth);

Gridlines are drawn at major tickmarks which exceed the current grid threshold value (default 80% of standard tick length).

See also ...

SharpPlot Members | LineStyle Struct


SharpPlot 3.71 User Manual: SetGridLineStyle Method (Color,LineStyle,Double)

SharpPlot.SetGridLineStyle Method (Color,LineStyle,Double)

Set Gridline format given color, lineStyle and lineweight.

public void SetGridLineStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetGridLineStyle Method


SharpPlot 3.71 User Manual: SetGridLineStyle Method (Color,LineStyle)

SharpPlot.SetGridLineStyle Method (Color,LineStyle)

Set Gridline format color and lineStyle.

public void SetGridLineStyle(
    Color lineColor,
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetGridLineStyle Method


SharpPlot 3.71 User Manual: SetGridLineStyle Method (Color)

SharpPlot.SetGridLineStyle Method (Color)

Set Gridline format color only.

public void SetGridLineStyle(
    Color lineColor
);

See also ...

SharpPlot Members | SharpPlot.SetGridLineStyle Method


SharpPlot 3.71 User Manual: SetGridLineStyle Method (LineStyle)

SharpPlot.SetGridLineStyle Method (LineStyle)

Set Gridline format line-style only.

public void SetGridLineStyle(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetGridLineStyle Method


SharpPlot 3.71 User Manual: SetGridLineStyle Method (Double)

SharpPlot.SetGridLineStyle Method (Double)

Set Gridline format line-weight (pts) only.

public void SetGridLineStyle(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetGridLineStyle Method


SharpPlot 3.71 User Manual: SetHeadingFont Method

SharpPlot.SetHeadingFont Method

Set Heading font given any of fontname, point-size, style, color.

Example

sp.SetHeadingFont("Baskerville,Times",16,FontStyle.Bold,Color.Maroon);
// Times is used as a fallback if Baskervill is not available

Overloads

  • public void SetHeadingFont(string fontName);
  • public void SetHeadingFont(double fontSize);
  • public void SetHeadingFont(Color fontColor);
  • public void SetHeadingFont(FontStyle fontStyle);
  • public void SetHeadingFont(string fontName,double fontSize);
  • public void SetHeadingFont(string fontName,Color fontColor);
  • public void SetHeadingFont(double fontSize,Color fontColor);
  • public void SetHeadingFont(string fontName,FontStyle fontStyle);
  • public void SetHeadingFont(FontStyle fontStyle,Color fontColor);
  • public void SetHeadingFont(string fontName,double fontSize,Color fontColor);
  • public void SetHeadingFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetHeadingFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetHeadingFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetHeadingFont Method (String,Double,FontStyle,Color)

SharpPlot.SetHeadingFont Method (String,Double,FontStyle,Color)

Set Heading font from fontname, point-size, style and color.

public void SetHeadingFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (Double,Color)

SharpPlot.SetHeadingFont Method (Double,Color)

Set Heading font point-size and color.

public void SetHeadingFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (String,Double,Color)

SharpPlot.SetHeadingFont Method (String,Double,Color)

Set Heading font name, point-size and color.

public void SetHeadingFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (String,FontStyle,Color)

SharpPlot.SetHeadingFont Method (String,FontStyle,Color)

Set Heading font name, style and color.

public void SetHeadingFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (String,Double,FontStyle)

SharpPlot.SetHeadingFont Method (String,Double,FontStyle)

Set Heading font name, point-size and style.

public void SetHeadingFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (String)

SharpPlot.SetHeadingFont Method (String)

Set Heading font fontname only.

public void SetHeadingFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (Double)

SharpPlot.SetHeadingFont Method (Double)

Set Heading font point-size only.

public void SetHeadingFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (Color)

SharpPlot.SetHeadingFont Method (Color)

Set Heading font Color only.

public void SetHeadingFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (FontStyle)

SharpPlot.SetHeadingFont Method (FontStyle)

Set Heading font style only.

public void SetHeadingFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (String,Double)

SharpPlot.SetHeadingFont Method (String,Double)

Set Heading font name and point-size.

public void SetHeadingFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (String,FontStyle)

SharpPlot.SetHeadingFont Method (String,FontStyle)

Set Heading font name and style.

public void SetHeadingFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (String,Color)

SharpPlot.SetHeadingFont Method (String,Color)

Set Heading font name and color.

public void SetHeadingFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingFont Method (FontStyle,Color)

SharpPlot.SetHeadingFont Method (FontStyle,Color)

Set Heading font style and color.

public void SetHeadingFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetHeadingFont Method


SharpPlot 3.71 User Manual: SetHeadingNudge Method

SharpPlot.SetHeadingNudge Method

Set Heading nudge from displacements (right,up).

public void SetHeadingNudge(
    double nudgeX,
    double nudgeY
);

Example

sp.SetHeadingNudge(0,6);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetIDataRange Method

SharpPlot.SetIDataRange Method

You can call any of the plotting routines with an array of arrays to have multiple series ranged and plotted at one call. However it is often more convenient to make several calls, one for each series. This method allows you to pass in all your inner-axis data arrays in advance, and notes the extreme values for use when the first plot is drawn.

Example

sp.SetIDataRange(col_Year);

Overloads

  • public void SetIDataRange(double value);
  • public void SetIDataRange(int[] value);
  • public void SetIDataRange(double[] value);
  • public void SetIDataRange(int[][] valueset);
  • public void SetIDataRange(double[][] valueset);

All the other axis properties (range, tick-interval etc) continue to apply as normal.

See also ...

SharpPlot.SetYDataRange Method


SharpPlot 3.71 User Manual: SetIDataRange Method (Double[])

SharpPlot.SetIDataRange Method (Double[])

Set Inner data range given a double vector.

public void SetIDataRange(
    double[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetIDataRange Method


SharpPlot 3.71 User Manual: SetIDataRange Method (Double)

SharpPlot.SetIDataRange Method (Double)

Set Inner data range to a single value.

public void SetIDataRange(
    double value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetIDataRange Method


SharpPlot 3.71 User Manual: SetIDataRange Method (Int32[])

SharpPlot.SetIDataRange Method (Int32[])

Set Inner data range to the min and max of an integer array.

public void SetIDataRange(
    int[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetIDataRange Method


SharpPlot 3.71 User Manual: SetIDataRange Method (Double[][])

SharpPlot.SetIDataRange Method (Double[][])

Set Inner data range to range several numeric arrays.

public void SetIDataRange(
    double[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetIDataRange Method


SharpPlot 3.71 User Manual: SetIDataRange Method (Int32[][])

SharpPlot.SetIDataRange Method (Int32[][])

Set Inner data range to range several integer arrays.

public void SetIDataRange(
    int[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetIDataRange Method


SharpPlot 3.71 User Manual: SetILabelFont Method

SharpPlot.SetILabelFont Method

Set Inner label font given any of fontname, point-size, style, color.

Example

sp.SetILabelFont("Arial",6);

Overloads

  • public void SetILabelFont(string fontName);
  • public void SetILabelFont(double fontSize);
  • public void SetILabelFont(Color fontColor);
  • public void SetILabelFont(FontStyle fontStyle);
  • public void SetILabelFont(string fontName,double fontSize);
  • public void SetILabelFont(string fontName,Color fontColor);
  • public void SetILabelFont(double fontSize,Color fontColor);
  • public void SetILabelFont(string fontName,FontStyle fontStyle);
  • public void SetILabelFont(FontStyle fontStyle,Color fontColor);
  • public void SetILabelFont(string fontName,double fontSize,Color fontColor);
  • public void SetILabelFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetILabelFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetILabelFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String,Double,FontStyle,Color)

SharpPlot.SetILabelFont Method (String,Double,FontStyle,Color)

Set Inner label font from fontname, point-size, style and color.

public void SetILabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (Double,Color)

SharpPlot.SetILabelFont Method (Double,Color)

Set Inner label font point-size and color.

public void SetILabelFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String,Double,Color)

SharpPlot.SetILabelFont Method (String,Double,Color)

Set Inner label font name, point-size and color.

public void SetILabelFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String,FontStyle,Color)

SharpPlot.SetILabelFont Method (String,FontStyle,Color)

Set Inner label font name, style and color.

public void SetILabelFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String,Double,FontStyle)

SharpPlot.SetILabelFont Method (String,Double,FontStyle)

Set Inner label font name, point-size and style.

public void SetILabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String)

SharpPlot.SetILabelFont Method (String)

Set Inner label font fontname only.

public void SetILabelFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (Double)

SharpPlot.SetILabelFont Method (Double)

Set Inner label font point-size only.

public void SetILabelFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (Color)

SharpPlot.SetILabelFont Method (Color)

Set Inner label font Color only.

public void SetILabelFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (FontStyle)

SharpPlot.SetILabelFont Method (FontStyle)

Set Inner label font style only.

public void SetILabelFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String,Double)

SharpPlot.SetILabelFont Method (String,Double)

Set Inner label font name and point-size.

public void SetILabelFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String,FontStyle)

SharpPlot.SetILabelFont Method (String,FontStyle)

Set Inner label font name and style.

public void SetILabelFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (String,Color)

SharpPlot.SetILabelFont Method (String,Color)

Set Inner label font name and color.

public void SetILabelFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabelFont Method (FontStyle,Color)

SharpPlot.SetILabelFont Method (FontStyle,Color)

Set Inner label font style and color.

public void SetILabelFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method


SharpPlot 3.71 User Manual: SetILabels Method

SharpPlot.SetILabels Method

Set text items for each inner-tickmark.

public void SetILabels(
    string[] labels
);

Example

sp.SetILabels(new string[]{"L1","L2"});
  • public void SetILabels(string item);
  • public void SetILabels(string[] value);
  • public void SetILabels(string item);
  • public void SetILabels(string[] value);
  • public void SetILabels(string item);
  • public void SetILabels(string[] value);

See also ...

Formatting text with simple HTML tags | SharpPlot Members


SharpPlot 3.71 User Manual: SetILabels Method (String[])

SharpPlot.SetILabels Method (String[])

Set I labels from an array of strings.

public void SetILabels(
    string[] value
);

See also ...

SharpPlot Members | SharpPlot.SetILabels Method


SharpPlot 3.71 User Manual: SetILabels Method (String)

SharpPlot.SetILabels Method (String)

Use first item only.

public void SetILabels(
    string item
);

See also ...

SharpPlot Members | SharpPlot.SetILabels Method


SharpPlot 3.71 User Manual: SetIRange Method

SharpPlot.SetIRange Method

Set I axis range given one or two elements.

Example

sp.SetIRange(-10,10);

Overloads

  • public void SetIRange();
  • public void SetIRange(double max);
  • public void SetIRange(double min,double max);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetIRange Method (Double,Double)

SharpPlot.SetIRange Method (Double,Double)

Set Inner axis range minimum and maximum values.

public void SetIRange(
    double min,
    double max
);
min
[todo]
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetIRange Method


SharpPlot 3.71 User Manual: SetIRange Method (Double)

SharpPlot.SetIRange Method (Double)

Set Inner axis range maximum value only.

public void SetIRange(
    double max
);
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetIRange Method


SharpPlot 3.71 User Manual: SetIRange Method

SharpPlot.SetIRange Method

Reset Inner axis range to default.

public void SetIRange();

See also ...

SharpPlot Members | SharpPlot.SetIRange Method


SharpPlot 3.71 User Manual: SetITickMarks Method

SharpPlot.SetITickMarks Method

Set I tick marks.

Example

sp.SetITickMarks(10); // Major interval

Overloads

  • public void SetITickMarks(double value);
  • public void SetITickMarks(int[] value);
  • public void SetITickMarks(double[] value);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetITickMarks Method (Double[])

SharpPlot.SetITickMarks Method (Double[])

Set I tick marks given a double vector.

public void SetITickMarks(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetITickMarks Method


SharpPlot 3.71 User Manual: SetITickMarks Method (Double)

SharpPlot.SetITickMarks Method (Double)

Set I tick marks to a single value.

public void SetITickMarks(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetITickMarks Method


SharpPlot 3.71 User Manual: SetITickMarks Method (Int32[])

SharpPlot.SetITickMarks Method (Int32[])

Set I tick marks to a integer array.

public void SetITickMarks(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetITickMarks Method


SharpPlot 3.71 User Manual: SetIZones Method

SharpPlot.SetIZones Method

Set I zones.

Example

sp.SetIZones(new Zone(40,60,Color.Silver,FillStyle.Solid));

Overloads

  • public void SetIZones(Zone value);
  • public void SetIZones(Zone[] value);

See also ...

SharpPlot Members | Zone Struct


SharpPlot 3.71 User Manual: SetIZones Method (Zone[])

SharpPlot.SetIZones Method (Zone[])

Set I zones from an array of Zone definitions.

public void SetIZones(
    Zone[] value
);

See also ...

SharpPlot Members | SharpPlot.SetIZones Method


SharpPlot 3.71 User Manual: SetIZones Method (Zone)

SharpPlot.SetIZones Method (Zone)

Set a single Zone definition.

public void SetIZones(
    Zone value
);

See also ...

SharpPlot Members | SharpPlot.SetIZones Method


SharpPlot 3.71 User Manual: SetKeyBackground Method

SharpPlot.SetKeyBackground Method

Set Key background shading style from any of fill-color, fill-style, edge-width (pts).

Example

sp.SetKeyBackground(Color.Silver,FillStyle.Solid);

Overloads

  • public void SetKeyBackground(Color fillColor);
  • public void SetKeyBackground(double edgeWidth);
  • public void SetKeyBackground(FillStyle fillStyle);
  • public void SetKeyBackground(Color fillColor,FillStyle fillStyle);
  • public void SetKeyBackground(Color fillColor,FillStyle fillStyle,double edgeWidth);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetKeyBackground Method (Color,FillStyle,Double)

SharpPlot.SetKeyBackground Method (Color,FillStyle,Double)

Set Key background shading (fill-color, fill-style, edge-width).

public void SetKeyBackground(
    Color fillColor,
    FillStyle fillStyle,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetKeyBackground Method


SharpPlot 3.71 User Manual: SetKeyBackground Method (Color,FillStyle)

SharpPlot.SetKeyBackground Method (Color,FillStyle)

Set Key background fill-color and shading.

public void SetKeyBackground(
    Color fillColor,
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetKeyBackground Method


SharpPlot 3.71 User Manual: SetKeyBackground Method (Color)

SharpPlot.SetKeyBackground Method (Color)

Set Key background fill-color only.

public void SetKeyBackground(
    Color fillColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyBackground Method


SharpPlot 3.71 User Manual: SetKeyBackground Method (FillStyle)

SharpPlot.SetKeyBackground Method (FillStyle)

Set Key background shading only.

public void SetKeyBackground(
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetKeyBackground Method


SharpPlot 3.71 User Manual: SetKeyBackground Method (Double)

SharpPlot.SetKeyBackground Method (Double)

Set Key background edge-width (pts) only.

public void SetKeyBackground(
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetKeyBackground Method


SharpPlot 3.71 User Manual: SetKeyFont Method

SharpPlot.SetKeyFont Method

Set Key font given any of fontname, point-size, style, color.

Example

sp.SetKeyFont("Verdana,Arial",14); // Arial is used as a fallback if Verdana is not found

Overloads

  • public void SetKeyFont(string fontName);
  • public void SetKeyFont(double fontSize);
  • public void SetKeyFont(Color fontColor);
  • public void SetKeyFont(FontStyle fontStyle);
  • public void SetKeyFont(string fontName,double fontSize);
  • public void SetKeyFont(string fontName,Color fontColor);
  • public void SetKeyFont(double fontSize,Color fontColor);
  • public void SetKeyFont(string fontName,FontStyle fontStyle);
  • public void SetKeyFont(FontStyle fontStyle,Color fontColor);
  • public void SetKeyFont(string fontName,double fontSize,Color fontColor);
  • public void SetKeyFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetKeyFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetKeyFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetKeyFont Method (String,Double,FontStyle,Color)

SharpPlot.SetKeyFont Method (String,Double,FontStyle,Color)

Set Key font from fontname, point-size, style and color.

public void SetKeyFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (Double,Color)

SharpPlot.SetKeyFont Method (Double,Color)

Set Key font point-size and color.

public void SetKeyFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (String,Double,Color)

SharpPlot.SetKeyFont Method (String,Double,Color)

Set Key font name, point-size and color.

public void SetKeyFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (String,FontStyle,Color)

SharpPlot.SetKeyFont Method (String,FontStyle,Color)

Set Key font name, style and color.

public void SetKeyFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (String,Double,FontStyle)

SharpPlot.SetKeyFont Method (String,Double,FontStyle)

Set Key font name, point-size and style.

public void SetKeyFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (String)

SharpPlot.SetKeyFont Method (String)

Set Key font fontname only.

public void SetKeyFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (Double)

SharpPlot.SetKeyFont Method (Double)

Set Key font point-size only.

public void SetKeyFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (Color)

SharpPlot.SetKeyFont Method (Color)

Set Key font Color only.

public void SetKeyFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (FontStyle)

SharpPlot.SetKeyFont Method (FontStyle)

Set Key font style only.

public void SetKeyFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (String,Double)

SharpPlot.SetKeyFont Method (String,Double)

Set Key font name and point-size.

public void SetKeyFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (String,FontStyle)

SharpPlot.SetKeyFont Method (String,FontStyle)

Set Key font name and style.

public void SetKeyFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (String,Color)

SharpPlot.SetKeyFont Method (String,Color)

Set Key font name and color.

public void SetKeyFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFont Method (FontStyle,Color)

SharpPlot.SetKeyFont Method (FontStyle,Color)

Set Key font style and color.

public void SetKeyFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetKeyFont Method


SharpPlot 3.71 User Manual: SetKeyFrame Method

SharpPlot.SetKeyFrame Method

Key frame (left top width height in pts) to place the chart legend in a non-default location. The legend text will be wrapped into the frame width if necessary, and key-style ‘Autofit’ will force the key font to reduce until all the legend fits within the frame. The first legend is always written in the upper-left corner of the frame.

public void SetKeyFrame(
    double left,
    double top,
    double width,
    double height
);

Example

sp.SetKeyFrame(200,300,40,60);

The frame is relative to the entire chart area – the paper size less the gutter width (typically 4pts all round). If the key has style ‘Boxed’ the box will be drawn around the text by default, not the entire extent of the frame. To draw around the frame, use the BoxFrame keystyle.

See also ...

SharpPlot Members | KeyStyles Enumeration


SharpPlot 3.71 User Manual: SetKeyIndices Method

SharpPlot.SetKeyIndices Method

Makes an arbitrary selection from the currently defined key placeholders and associated legend texts.

Example

sp.SetKeyIndices(new int[] {5,4,1});
sp.KeyStyle = KeyStyles.Vertical|KeyStyles.Boxed|KeyStyles.RightAlign|KeyStyles.MiddleAlign;
sp.DrawKey(70,5);

Overloads

  • public void SetKeyIndices(int value);
  • public void SetKeyIndices(int[] value);

Description

As elements are added to a complex chart, the legend definitions are accumulated in the order the charts are created. This order may not be how the legend should appear, or it may be necessary to select only some of the legend items. This setting may be used (as here) to control one or more calls to DrawKey, or simply to choose the entries flushed out by default when the chart is rendered.

Note that the legend text is given in the same sequence as the original (default) ordering – both the placeholders and legends are selected by this setting. If you request a Trend line and a Model fit with a Scatterplot, the legend items are added in the sequence (data, trend, model) for each series plotted.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetKeyIndices Method (Int32[])

SharpPlot.SetKeyIndices Method (Int32[])

Key indices.

public void SetKeyIndices(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetKeyIndices Method


SharpPlot 3.71 User Manual: SetKeyIndices Method (Int32)

SharpPlot.SetKeyIndices Method (Int32)

Set Key indices from a single value.

public void SetKeyIndices(
    int value
);

See also ...

SharpPlot Members | SharpPlot.SetKeyIndices Method


SharpPlot 3.71 User Manual: SetKeyNudge Method

SharpPlot.SetKeyNudge Method

Apply final ajustment to legend position from displacements (right,up) in points.

public void SetKeyNudge(
    double nudgeX,
    double nudgeY
);

Example

sp.SetKeyNudge(12,12);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetKeyText Method

SharpPlot.SetKeyText Method

Set Legends for key given a string array or a simple string.

Example

sp.SetKeyText(new string[]{"Tonnes","Value"});

Overloads

  • public void SetKeyText(string label);
  • public void SetKeyText(int[] values);
  • public void SetKeyText(string[] labels);
  • public void SetKeyText(double[] values);
  • public void SetKeyText(string[][] labels);

Adding text for trend lines

Every time SharpPlot draws a line (either a data line or a curve fit) it adds an entry to the table of keys and cycles through the list of line-styles and colours. This is to allow you (for example) to have a key reading:

Raw data ---- Trend Line ---- Cubic model

If you have 2 series each with a modelfit, you will get 4 key entries. If you only want to key your data, then set the key text to have 2 empty entries, for example

sp.SetKeyText (new string[] {"First series","","Second series",""});

The placeholder entries for the fitted lines will be skipped over in the legend.

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.KeyStyle Property | SharpPlot.ModelFitKey Property | SharpPlot.TrendLineKey Property


SharpPlot 3.71 User Manual: SetKeyText Method (String[])

SharpPlot.SetKeyText Method (String[])

Set Legends for key from an array of strings.

public void SetKeyText(
    string[] labels
);

See also ...

SharpPlot Members | SharpPlot.SetKeyText Method


SharpPlot 3.71 User Manual: SetKeyText Method (String)

SharpPlot.SetKeyText Method (String)

Set all Legends for key to a simple string.

public void SetKeyText(
    string label
);

See also ...

SharpPlot Members | SharpPlot.SetKeyText Method


SharpPlot 3.71 User Manual: SetKeyText Method (String[][])

SharpPlot.SetKeyText Method (String[][])

Set multiple rows of labels.

public void SetKeyText(
    string[][] labels
);

See also ...

SharpPlot Members | SharpPlot.SetKeyText Method


SharpPlot 3.71 User Manual: SetKeyText Method (Int32[])

SharpPlot.SetKeyText Method (Int32[])

Format Legends for key from an integer array.

public void SetKeyText(
    int[] values
);

See also ...

SharpPlot Members | SharpPlot.SetKeyText Method


SharpPlot 3.71 User Manual: SetKeyText Method (Double[])

SharpPlot.SetKeyText Method (Double[])

Format Legends for key from a numeric array.

public void SetKeyText(
    double[] values
);

See also ...

SharpPlot Members | SharpPlot.SetKeyText Method


SharpPlot 3.71 User Manual: SetLabelFont Method

SharpPlot.SetLabelFont Method

Set Label font given any of fontname, point-size, style, color.

Example

sp.SetLabelFont("Arial",14,FontStyle.Bold,Color.Firebrick);

Overloads

  • public void SetLabelFont(string fontName);
  • public void SetLabelFont(double fontSize);
  • public void SetLabelFont(Color fontColor);
  • public void SetLabelFont(FontStyle fontStyle);
  • public void SetLabelFont(string fontName,double fontSize);
  • public void SetLabelFont(string fontName,Color fontColor);
  • public void SetLabelFont(double fontSize,Color fontColor);
  • public void SetLabelFont(string fontName,FontStyle fontStyle);
  • public void SetLabelFont(FontStyle fontStyle,Color fontColor);
  • public void SetLabelFont(string fontName,double fontSize,Color fontColor);
  • public void SetLabelFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetLabelFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetLabelFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members | SharpPlot.SetILabelFont Method | SharpPlot.SetXLabelFont Method | SharpPlot.SetYLabelFont Method | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String,Double,FontStyle,Color)

SharpPlot.SetLabelFont Method (String,Double,FontStyle,Color)

Set Label font from fontname, point-size, style and color.

public void SetLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (Double,Color)

SharpPlot.SetLabelFont Method (Double,Color)

Set Label font point-size and color.

public void SetLabelFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String,Double,Color)

SharpPlot.SetLabelFont Method (String,Double,Color)

Set Label font name, point-size and color.

public void SetLabelFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String,FontStyle,Color)

SharpPlot.SetLabelFont Method (String,FontStyle,Color)

Set Label font name, style and color.

public void SetLabelFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String,Double,FontStyle)

SharpPlot.SetLabelFont Method (String,Double,FontStyle)

Set Label font name, point-size and style.

public void SetLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String)

SharpPlot.SetLabelFont Method (String)

Set Label font fontname only.

public void SetLabelFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (Double)

SharpPlot.SetLabelFont Method (Double)

Set Label font point-size only.

public void SetLabelFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (Color)

SharpPlot.SetLabelFont Method (Color)

Set Label font Color only.

public void SetLabelFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (FontStyle)

SharpPlot.SetLabelFont Method (FontStyle)

Set Label font style only.

public void SetLabelFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String,Double)

SharpPlot.SetLabelFont Method (String,Double)

Set Label font name and point-size.

public void SetLabelFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String,FontStyle)

SharpPlot.SetLabelFont Method (String,FontStyle)

Set Label font name and style.

public void SetLabelFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (String,Color)

SharpPlot.SetLabelFont Method (String,Color)

Set Label font name and color.

public void SetLabelFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelFont Method (FontStyle,Color)

SharpPlot.SetLabelFont Method (FontStyle,Color)

Set Label font style and color.

public void SetLabelFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetLabelMask Method

SharpPlot.SetLabelMask Method

This call allows you to selectively eliminate the x-axis labels. SharpPlot tries to do this for you automatically (if the labels collide) but it may not do it quite to your liking. Also it never eliminates labels if you use the angled setting on the X-axis, or for Dial or Polar charts.

Example

sp.SetLabelMask(new bool[] {true,false});  // Alternate labels

The example shows a DialChart with alternate labels omitted to avoid crowding.

  • public void SetLabelMask(int[] mask);
  • public void SetLabelMask(bool[] mask);

The array of flags (you may use integers to save typing) is converted to boolean values and replicated to match the number of labels. It correctly takes account of Barcharts (which have a dummy label added at the Y-axis).

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetLabelMask Method (Boolean[])

SharpPlot.SetLabelMask Method (Boolean[])

Set Label mask given a boolean array as a mask.

public void SetLabelMask(
    bool[] mask
);
mask
Array of flags, replicated to match X-labels.

See also ...

SharpPlot Members | SharpPlot.SetLabelMask Method


SharpPlot 3.71 User Manual: SetLabelMask Method (Int32[])

SharpPlot.SetLabelMask Method (Int32[])

Set Label mask to positive integer values.

public void SetLabelMask(
    int[] mask
);
mask
Array of flags, replicated to match X-labels.

See also ...

SharpPlot Members | SharpPlot.SetLabelMask Method


SharpPlot 3.71 User Manual: SetLineStyles Method

SharpPlot.SetLineStyles Method

Set line-styles for use by upcoming data series.

Example

sp.SetLineStyles(new LineStyle[]{LineStyle.Solid,LineStyle.DashDot});

Overloads

  • public void SetLineStyles(LineStyle lineStyle);
  • public void SetLineStyles(LineStyle[] lineStyles);

Note that ‘extra’ lines such as fitted curves use the linestyle cycle also – this allows you to set chosen styles for all the significant elements in the chart, typically solid for the data and dashed for a trendline.

See also ...

SharpPlot Members | LineStyle Struct


SharpPlot 3.71 User Manual: SetLineStyles Method (LineStyle[])

SharpPlot.SetLineStyles Method (LineStyle[])

Set an array of line-styles to be used by upcoming series.

public void SetLineStyles(
    LineStyle[] lineStyles
);

See also ...

SharpPlot Members | SharpPlot.SetLineStyles Method


SharpPlot 3.71 User Manual: SetLineStyles Method (LineStyle)

SharpPlot.SetLineStyles Method (LineStyle)

Use this line style for all series.

public void SetLineStyles(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetLineStyles Method


SharpPlot 3.71 User Manual: SetMargins Method

SharpPlot.SetMargins Method

Set all four chart margins (in pts) in one call (a single value sets all four to the same).

Example

sp.SetMargins(12); // Same all round
sp.SetMargins(16,24,48,6); // Top Bottom Left Right

Overloads

  • public void SetMargins();
  • public void SetMargins(double margins);
  • public void SetMargins(double top,double bottom,double left,double right);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetMargins Method (Double,Double,Double,Double)

SharpPlot.SetMargins Method (Double,Double,Double,Double)

Set chart margins (top,left,bottom,right).

public void SetMargins(
    double top,
    double bottom,
    double left,
    double right
);
top
Distance in points from top edge to topmost Y tickmark.
bottom
Distance in points from lower edge to X axis (or first Y tickmark).
left
Distance in points from left edge to Y-axis (or first X tickmark).
right
Distance in points from right edge to last X tickmark.

See also ...

SharpPlot Members | SharpPlot.SetMargins Method


SharpPlot 3.71 User Manual: SetMargins Method (Double)

SharpPlot.SetMargins Method (Double)

Set all four margins to this value.

public void SetMargins(
    double margins
);

See also ...

SharpPlot Members | SharpPlot.SetMargins Method


SharpPlot 3.71 User Manual: SetMargins Method

SharpPlot.SetMargins Method

Reset all margins to default.

public void SetMargins();

See also ...

SharpPlot Members | SharpPlot.SetMargins Method


SharpPlot 3.71 User Manual: SetMarkerColors Method

SharpPlot.SetMarkerColors Method

Set an array of colors to be used for individual markers. This overrides the series color and may be used to encode extra information in any LineGraph or ScatterPlot. The array you give will be replicated to match the number of markers in the series. A list of color names (or HTML codes) may be passed as an alternative.

Example

sp.SetMarkerColors(new Color[]{Color.LightBlue,Color.LightGreen,Color.LightYellow});

Overloads

  • public void SetMarkerColors(Color value);
  • public void SetMarkerColors(string value);
  • public void SetMarkerColors(Color[] colors);

Note that the BubbleChart can generate a color range for you from the current Altitude colors. This offers an alternative to varying the marker size as a way to encode the extra dimension.

See also ...

SharpPlot Members | SharpPlot.DrawBubbleChart Method


SharpPlot 3.71 User Manual: SetMarkerColors Method (Color[])

SharpPlot.SetMarkerColors Method (Color[])

Set an array of colors to be used in Altitude-colored markers.

public void SetMarkerColors(
    Color[] colors
);

See also ...

SharpPlot Members | SharpPlot.SetMarkerColors Method


SharpPlot 3.71 User Manual: SetMarkerColors Method (Color)

SharpPlot.SetMarkerColors Method (Color)

Single altitude color grades to white.

public void SetMarkerColors(
    Color value
);

See also ...

SharpPlot Members | SharpPlot.SetMarkerColors Method


SharpPlot 3.71 User Manual: SetMarkerColors Method (String)

SharpPlot.SetMarkerColors Method (String)

Interpret a list of color names as a color array.

public void SetMarkerColors(
    string value
);

See also ...

SharpPlot Members | SharpPlot.SetMarkerColors Method


SharpPlot 3.71 User Manual: SetMarkerScales Method

SharpPlot.SetMarkerScales Method

Set Marker scales for individual markers (relative to 1). The array you give will be replicated to match the number of markers in the series.

Example

sp.SetMarkerScales(2); // Scale all markers
sp.SetMarkerScales(new double[] {1,2.2,3,2}); // Cycle through a list of scales

Overloads

  • public void SetMarkerScales(double value);
  • public void SetMarkerScales(int[] value);
  • public void SetMarkerScales(double[] value);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetMarkerScales Method (Double[])

SharpPlot.SetMarkerScales Method (Double[])

Set Marker scales given a double vector.

public void SetMarkerScales(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetMarkerScales Method


SharpPlot 3.71 User Manual: SetMarkerScales Method (Double)

SharpPlot.SetMarkerScales Method (Double)

Set Marker scales to a single value.

public void SetMarkerScales(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetMarkerScales Method


SharpPlot 3.71 User Manual: SetMarkerScales Method (Int32[])

SharpPlot.SetMarkerScales Method (Int32[])

Set Marker scales to a integer array.

public void SetMarkerScales(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetMarkerScales Method


SharpPlot 3.71 User Manual: SetMarkers Method

SharpPlot.SetMarkers Method

Set marker cycle for use by upcoming data series.

Example

sp.SetMarkers(new Marker[]{Marker.Cross,Marker.Lozenge});

Overloads

  • public void SetMarkers(Marker marker);
  • public void SetMarkers(Marker[] markers);

See also ...

SharpPlot Members | Marker Struct


SharpPlot 3.71 User Manual: SetMarkers Method (Marker[])

SharpPlot.SetMarkers Method (Marker[])

Set up an array of markers for upcoming series.

public void SetMarkers(
    Marker[] markers
);

See also ...

SharpPlot Members | SharpPlot.SetMarkers Method


SharpPlot 3.71 User Manual: SetMarkers Method (Marker)

SharpPlot.SetMarkers Method (Marker)

Use only this marker.

public void SetMarkers(
    Marker marker
);

See also ...

SharpPlot Members | SharpPlot.SetMarkers Method


SharpPlot 3.71 User Manual: SetModelSpan Method

SharpPlot.SetModelSpan Method

Set the x-axis range for the data used in any model-fit.

Example

sp.SetModelSpan(34);     // Upper limit given
sp.SetModelSpan(42,77);  // Both ends given

This allows you to run several models against the same timeseries if there is an obvious change of slope.

Overloads

  • public void SetModelSpan(double min,double max);
  • public void SetModelSpan(double max);
  • public void SetModelSpan();


SharpPlot 3.71 User Manual: SetModelSpan Method (Double,Double)

SharpPlot.SetModelSpan Method (Double,Double)

Set Modelfit span minimum and maximum values.

public void SetModelSpan(
    double min,
    double max
);

See also ...

SharpPlot Members | SharpPlot.SetModelSpan Method


SharpPlot 3.71 User Manual: SetModelSpan Method (Double)

SharpPlot.SetModelSpan Method (Double)

Set Modelfit span maximum value only.

public void SetModelSpan(
    double max
);

See also ...

SharpPlot Members | SharpPlot.SetModelSpan Method


SharpPlot 3.71 User Manual: SetModelSpan Method

SharpPlot.SetModelSpan Method

Reset Modelfit span to default.

public void SetModelSpan();

See also ...

SharpPlot Members | SharpPlot.SetModelSpan Method


SharpPlot 3.71 User Manual: SetNetworkMapLinkArc Method

SharpPlot.SetNetworkMapLinkArc Method

Set NetworkMap Link Arc given an array of numbers or a single value.

Example

sp.NetworkMapStyle = NetworkMapStyles.FixedArcs;
sp.SetNetworkMapLinkArc(-30); // 30-degree angle for all arcs
sp.SetNetworkMapLinkArc(new int[] {72,144}); // Alternate radii of 72 and 144 points

Array will be cycled through along links – but ignored for self-arcs, which are set with SetNetworkMapSelfArc.

Positive values give arc radii in points. Negative values give arc angle in degrees, so zero forces flat links.

Use NetworkMapStyles.FixedArcs for the values to be observed exactly. Otherwise, the value gives the maximum radii (or minimum angle) to use – which will decrease towards half the node distance (or increase towards 180 degrees) as the nodes get closer.

Overloads

  • public void SetNetworkMapLinkArc(double value);
  • public void SetNetworkMapLinkArc(int[] value);
  • public void SetNetworkMapLinkArc();
  • public void SetNetworkMapLinkArc(double[] value);

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method | SharpPlot.SetNetworkMapSelfArc Method


SharpPlot 3.71 User Manual: SetNetworkMapLinkArc Method (Double)

SharpPlot.SetNetworkMapLinkArc Method (Double)

Set NetworkMap Link Arc to a single value.

public void SetNetworkMapLinkArc(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapLinkArc Method


SharpPlot 3.71 User Manual: SetNetworkMapLinkArc Method (Int32[])

SharpPlot.SetNetworkMapLinkArc Method (Int32[])

Set NetworkMap Link Arc to a integer array.

public void SetNetworkMapLinkArc(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapLinkArc Method


SharpPlot 3.71 User Manual: SetNetworkMapLinkArc Method

SharpPlot.SetNetworkMapLinkArc Method

Reset NetworkMap Link Arc to default.

public void SetNetworkMapLinkArc();

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapLinkArc Method


SharpPlot 3.71 User Manual: SetNetworkMapLinkArc Method (Double[])

SharpPlot.SetNetworkMapLinkArc Method (Double[])

Set NetworkMap Link Arc given an array of numbers or a single value.

public void SetNetworkMapLinkArc(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapLinkArc Method


SharpPlot 3.71 User Manual: SetNetworkMapSelfArc Method

SharpPlot.SetNetworkMapSelfArc Method

Set NetworkMap Self Arc given an array of numbers or a single value.

Array will be cycled through along nodes.

Positive values give arc radii in points. Negative values give arc radii as a multiple of SetPenWidths. Zero will apparently disables self-arcs because they will be infinitely small, but ValueTags if any would still be displayed on it, that is at the center of the node.

Example

sp.SetNetworkMapSelfArc(0); // Make self-arcs infinitely small

Overloads

  • public void SetNetworkMapSelfArc(double value);
  • public void SetNetworkMapSelfArc(int[] value);
  • public void SetNetworkMapSelfArc();
  • public void SetNetworkMapSelfArc(double[] value);

See also ...

SharpPlot Members | SharpPlot.DrawNetworkMap Method | SharpPlot.SetNetworkMapLinkArc Method


SharpPlot 3.71 User Manual: SetNetworkMapSelfArc Method (Double)

SharpPlot.SetNetworkMapSelfArc Method (Double)

Set NetworkMap Self Arc to a single value.

public void SetNetworkMapSelfArc(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapSelfArc Method


SharpPlot 3.71 User Manual: SetNetworkMapSelfArc Method (Int32[])

SharpPlot.SetNetworkMapSelfArc Method (Int32[])

Set NetworkMap Self Arc to a integer array.

public void SetNetworkMapSelfArc(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapSelfArc Method


SharpPlot 3.71 User Manual: SetNetworkMapSelfArc Method

SharpPlot.SetNetworkMapSelfArc Method

Reset NetworkMap Self Arc to default.

public void SetNetworkMapSelfArc();

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapSelfArc Method


SharpPlot 3.71 User Manual: SetNetworkMapSelfArc Method (Double[])

SharpPlot.SetNetworkMapSelfArc Method (Double[])

Set NetworkMap Self Arc given an array of numbers or a single value.

public void SetNetworkMapSelfArc(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetNetworkMapSelfArc Method


SharpPlot 3.71 User Manual: SetNewline Method

SharpPlot.SetNewline Method

Set an additional line-break character.

public void SetNewline(
    char value
);

This may be convenient when calling SharpPlot from scripting languages that don’t support the handy C# convention of treating \n as a newline character.

Example

sp.SetNewline(';');
sp.Heading = "Here is my;two-line Heading");

The ‘hardwired’ newlines \n and \r will continue to split the line in addition to the character you give here.

See also ...

SharpPlot Members | SharpPlot.Heading Property


SharpPlot 3.71 User Manual: SetNoteBackground Method

SharpPlot.SetNoteBackground Method

Set Note background shading style from any of fill-color, fill-style, edge-width (pts).

Example

sp.SetNoteBackground(Color.DodgerBlue,FillStyle.GradientTop);

Overloads

  • public void SetNoteBackground(Color fillColor);
  • public void SetNoteBackground(double edgeWidth);
  • public void SetNoteBackground(FillStyle fillStyle);
  • public void SetNoteBackground(Color fillColor,FillStyle fillStyle);
  • public void SetNoteBackground(Color fillColor,FillStyle fillStyle,double edgeWidth);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetNoteBackground Method (Color,FillStyle,Double)

SharpPlot.SetNoteBackground Method (Color,FillStyle,Double)

Set Note background shading (fill-color, fill-style, edge-width).

public void SetNoteBackground(
    Color fillColor,
    FillStyle fillStyle,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetNoteBackground Method


SharpPlot 3.71 User Manual: SetNoteBackground Method (Color,FillStyle)

SharpPlot.SetNoteBackground Method (Color,FillStyle)

Set Note background fill-color and shading.

public void SetNoteBackground(
    Color fillColor,
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetNoteBackground Method


SharpPlot 3.71 User Manual: SetNoteBackground Method (Color)

SharpPlot.SetNoteBackground Method (Color)

Set Note background fill-color only.

public void SetNoteBackground(
    Color fillColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteBackground Method


SharpPlot 3.71 User Manual: SetNoteBackground Method (FillStyle)

SharpPlot.SetNoteBackground Method (FillStyle)

Set Note background shading only.

public void SetNoteBackground(
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetNoteBackground Method


SharpPlot 3.71 User Manual: SetNoteBackground Method (Double)

SharpPlot.SetNoteBackground Method (Double)

Set Note background edge-width (pts) only.

public void SetNoteBackground(
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetNoteBackground Method


SharpPlot 3.71 User Manual: SetNoteFont Method

SharpPlot.SetNoteFont Method

Set Note font given any of fontname, point-size, style, color.

Example

sp.SetNoteFont("Verdana,Arial",12); // Arial is used as a fallback if Verdana is not found

Overloads

  • public void SetNoteFont(string fontName);
  • public void SetNoteFont(double fontSize);
  • public void SetNoteFont(Color fontColor);
  • public void SetNoteFont(FontStyle fontStyle);
  • public void SetNoteFont(string fontName,double fontSize);
  • public void SetNoteFont(string fontName,Color fontColor);
  • public void SetNoteFont(double fontSize,Color fontColor);
  • public void SetNoteFont(string fontName,FontStyle fontStyle);
  • public void SetNoteFont(FontStyle fontStyle,Color fontColor);
  • public void SetNoteFont(string fontName,double fontSize,Color fontColor);
  • public void SetNoteFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetNoteFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetNoteFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetNoteFont Method (String,Double,FontStyle,Color)

SharpPlot.SetNoteFont Method (String,Double,FontStyle,Color)

Set Note font from fontname, point-size, style and color.

public void SetNoteFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (Double,Color)

SharpPlot.SetNoteFont Method (Double,Color)

Set Note font point-size and color.

public void SetNoteFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (String,Double,Color)

SharpPlot.SetNoteFont Method (String,Double,Color)

Set Note font name, point-size and color.

public void SetNoteFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (String,FontStyle,Color)

SharpPlot.SetNoteFont Method (String,FontStyle,Color)

Set Note font name, style and color.

public void SetNoteFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (String,Double,FontStyle)

SharpPlot.SetNoteFont Method (String,Double,FontStyle)

Set Note font name, point-size and style.

public void SetNoteFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (String)

SharpPlot.SetNoteFont Method (String)

Set Note font fontname only.

public void SetNoteFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (Double)

SharpPlot.SetNoteFont Method (Double)

Set Note font point-size only.

public void SetNoteFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (Color)

SharpPlot.SetNoteFont Method (Color)

Set Note font Color only.

public void SetNoteFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (FontStyle)

SharpPlot.SetNoteFont Method (FontStyle)

Set Note font style only.

public void SetNoteFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (String,Double)

SharpPlot.SetNoteFont Method (String,Double)

Set Note font name and point-size.

public void SetNoteFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (String,FontStyle)

SharpPlot.SetNoteFont Method (String,FontStyle)

Set Note font name and style.

public void SetNoteFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (String,Color)

SharpPlot.SetNoteFont Method (String,Color)

Set Note font name and color.

public void SetNoteFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteFont Method (FontStyle,Color)

SharpPlot.SetNoteFont Method (FontStyle,Color)

Set Note font style and color.

public void SetNoteFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetNoteFont Method


SharpPlot 3.71 User Manual: SetNoteNudge Method

SharpPlot.SetNoteNudge Method

Set Note nudge from displacements (right,up).

public void SetNoteNudge(
    double nudgeX,
    double nudgeY
);

Example

sp.SetNoteNudge(12,0);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetOrderOfFit Method

SharpPlot.SetOrderOfFit Method

Set Order of fit given one or two integers.

Example

sp.SetOrderOfFit(2); // For ScatterPlot (X)
sp.SetOrderOfFit(2,1); // For CloudChart (X Y)

Overloads

  • public void SetOrderOfFit(int orderXY);
  • public void SetOrderOfFit(int orderX,int orderY);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetOrderOfFit Method (Int32,Int32)

SharpPlot.SetOrderOfFit Method (Int32,Int32)

Order of fit for x and y axes (3D charts).

public void SetOrderOfFit(
    int orderX,
    int orderY
);

See also ...

SharpPlot Members | SharpPlot.SetOrderOfFit Method


SharpPlot 3.71 User Manual: SetOrderOfFit Method (Int32)

SharpPlot.SetOrderOfFit Method (Int32)

Set Order of fit for 2D charts.

public void SetOrderOfFit(
    int orderXY
);

See also ...

SharpPlot Members | SharpPlot.SetOrderOfFit Method


SharpPlot 3.71 User Manual: SetPageLabels Method

SharpPlot.SetPageLabels Method

Create a set of labels to show the current page of a multi-dimensional dataset.

public void SetPageLabels(
    string[] labels
);

Example

sp.SetPageLabels(new string[]{"Budget","Actual"});
  • public void SetPageLabels(string item);
  • public void SetPageLabels(string[] value);
  • public void SetPageLabels(string item);
  • public void SetPageLabels(string[] value);
  • public void SetPageLabels(string item);
  • public void SetPageLabels(string[] value);

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: SetPageLabels Method (String[])

SharpPlot.SetPageLabels Method (String[])

Set Page-labels from an array of strings.

public void SetPageLabels(
    string[] value
);

See also ...

SharpPlot Members | SharpPlot.SetPageLabels Method


SharpPlot 3.71 User Manual: SetPageLabels Method (String)

SharpPlot.SetPageLabels Method (String)

Use first item only.

public void SetPageLabels(
    string item
);

See also ...

SharpPlot Members | SharpPlot.SetPageLabels Method


SharpPlot 3.71 User Manual: SetParityLimitStyle Method

SharpPlot.SetParityLimitStyle Method

Set Parity tolerance line format given any of color, lineStyle and lineweight (pts).

Example

sp.SetParityLimitStyle(Color.Maroon,LineStyle.Dash,1);

Overloads

  • public void SetParityLimitStyle(Color lineColor);
  • public void SetParityLimitStyle(double lineWidth);
  • public void SetParityLimitStyle(LineStyle lineStyle);
  • public void SetParityLimitStyle(Color lineColor,LineStyle lineStyle);
  • public void SetParityLimitStyle(Color lineColor,LineStyle lineStyle,double lineWidth);


SharpPlot 3.71 User Manual: SetParityLimitStyle Method (Color,LineStyle,Double)

SharpPlot.SetParityLimitStyle Method (Color,LineStyle,Double)

Set Parity limit style given color, lineStyle and lineweight.

public void SetParityLimitStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetParityLimitStyle Method


SharpPlot 3.71 User Manual: SetParityLimitStyle Method (Color,LineStyle)

SharpPlot.SetParityLimitStyle Method (Color,LineStyle)

Set Parity limit style color and lineStyle.

public void SetParityLimitStyle(
    Color lineColor,
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetParityLimitStyle Method


SharpPlot 3.71 User Manual: SetParityLimitStyle Method (Color)

SharpPlot.SetParityLimitStyle Method (Color)

Set Parity limit style color only.

public void SetParityLimitStyle(
    Color lineColor
);

See also ...

SharpPlot Members | SharpPlot.SetParityLimitStyle Method


SharpPlot 3.71 User Manual: SetParityLimitStyle Method (LineStyle)

SharpPlot.SetParityLimitStyle Method (LineStyle)

Set Parity limit style line-style only.

public void SetParityLimitStyle(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetParityLimitStyle Method


SharpPlot 3.71 User Manual: SetParityLimitStyle Method (Double)

SharpPlot.SetParityLimitStyle Method (Double)

Set Parity limit style line-weight (pts) only.

public void SetParityLimitStyle(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetParityLimitStyle Method


SharpPlot 3.71 User Manual: SetParityLineStyle Method

SharpPlot.SetParityLineStyle Method

Set Parity axis line format given any of color, lineStyle and lineweight (pts). The default is to draw this using the standard axis style.

Example

sp.SetParityLineStyle(Color.Purple,LineStyle.Dash);

Overloads

  • public void SetParityLineStyle(Color lineColor);
  • public void SetParityLineStyle(double lineWidth);
  • public void SetParityLineStyle(LineStyle lineStyle);
  • public void SetParityLineStyle(Color lineColor,LineStyle lineStyle);
  • public void SetParityLineStyle(Color lineColor,LineStyle lineStyle,double lineWidth);


SharpPlot 3.71 User Manual: SetParityLineStyle Method (Color,LineStyle,Double)

SharpPlot.SetParityLineStyle Method (Color,LineStyle,Double)

Set Parity axis style given color, lineStyle and lineweight.

public void SetParityLineStyle(
    Color lineColor,
    LineStyle lineStyle,
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetParityLineStyle Method


SharpPlot 3.71 User Manual: SetParityLineStyle Method (Color,LineStyle)

SharpPlot.SetParityLineStyle Method (Color,LineStyle)

Set Parity axis style color and lineStyle.

public void SetParityLineStyle(
    Color lineColor,
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetParityLineStyle Method


SharpPlot 3.71 User Manual: SetParityLineStyle Method (Color)

SharpPlot.SetParityLineStyle Method (Color)

Set Parity axis style color only.

public void SetParityLineStyle(
    Color lineColor
);

See also ...

SharpPlot Members | SharpPlot.SetParityLineStyle Method


SharpPlot 3.71 User Manual: SetParityLineStyle Method (LineStyle)

SharpPlot.SetParityLineStyle Method (LineStyle)

Set Parity axis style line-style only.

public void SetParityLineStyle(
    LineStyle lineStyle
);

See also ...

SharpPlot Members | SharpPlot.SetParityLineStyle Method


SharpPlot 3.71 User Manual: SetParityLineStyle Method (Double)

SharpPlot.SetParityLineStyle Method (Double)

Set Parity axis style line-weight (pts) only.

public void SetParityLineStyle(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetParityLineStyle Method


SharpPlot 3.71 User Manual: SetParityZoneStyle Method

SharpPlot.SetParityZoneStyle Method

Set Parity tolerance zone format given any of color, fillStyle and lineweight (pts) for the edge. The default is that this is unfilled and unedged – it sill only be drawn if the fillStyle is set.

Example

sp.SetParityZoneStyle(Color.Silver,FillStyle.Opacity18);

Overloads

  • public void SetParityZoneStyle(Color fillColor);
  • public void SetParityZoneStyle(double edgeWidth);
  • public void SetParityZoneStyle(FillStyle fillStyle);
  • public void SetParityZoneStyle(Color fillColor,FillStyle fillStyle);
  • public void SetParityZoneStyle(Color fillColor,FillStyle fillStyle,double edgeWidth);


SharpPlot 3.71 User Manual: SetParityZoneStyle Method (Color,FillStyle,Double)

SharpPlot.SetParityZoneStyle Method (Color,FillStyle,Double)

Set Parity zone style shading (fill-color, fill-style, edge-width).

public void SetParityZoneStyle(
    Color fillColor,
    FillStyle fillStyle,
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetParityZoneStyle Method


SharpPlot 3.71 User Manual: SetParityZoneStyle Method (Color,FillStyle)

SharpPlot.SetParityZoneStyle Method (Color,FillStyle)

Set Parity zone style fill-color and shading.

public void SetParityZoneStyle(
    Color fillColor,
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetParityZoneStyle Method


SharpPlot 3.71 User Manual: SetParityZoneStyle Method (Color)

SharpPlot.SetParityZoneStyle Method (Color)

Set Parity zone style fill-color only.

public void SetParityZoneStyle(
    Color fillColor
);

See also ...

SharpPlot Members | SharpPlot.SetParityZoneStyle Method


SharpPlot 3.71 User Manual: SetParityZoneStyle Method (FillStyle)

SharpPlot.SetParityZoneStyle Method (FillStyle)

Set Parity zone style shading only.

public void SetParityZoneStyle(
    FillStyle fillStyle
);

See also ...

SharpPlot Members | SharpPlot.SetParityZoneStyle Method


SharpPlot 3.71 User Manual: SetParityZoneStyle Method (Double)

SharpPlot.SetParityZoneStyle Method (Double)

Set Parity zone style edge-width (pts) only.

public void SetParityZoneStyle(
    double edgeWidth
);

See also ...

SharpPlot Members | SharpPlot.SetParityZoneStyle Method


SharpPlot 3.71 User Manual: SetPenWidths Method

SharpPlot.SetPenWidths Method

Set line-widths for use by upcoming data series.

Example

sp.SetPenWidths(new double[] {0.5,2});

Overloads

  • public void SetPenWidths(int lineWidth);
  • public void SetPenWidths(double lineWidth);
  • public void SetPenWidths(int[] lineWidths);
  • public void SetPenWidths(double[] lineWidths);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetPenWidths Method (Double[])

SharpPlot.SetPenWidths Method (Double[])

Set an array of line-widths for use by upcoming data series.

public void SetPenWidths(
    double[] lineWidths
);

See also ...

SharpPlot Members | SharpPlot.SetPenWidths Method


SharpPlot 3.71 User Manual: SetPenWidths Method (Int32[])

SharpPlot.SetPenWidths Method (Int32[])

Use integer widths for all series.

public void SetPenWidths(
    int[] lineWidths
);

See also ...

SharpPlot Members | SharpPlot.SetPenWidths Method


SharpPlot 3.71 User Manual: SetPenWidths Method (Double)

SharpPlot.SetPenWidths Method (Double)

Use a single line-width for all series.

public void SetPenWidths(
    double lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetPenWidths Method


SharpPlot 3.71 User Manual: SetPenWidths Method (Int32)

SharpPlot.SetPenWidths Method (Int32)

Use a single integer line-width for all series.

public void SetPenWidths(
    int lineWidth
);

See also ...

SharpPlot Members | SharpPlot.SetPenWidths Method


SharpPlot 3.71 User Manual: SetPieCenter Method

SharpPlot.SetPieCenter Method

Set Pie centre (absolute xy in points relative to the chart frame unless one of PieChartStyles.(Percentage ChartX ChartY) is set).

public void SetPieCenter(
    double xpos,
    double ypos
);

Example

sp.SetPieCenter(220,170);

See also ...

SharpPlot Members | SharpPlot.PieChartStyle Property


SharpPlot 3.71 User Manual: SetSelection Method

SharpPlot.SetSelection Method

Set Selection mask for data.

Example

sp.SetSelection(new bool[]{true,false,true,true});

Overloads

  • public void SetSelection(int[] mask);
  • public void SetSelection(bool[] mask);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetSelection Method (Boolean[])

SharpPlot.SetSelection Method (Boolean[])

Set Selection mask for data given a boolean array as a mask.

public void SetSelection(
    bool[] mask
);

See also ...

SharpPlot Members | SharpPlot.SetSelection Method


SharpPlot 3.71 User Manual: SetSelection Method (Int32[])

SharpPlot.SetSelection Method (Int32[])

Set Selection mask for data to positive integer values.

public void SetSelection(
    int[] mask
);

See also ...

SharpPlot Members | SharpPlot.SetSelection Method


SharpPlot 3.71 User Manual: SetSeriesNames Method

SharpPlot.SetSeriesNames Method

Assign a non-default name or names to the upcoming data series.

Example

sp.SetSeriesNames(new string[]{"Budget","Forecast"});

Overloads

  • public void SetSeriesNames(string newName);
  • public void SetSeriesNames(string[] newNames);

Description

This call will add the series name to the id tag in any web-formatted output. This makes it easy to write JavaScript which changes the elements as you mouse-over them or click on them (for example emphasising the border on mouse-enter).

It is also very helpful if your application is tracking hotspots using the Active Charts components, as you can output meaningful hotspot information to the console. For example:

Chart=Bar1, Series=Hats, Item=2, Type=Bar, Locator=186.9 52 216 193.2 0

Here the chart was named “Bar1” and the two series were named “Hats,Coats”. You could use the feedback from this structure to implement drill-down to get the detail of the ‘Hats’ series, second item.

See also ...

Active charts in GUI Applications | SharpPlot Members | SharpPlot.SetChartName Method | HotspotInfo Struct


SharpPlot 3.71 User Manual: SetSeriesNames Method (String[])

SharpPlot.SetSeriesNames Method (String[])

Assign a list of names to the upcoming data series.

public void SetSeriesNames(
    string[] newNames
);

See also ...

SharpPlot Members | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: SetSeriesNames Method (String)

SharpPlot.SetSeriesNames Method (String)

Assign a name to next series.

public void SetSeriesNames(
    string newName
);

See also ...

SharpPlot Members | SharpPlot.SetSeriesNames Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method

SharpPlot.SetSubheadingFont Method

Set Subheading font given any of fontname, point-size, style, color.

Example

sp.SetSubheadingFont("Times,Serif",16); // fallback to a Serif font on web formats (SVG,XAML)

Overloads

  • public void SetSubheadingFont(string fontName);
  • public void SetSubheadingFont(double fontSize);
  • public void SetSubheadingFont(Color fontColor);
  • public void SetSubheadingFont(FontStyle fontStyle);
  • public void SetSubheadingFont(string fontName,double fontSize);
  • public void SetSubheadingFont(string fontName,Color fontColor);
  • public void SetSubheadingFont(double fontSize,Color fontColor);
  • public void SetSubheadingFont(string fontName,FontStyle fontStyle);
  • public void SetSubheadingFont(FontStyle fontStyle,Color fontColor);
  • public void SetSubheadingFont(string fontName,double fontSize,Color fontColor);
  • public void SetSubheadingFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetSubheadingFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetSubheadingFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String,Double,FontStyle,Color)

SharpPlot.SetSubheadingFont Method (String,Double,FontStyle,Color)

Set Subheading font from fontname, point-size, style and color.

public void SetSubheadingFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (Double,Color)

SharpPlot.SetSubheadingFont Method (Double,Color)

Set Subheading font point-size and color.

public void SetSubheadingFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String,Double,Color)

SharpPlot.SetSubheadingFont Method (String,Double,Color)

Set Subheading font name, point-size and color.

public void SetSubheadingFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String,FontStyle,Color)

SharpPlot.SetSubheadingFont Method (String,FontStyle,Color)

Set Subheading font name, style and color.

public void SetSubheadingFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String,Double,FontStyle)

SharpPlot.SetSubheadingFont Method (String,Double,FontStyle)

Set Subheading font name, point-size and style.

public void SetSubheadingFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String)

SharpPlot.SetSubheadingFont Method (String)

Set Subheading font fontname only.

public void SetSubheadingFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (Double)

SharpPlot.SetSubheadingFont Method (Double)

Set Subheading font point-size only.

public void SetSubheadingFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (Color)

SharpPlot.SetSubheadingFont Method (Color)

Set Subheading font Color only.

public void SetSubheadingFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (FontStyle)

SharpPlot.SetSubheadingFont Method (FontStyle)

Set Subheading font style only.

public void SetSubheadingFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String,Double)

SharpPlot.SetSubheadingFont Method (String,Double)

Set Subheading font name and point-size.

public void SetSubheadingFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String,FontStyle)

SharpPlot.SetSubheadingFont Method (String,FontStyle)

Set Subheading font name and style.

public void SetSubheadingFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (String,Color)

SharpPlot.SetSubheadingFont Method (String,Color)

Set Subheading font name and color.

public void SetSubheadingFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetSubheadingFont Method (FontStyle,Color)

SharpPlot.SetSubheadingFont Method (FontStyle,Color)

Set Subheading font style and color.

public void SetSubheadingFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetSubheadingFont Method


SharpPlot 3.71 User Manual: SetTablePosition Method

SharpPlot.SetTablePosition Method

Set Table position and size from x,y and optional width and height

Example

sp.SetTablePosition(120,80,80);

Overloads

  • public void SetTablePosition();
  • public void SetTablePosition(double xPosition,double yPosition);
  • public void SetTablePosition(double xPosition,double yPosition,double width);
  • public void SetTablePosition(double xPosition,double yPosition,double width,double height);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetTablePosition Method

SharpPlot.SetTablePosition Method

Reset to default placement and size.

public void SetTablePosition();

See also ...

SharpPlot Members | SharpPlot.SetTablePosition Method


SharpPlot 3.71 User Manual: SetTablePosition Method (Double,Double)

SharpPlot.SetTablePosition Method (Double,Double)

Set position, leaving size to default.

public void SetTablePosition(
    double xPosition,
    double yPosition
);
xPosition
X position.
yPosition
Y position.

See also ...

SharpPlot Members | SharpPlot.SetTablePosition Method


SharpPlot 3.71 User Manual: SetTablePosition Method (Double,Double,Double)

SharpPlot.SetTablePosition Method (Double,Double,Double)

Set position and width to fit.

public void SetTablePosition(
    double xPosition,
    double yPosition,
    double width
);
xPosition
X position.
yPosition
Y position.
width
width to observe (0 for no limit).

See also ...

SharpPlot Members | SharpPlot.SetTablePosition Method


SharpPlot 3.71 User Manual: SetTablePosition Method (Double,Double,Double,Double)

SharpPlot.SetTablePosition Method (Double,Double,Double,Double)

Set position and maximum size to fit.

public void SetTablePosition(
    double xPosition,
    double yPosition,
    double width,
    double height
);
xPosition
X position.
yPosition
Y position.
width
width to observe (0 for no limit).
height
height to observe (0 for no limit).

See also ...

SharpPlot Members | SharpPlot.SetTablePosition Method


SharpPlot 3.71 User Manual: SetTowerFillStyles Method

SharpPlot.SetTowerFillStyles Method

Set Tower shadings (Top,Face,Edge) from any standard FillStyle.

Example

sp.SetTowerFillStyles(FillStyle.Saturate20,FillStyle.GradientTopRight,FillStyle.Solid);

Overloads

  • public void SetTowerFillStyles(FillStyle pattern);
  • public void SetTowerFillStyles(FillStyle topStyle,FillStyle faceStyle,FillStyle edgeStyle);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetTowerFillStyles Method (FillStyle,FillStyle,FillStyle)

SharpPlot.SetTowerFillStyles Method (FillStyle,FillStyle,FillStyle)

Tower ptns (top,face,edge) for Horizontal, Face, Edge.

public void SetTowerFillStyles(
    FillStyle topStyle,
    FillStyle faceStyle,
    FillStyle edgeStyle
);

See also ...

SharpPlot Members | SharpPlot.SetTowerFillStyles Method


SharpPlot 3.71 User Manual: SetTowerFillStyles Method (FillStyle)

SharpPlot.SetTowerFillStyles Method (FillStyle)

All planes alike.

public void SetTowerFillStyles(
    FillStyle pattern
);

See also ...

SharpPlot Members | SharpPlot.SetTowerFillStyles Method


SharpPlot 3.71 User Manual: SetTrellis Method

SharpPlot.SetTrellis Method

Creates a trellised layout given (cells down, cells across) or the total cell count.

Example

sp.SetTrellis(19); // Auto layout
sp.SetTrellis(3,4); // Grid

Overloads

  • public void SetTrellis();
  • public void SetTrellis(int cellCount);
  • public void SetTrellis(int down,int across);

This method carves up the available paper size into a rectangular collection of frames. The NewCell method must be called to move to the next available cell, working across the rows or snaking down the columns depending on the TrellisStyle setting.

If the requested total cell count does not fit nicely into the page shape, there will be vacant cells in the lower right corner.

See also ...

SharpPlot Members | SharpPlot.TrellisStyle Property | SharpPlot.DrawMultiple Method | SharpPlot.NewCell Method


SharpPlot 3.71 User Manual: SetTrellis Method (Int32,Int32)

SharpPlot.SetTrellis Method (Int32,Int32)

Define a trellis by the number of cells down and across.

public void SetTrellis(
    int down,
    int across
);

See also ...

SharpPlot Members | SharpPlot.SetTrellis Method


SharpPlot 3.71 User Manual: SetTrellis Method

SharpPlot.SetTrellis Method

Unset trellis.

public void SetTrellis();

See also ...

SharpPlot Members | SharpPlot.SetTrellis Method


SharpPlot 3.71 User Manual: SetTrellis Method (Int32)

SharpPlot.SetTrellis Method (Int32)

Creates cells in a default arrangment.

public void SetTrellis(
    int cellCount
);

See also ...

SharpPlot Members | SharpPlot.SetTrellis Method


SharpPlot 3.71 User Manual: SetValueFont Method

SharpPlot.SetValueFont Method

Set value tags font given any of fontname, point-size, style, color. This font also applies to cell text in SharpPlot.DrawTable.

Example

sp.SetValueFont("Arial",12,FontStyle.Bold,Color.Firebrick);

Overloads

  • public void SetValueFont(string fontName);
  • public void SetValueFont(double fontSize);
  • public void SetValueFont(Color fontColor);
  • public void SetValueFont(FontStyle fontStyle);
  • public void SetValueFont(string fontName,double fontSize);
  • public void SetValueFont(string fontName,Color fontColor);
  • public void SetValueFont(double fontSize,Color fontColor);
  • public void SetValueFont(string fontName,FontStyle fontStyle);
  • public void SetValueFont(FontStyle fontStyle,Color fontColor);
  • public void SetValueFont(string fontName,double fontSize,Color fontColor);
  • public void SetValueFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetValueFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetValueFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetValueFont Method (String,Double,FontStyle,Color)

SharpPlot.SetValueFont Method (String,Double,FontStyle,Color)

Set Value tag font from fontname, point-size, style and color.

public void SetValueFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (Double,Color)

SharpPlot.SetValueFont Method (Double,Color)

Set Value tag font point-size and color.

public void SetValueFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (String,Double,Color)

SharpPlot.SetValueFont Method (String,Double,Color)

Set Value tag font name, point-size and color.

public void SetValueFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (String,FontStyle,Color)

SharpPlot.SetValueFont Method (String,FontStyle,Color)

Set Value tag font name, style and color.

public void SetValueFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (String,Double,FontStyle)

SharpPlot.SetValueFont Method (String,Double,FontStyle)

Set Value tag font name, point-size and style.

public void SetValueFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (String)

SharpPlot.SetValueFont Method (String)

Set Value tag font fontname only.

public void SetValueFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (Double)

SharpPlot.SetValueFont Method (Double)

Set Value tag font point-size only.

public void SetValueFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (Color)

SharpPlot.SetValueFont Method (Color)

Set Value tag font Color only.

public void SetValueFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (FontStyle)

SharpPlot.SetValueFont Method (FontStyle)

Set Value tag font style only.

public void SetValueFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (String,Double)

SharpPlot.SetValueFont Method (String,Double)

Set Value tag font name and point-size.

public void SetValueFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (String,FontStyle)

SharpPlot.SetValueFont Method (String,FontStyle)

Set Value tag font name and style.

public void SetValueFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (String,Color)

SharpPlot.SetValueFont Method (String,Color)

Set Value tag font name and color.

public void SetValueFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueFont Method (FontStyle,Color)

SharpPlot.SetValueFont Method (FontStyle,Color)

Set Value tag font style and color.

public void SetValueFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetValueFont Method


SharpPlot 3.71 User Manual: SetValueNudge Method

SharpPlot.SetValueNudge Method

Apply fine adjustment to value tags from displacements (right,up) in points.

When using ValueTagStyles.Radial (Polar Chart and Network Map only), the X displacement is along radius, and Y along tangent.

Example

sp.SetValueNudge(0,6);

Overloads

  • public void SetValueNudge(double[] nx,double ny);
  • public void SetValueNudge(double nx,double[] ny);
  • public void SetValueNudge(double nx,double ny);
  • public void SetValueNudge(int[] nx,double ny);
  • public void SetValueNudge(double nx,int[] ny);
  • public void SetValueNudge(int[] nx,int[] ny);
  • public void SetValueNudge(double[] nx,double[] ny);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetValueNudge Method (Double[],Double)

SharpPlot.SetValueNudge Method (Double[],Double)

Set Value nudge from a single x-value and array of y values.

public void SetValueNudge(
    double[] nx,
    double ny
);
nx
Rightward displacement in points.
ny
Upward displacement in points.

See also ...

SharpPlot Members | SharpPlot.SetValueNudge Method


SharpPlot 3.71 User Manual: SetValueNudge Method (Double,Double[])

SharpPlot.SetValueNudge Method (Double,Double[])

Set Value nudge from an array of x values and a single y-value.

public void SetValueNudge(
    double nx,
    double[] ny
);
nx
Rightward displacement in points.
ny
Upward displacement in points.

See also ...

SharpPlot Members | SharpPlot.SetValueNudge Method


SharpPlot 3.71 User Manual: SetValueNudge Method (Double,Double)

SharpPlot.SetValueNudge Method (Double,Double)

Set Value nudge from a pair of xy values.

public void SetValueNudge(
    double nx,
    double ny
);
nx
Rightward displacement in points.
ny
Upward displacement in points.

See also ...

SharpPlot Members | SharpPlot.SetValueNudge Method


SharpPlot 3.71 User Manual: SetValueNudge Method (Int32[],Double)

SharpPlot.SetValueNudge Method (Int32[],Double)

Set Value nudge from a single x-value and int array of y values.

public void SetValueNudge(
    int[] nx,
    double ny
);
nx
Rightward displacement in points.
ny
Upward displacement in points.

See also ...

SharpPlot Members | SharpPlot.SetValueNudge Method


SharpPlot 3.71 User Manual: SetValueNudge Method (Double,Int32[])

SharpPlot.SetValueNudge Method (Double,Int32[])

Set Value nudge from an int array of x values and a single y-value.

public void SetValueNudge(
    double nx,
    int[] ny
);
nx
Rightward displacement in points.
ny
Upward displacement in points.

See also ...

SharpPlot Members | SharpPlot.SetValueNudge Method


SharpPlot 3.71 User Manual: SetValueNudge Method (Int32[],Int32[])

SharpPlot.SetValueNudge Method (Int32[],Int32[])

Set Value nudge from a pair of integer arrays of x,y values.

public void SetValueNudge(
    int[] nx,
    int[] ny
);
nx
Rightward displacement in points.
ny
Upward displacement in points.

See also ...

SharpPlot Members | SharpPlot.SetValueNudge Method


SharpPlot 3.71 User Manual: SetValueNudge Method (Double[],Double[])

SharpPlot.SetValueNudge Method (Double[],Double[])

Set Value nudge from a pair of displacements or matching arrays.

public void SetValueNudge(
    double[] nx,
    double[] ny
);
nx
Rightward displacement in points.
ny
Upward displacement in points.

See also ...

SharpPlot Members | SharpPlot.SetValueNudge Method


SharpPlot 3.71 User Manual: SetValueTags Method

SharpPlot.SetValueTags Method

Set Value tags given a string (or numeric) array or a simple string.

Example

sp.SetValueTags(new string[]{"First","Second"});

Overloads

  • public void SetValueTags(string label);
  • public void SetValueTags(int[] values);
  • public void SetValueTags(string[] labels);
  • public void SetValueTags(double[] values);
  • public void SetValueTags(string[][] labels);

Notes

By default, setting the ValueTags style on any chart simply adds the formatted Y-values to each data-point. However you may choose to display some other value, for example in a chart of house prices, a scatterplot of floor-area against age of house could show the price at each data-point. This is often a good way to add an extra dimension to a simple 2-dimensional presentation.

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.ValueTagFormat Property


SharpPlot 3.71 User Manual: SetValueTags Method (String[])

SharpPlot.SetValueTags Method (String[])

Set Value tags from an array of strings.

public void SetValueTags(
    string[] labels
);

See also ...

SharpPlot Members | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: SetValueTags Method (String)

SharpPlot.SetValueTags Method (String)

Set all Value tags to a simple string.

public void SetValueTags(
    string label
);

See also ...

SharpPlot Members | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: SetValueTags Method (String[][])

SharpPlot.SetValueTags Method (String[][])

Set multiple rows of labels.

public void SetValueTags(
    string[][] labels
);

See also ...

SharpPlot Members | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: SetValueTags Method (Int32[])

SharpPlot.SetValueTags Method (Int32[])

Format Value tags from an integer array.

public void SetValueTags(
    int[] values
);

See also ...

SharpPlot Members | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: SetValueTags Method (Double[])

SharpPlot.SetValueTags Method (Double[])

Format Value tags from a numeric array.

public void SetValueTags(
    double[] values
);

See also ...

SharpPlot Members | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: SetViewpoint Method

SharpPlot.SetViewpoint Method

Set 3D viewpoint given a set of roll, pitch and yaw angles in degrees. They respectively are rotations around the X, Y and Z axes executed in that order.

public void SetViewpoint(
    double roll,
    double pitch,
    double yaw
);

Example

sp.SetViewpoint(40,30,40);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetWallFillStyles Method

SharpPlot.SetWallFillStyles Method

Set 3D backplanes (Base,Face,Edge) from any standard FillStyle.

Example

sp.SetWallFillStyles(FillStyle.Saturate20,FillStyle.GradientTopRight,FillStyle.Solid);

Overloads

  • public void SetWallFillStyles(FillStyle pattern);
  • public void SetWallFillStyles(FillStyle topStyle,FillStyle faceStyle,FillStyle edgeStyle);


SharpPlot 3.71 User Manual: SetWallFillStyles Method (FillStyle,FillStyle,FillStyle)

SharpPlot.SetWallFillStyles Method (FillStyle,FillStyle,FillStyle)

Wall patterns (YZ,XZ,XY) for Horizontal, Face, Edge.

public void SetWallFillStyles(
    FillStyle topStyle,
    FillStyle faceStyle,
    FillStyle edgeStyle
);

See also ...

SharpPlot Members | SharpPlot.SetWallFillStyles Method


SharpPlot 3.71 User Manual: SetWallFillStyles Method (FillStyle)

SharpPlot.SetWallFillStyles Method (FillStyle)

All planes alike.

public void SetWallFillStyles(
    FillStyle pattern
);

See also ...

SharpPlot Members | SharpPlot.SetWallFillStyles Method


SharpPlot 3.71 User Manual: SetWeightings Method

SharpPlot.SetWeightings Method

Set Weights for modelfit or contour surface.

Example

sp.SetWeightings(new int[] {1,0,1,2,1});

Overloads

  • public void SetWeightings(double value);
  • public void SetWeightings(int[] value);
  • public void SetWeightings(double[] value);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetWeightings Method (Double[])

SharpPlot.SetWeightings Method (Double[])

Set Weights for modelfit given a double vector.

public void SetWeightings(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetWeightings Method


SharpPlot 3.71 User Manual: SetWeightings Method (Double)

SharpPlot.SetWeightings Method (Double)

Set Weights for modelfit to a single value.

public void SetWeightings(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetWeightings Method


SharpPlot 3.71 User Manual: SetWeightings Method (Int32[])

SharpPlot.SetWeightings Method (Int32[])

Set Weights for modelfit to a integer array.

public void SetWeightings(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetWeightings Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method

SharpPlot.SetXCaptionFont Method

Set X Caption font given any of fontname, point-size, style, color.

Example

sp.SetXCaptionFont("Verdana,Sans",15);

Overloads

  • public void SetXCaptionFont(string fontName);
  • public void SetXCaptionFont(double fontSize);
  • public void SetXCaptionFont(Color fontColor);
  • public void SetXCaptionFont(FontStyle fontStyle);
  • public void SetXCaptionFont(string fontName,double fontSize);
  • public void SetXCaptionFont(string fontName,Color fontColor);
  • public void SetXCaptionFont(double fontSize,Color fontColor);
  • public void SetXCaptionFont(string fontName,FontStyle fontStyle);
  • public void SetXCaptionFont(FontStyle fontStyle,Color fontColor);
  • public void SetXCaptionFont(string fontName,double fontSize,Color fontColor);
  • public void SetXCaptionFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetXCaptionFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetXCaptionFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String,Double,FontStyle,Color)

SharpPlot.SetXCaptionFont Method (String,Double,FontStyle,Color)

Set X Caption font from fontname, point-size, style and color.

public void SetXCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (Double,Color)

SharpPlot.SetXCaptionFont Method (Double,Color)

Set X Caption font point-size and color.

public void SetXCaptionFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String,Double,Color)

SharpPlot.SetXCaptionFont Method (String,Double,Color)

Set X Caption font name, point-size and color.

public void SetXCaptionFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String,FontStyle,Color)

SharpPlot.SetXCaptionFont Method (String,FontStyle,Color)

Set X Caption font name, style and color.

public void SetXCaptionFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String,Double,FontStyle)

SharpPlot.SetXCaptionFont Method (String,Double,FontStyle)

Set X Caption font name, point-size and style.

public void SetXCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String)

SharpPlot.SetXCaptionFont Method (String)

Set X Caption font fontname only.

public void SetXCaptionFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (Double)

SharpPlot.SetXCaptionFont Method (Double)

Set X Caption font point-size only.

public void SetXCaptionFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (Color)

SharpPlot.SetXCaptionFont Method (Color)

Set X Caption font Color only.

public void SetXCaptionFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (FontStyle)

SharpPlot.SetXCaptionFont Method (FontStyle)

Set X Caption font style only.

public void SetXCaptionFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String,Double)

SharpPlot.SetXCaptionFont Method (String,Double)

Set X Caption font name and point-size.

public void SetXCaptionFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String,FontStyle)

SharpPlot.SetXCaptionFont Method (String,FontStyle)

Set X Caption font name and style.

public void SetXCaptionFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (String,Color)

SharpPlot.SetXCaptionFont Method (String,Color)

Set X Caption font name and color.

public void SetXCaptionFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXCaptionFont Method (FontStyle,Color)

SharpPlot.SetXCaptionFont Method (FontStyle,Color)

Set X Caption font style and color.

public void SetXCaptionFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXCaptionFont Method


SharpPlot 3.71 User Manual: SetXDataRange Method

SharpPlot.SetXDataRange Method

You can call any of the plotting routines with an array of arrays to have multiple series ranged and plotted at one call. However it is often more convenient to make several calls, one for each series. This method allows you to pass in all your x-axis data arrays in advance, and notes the extreme values for use when the first plot is drawn.

Example

sp.SetXDataRange(col_Data);

Overloads

  • public void SetXDataRange(double value);
  • public void SetXDataRange(int[] value);
  • public void SetXDataRange(double[] value);
  • public void SetXDataRange(int[][] valueset);
  • public void SetXDataRange(double[][] valueset);

All the other axis properties (range, tick-interval etc) continue to apply as normal.

See also ...

SharpPlot.SetXRange Method


SharpPlot 3.71 User Manual: SetXDataRange Method (Double[])

SharpPlot.SetXDataRange Method (Double[])

Set X data range given a double vector.

public void SetXDataRange(
    double[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetXDataRange Method


SharpPlot 3.71 User Manual: SetXDataRange Method (Double)

SharpPlot.SetXDataRange Method (Double)

Set X data range to a single value.

public void SetXDataRange(
    double value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetXDataRange Method


SharpPlot 3.71 User Manual: SetXDataRange Method (Int32[])

SharpPlot.SetXDataRange Method (Int32[])

Set X data range to the min and max of an integer array.

public void SetXDataRange(
    int[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetXDataRange Method


SharpPlot 3.71 User Manual: SetXDataRange Method (Double[][])

SharpPlot.SetXDataRange Method (Double[][])

Set X data range to range several numeric arrays.

public void SetXDataRange(
    double[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetXDataRange Method


SharpPlot 3.71 User Manual: SetXDataRange Method (Int32[][])

SharpPlot.SetXDataRange Method (Int32[][])

Set X data range to range several integer arrays.

public void SetXDataRange(
    int[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetXDataRange Method


SharpPlot 3.71 User Manual: SetXDatumLines Method

SharpPlot.SetXDatumLines Method

Set X datum line(s).

Example

sp.SetXDatumLines(new int[] {25,50,75});

Overloads

  • public void SetXDatumLines(double value);
  • public void SetXDatumLines(int[] value);
  • public void SetXDatumLines(double[] value);

Vertical datum lines can also be triggered automatically at tickmarks which exceed the XDatum Threshold.

See also ...

SharpPlot Members | SharpPlot.SetDatumLineStyle Method | SharpPlot.SetDatumLineTags Method | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetXDatumLines Method (Double[])

SharpPlot.SetXDatumLines Method (Double[])

Set X datum line(s) given a double vector.

public void SetXDatumLines(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetXDatumLines Method


SharpPlot 3.71 User Manual: SetXDatumLines Method (Double)

SharpPlot.SetXDatumLines Method (Double)

Set X datum line(s) to a single value.

public void SetXDatumLines(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetXDatumLines Method


SharpPlot 3.71 User Manual: SetXDatumLines Method (Int32[])

SharpPlot.SetXDatumLines Method (Int32[])

Set X datum line(s) to a integer array.

public void SetXDatumLines(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetXDatumLines Method


SharpPlot 3.71 User Manual: SetXGridLines Method

SharpPlot.SetXGridLines Method

Set X gridline(s) at chosen values.

Example

sp.SetXGridLines(new int[] {5,10,17,18,19,20,21});

Overloads

  • public void SetXGridLines(double value);
  • public void SetXGridLines(int[] value);
  • public void SetXGridLines(double[] value);

Note that gridlines will be clipped at the axis range – they do not automatically extend the range for you.


SharpPlot 3.71 User Manual: SetXGridLines Method (Double[])

SharpPlot.SetXGridLines Method (Double[])

Set X gridline(s) given a double vector.

public void SetXGridLines(
    double[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetXGridLines Method


SharpPlot 3.71 User Manual: SetXGridLines Method (Double)

SharpPlot.SetXGridLines Method (Double)

Set X gridline(s) to a single value.

public void SetXGridLines(
    double value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetXGridLines Method


SharpPlot 3.71 User Manual: SetXGridLines Method (Int32[])

SharpPlot.SetXGridLines Method (Int32[])

Set X gridline(s) to a integer array.

public void SetXGridLines(
    int[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetXGridLines Method


SharpPlot 3.71 User Manual: SetXLabelFont Method

SharpPlot.SetXLabelFont Method

Set X label font given any of fontname, point-size, style, color.

Example

sp.SetXLabelFont("Arial",14,FontStyle.Bold,Color.Navy);

Overloads

  • public void SetXLabelFont(string fontName);
  • public void SetXLabelFont(double fontSize);
  • public void SetXLabelFont(Color fontColor);
  • public void SetXLabelFont(FontStyle fontStyle);
  • public void SetXLabelFont(string fontName,double fontSize);
  • public void SetXLabelFont(string fontName,Color fontColor);
  • public void SetXLabelFont(double fontSize,Color fontColor);
  • public void SetXLabelFont(string fontName,FontStyle fontStyle);
  • public void SetXLabelFont(FontStyle fontStyle,Color fontColor);
  • public void SetXLabelFont(string fontName,double fontSize,Color fontColor);
  • public void SetXLabelFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetXLabelFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetXLabelFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String,Double,FontStyle,Color)

SharpPlot.SetXLabelFont Method (String,Double,FontStyle,Color)

Set X label font from fontname, point-size, style and color.

public void SetXLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (Double,Color)

SharpPlot.SetXLabelFont Method (Double,Color)

Set X label font point-size and color.

public void SetXLabelFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String,Double,Color)

SharpPlot.SetXLabelFont Method (String,Double,Color)

Set X label font name, point-size and color.

public void SetXLabelFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String,FontStyle,Color)

SharpPlot.SetXLabelFont Method (String,FontStyle,Color)

Set X label font name, style and color.

public void SetXLabelFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String,Double,FontStyle)

SharpPlot.SetXLabelFont Method (String,Double,FontStyle)

Set X label font name, point-size and style.

public void SetXLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String)

SharpPlot.SetXLabelFont Method (String)

Set X label font fontname only.

public void SetXLabelFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (Double)

SharpPlot.SetXLabelFont Method (Double)

Set X label font point-size only.

public void SetXLabelFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (Color)

SharpPlot.SetXLabelFont Method (Color)

Set X label font Color only.

public void SetXLabelFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (FontStyle)

SharpPlot.SetXLabelFont Method (FontStyle)

Set X label font style only.

public void SetXLabelFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String,Double)

SharpPlot.SetXLabelFont Method (String,Double)

Set X label font name and point-size.

public void SetXLabelFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String,FontStyle)

SharpPlot.SetXLabelFont Method (String,FontStyle)

Set X label font name and style.

public void SetXLabelFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (String,Color)

SharpPlot.SetXLabelFont Method (String,Color)

Set X label font name and color.

public void SetXLabelFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelFont Method (FontStyle,Color)

SharpPlot.SetXLabelFont Method (FontStyle,Color)

Set X label font style and color.

public void SetXLabelFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetXLabelFont Method


SharpPlot 3.71 User Manual: SetXLabelNudge Method

SharpPlot.SetXLabelNudge Method

Apply fine adjustment to X-axis labels from displacements (right,up) in points.

public void SetXLabelNudge(
    double nudgeX,
    double nudgeY
);

Example

// Move labels right and up to appear
// beside the tickmarks rather than below
 sp.SetXLabelNudge(6,4);

This could be used as a space-saver option, for example to move the labels rightward and upwards to reduce the requirement for a bottom margin, or just to ensure that the output charts conform to a particular house-style.


SharpPlot 3.71 User Manual: SetXLabels Method

SharpPlot.SetXLabels Method

Set X labels given a string array or a simple string. Arrays of numeric values are formatted using the current setting of the label format string. Dates (OLE format integers or YYYYMMDD composite values) will be formatted using the current XDateFormat if the XAxis style is set to Date at the point where this method is called.

Example

sp.SetXLabels(new string[]{"North","South"});

Overloads

  • public void SetXLabels(string label);
  • public void SetXLabels(int[] values);
  • public void SetXLabels(string[] labels);
  • public void SetXLabels(double[] values);
  • public void SetXLabels(string[][] labels);

If an array of arrays of strings is given, these are treated as the rows of a multi-line set of labels (the N-th vector gives the N-th row for each label). It may be appropriate to use the Spanned style to have repeated elements merged across the axis.

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.XLabelFormat Property


SharpPlot 3.71 User Manual: SetXLabels Method (String[])

SharpPlot.SetXLabels Method (String[])

Set X labels from an array of strings.

public void SetXLabels(
    string[] labels
);

See also ...

SharpPlot Members | SharpPlot.SetXLabels Method


SharpPlot 3.71 User Manual: SetXLabels Method (String)

SharpPlot.SetXLabels Method (String)

Set all X labels to a simple string.

public void SetXLabels(
    string label
);

See also ...

SharpPlot Members | SharpPlot.SetXLabels Method


SharpPlot 3.71 User Manual: SetXLabels Method (String[][])

SharpPlot.SetXLabels Method (String[][])

Set multiple rows of labels.

public void SetXLabels(
    string[][] labels
);

See also ...

SharpPlot Members | SharpPlot.SetXLabels Method


SharpPlot 3.71 User Manual: SetXLabels Method (Int32[])

SharpPlot.SetXLabels Method (Int32[])

Format X labels from an integer array.

public void SetXLabels(
    int[] values
);

See also ...

SharpPlot Members | SharpPlot.SetXLabels Method


SharpPlot 3.71 User Manual: SetXLabels Method (Double[])

SharpPlot.SetXLabels Method (Double[])

Format X labels from a numeric array.

public void SetXLabels(
    double[] values
);

See also ...

SharpPlot Members | SharpPlot.SetXLabels Method


SharpPlot 3.71 User Manual: SetXRange Method

SharpPlot.SetXRange Method

Set X axis range given one or two elements.

Example

sp.SetXRange(100); // Maximum
sp.SetXRange(500,1000); // Span
sp.SetXRange(); // Return to unset state

Overloads

  • public void SetXRange();
  • public void SetXRange(double max);
  • public void SetXRange(double min,double max);

See also ...

Exact fit of Axis Range | Force zero to include axis origin | SharpPlot Members


SharpPlot 3.71 User Manual: SetXRange Method (Double,Double)

SharpPlot.SetXRange Method (Double,Double)

Set X axis range minimum and maximum values.

public void SetXRange(
    double min,
    double max
);
min
[todo]
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetXRange Method


SharpPlot 3.71 User Manual: SetXRange Method (Double)

SharpPlot.SetXRange Method (Double)

Set X axis range maximum value only.

public void SetXRange(
    double max
);
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetXRange Method


SharpPlot 3.71 User Manual: SetXRange Method

SharpPlot.SetXRange Method

Reset X axis range to default.

public void SetXRange();

See also ...

SharpPlot Members | SharpPlot.SetXRange Method


SharpPlot 3.71 User Manual: SetXTickLengths Method

SharpPlot.SetXTickLengths Method

Set the lengths of all X-tickmarks individually, as a percentage of standard, or as exact values in points if XTickStyle is Absolute.

Example

sp.SetXTickLengths(150); // Extend all ticks by 50 %
sp.SetXTickLengths(new int[] {120,60,60,60}); // Cyclic pattern
sp.XTickStyle = XTickStyles.Absolute;
sp.SetXTickLengths(new int[] {12,4,4,4}); // Size in points

Overloads

  • public void SetXTickLengths(double value);
  • public void SetXTickLengths(int[] value);
  • public void SetXTickLengths(double[] value);

See also ...

SharpPlot.XDatumThreshold Property | SharpPlot.XGridThreshold Property | SharpPlot.XTickStyle Property


SharpPlot 3.71 User Manual: SetXTickLengths Method (Double[])

SharpPlot.SetXTickLengths Method (Double[])

Set X tick lengths given a double vector.

public void SetXTickLengths(
    double[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetXTickLengths Method


SharpPlot 3.71 User Manual: SetXTickLengths Method (Double)

SharpPlot.SetXTickLengths Method (Double)

Set X tick lengths to a single value.

public void SetXTickLengths(
    double value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetXTickLengths Method


SharpPlot 3.71 User Manual: SetXTickLengths Method (Int32[])

SharpPlot.SetXTickLengths Method (Int32[])

Set X tick lengths to a integer array.

public void SetXTickLengths(
    int[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetXTickLengths Method


SharpPlot 3.71 User Manual: SetXTickMarks Method

SharpPlot.SetXTickMarks Method

Set X tick marks given a tickmark specification.

Example

sp.SetXTickMarks(10); // Every 10
sp.SetXTickMarks(20,4); // Major,minor
sp.SetXTickMarks(new int[] {10,20,50,100}); // Exact placement

Overloads

  • public void SetXTickMarks(double majorInterval);
  • public void SetXTickMarks(int[] tickPlacement);
  • public void SetXTickMarks(double[] tickPlacement);
  • public void SetXTickMarks(double majorInterval,int minorTickCount);

The units of the major tick interval are normally just the units of the data, but there are some special cases when plotting time-related values. Axis styles which affect this calculation are:

  • Date – ticks are in days (as you would expect from the OLE date values) but part-days are fine
  • Annual – ticks are in whole years
  • Monthly – ticks are computed for you at month boundaries
  • Time – ticks are in hours (fractions of an hour are fine)
  • Duration – ticks are in data units, typically minutes or seconds

The same applies if you choose to give tickmarks exactly as an array, except that in the ‘monthly’ case you give the positions in days to match the OLE date values.

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetXTickMarks Method (Double)

SharpPlot.SetXTickMarks Method (Double)

Set X tick marks major tick interval.

public void SetXTickMarks(
    double majorInterval
);

See also ...

SharpPlot Members | SharpPlot.SetXTickMarks Method


SharpPlot 3.71 User Manual: SetXTickMarks Method (Double,Int32)

SharpPlot.SetXTickMarks Method (Double,Int32)

Set X tick marks major interval and minor count.

public void SetXTickMarks(
    double majorInterval,
    int minorTickCount
);

See also ...

SharpPlot Members | SharpPlot.SetXTickMarks Method


SharpPlot 3.71 User Manual: SetXTickMarks Method (Double[])

SharpPlot.SetXTickMarks Method (Double[])

Set X tick marks to exact positions (no minor ticks).

public void SetXTickMarks(
    double[] tickPlacement
);

See also ...

SharpPlot Members | SharpPlot.SetXTickMarks Method


SharpPlot 3.71 User Manual: SetXTickMarks Method (Int32[])

SharpPlot.SetXTickMarks Method (Int32[])

Set X tick marks to integer positions (no minor ticks).

public void SetXTickMarks(
    int[] tickPlacement
);

See also ...

SharpPlot Members | SharpPlot.SetXTickMarks Method


SharpPlot 3.71 User Manual: SetXZones Method

SharpPlot.SetXZones Method

Set X zone.

Example

sp.SetXZones(new Zone(40,60,Color.Green,FillStyle.Opacity30));

Overloads

  • public void SetXZones(Zone value);
  • public void SetXZones(Zone[] value);

See also ...

SharpPlot Members | Zone Struct


SharpPlot 3.71 User Manual: SetXZones Method (Zone[])

SharpPlot.SetXZones Method (Zone[])

Set X zone from an array of Zone definitions.

public void SetXZones(
    Zone[] value
);

See also ...

SharpPlot Members | SharpPlot.SetXZones Method


SharpPlot 3.71 User Manual: SetXZones Method (Zone)

SharpPlot.SetXZones Method (Zone)

Set a single Zone definition.

public void SetXZones(
    Zone value
);

See also ...

SharpPlot Members | SharpPlot.SetXZones Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method

SharpPlot.SetYCaptionFont Method

Set Y Caption font given any of fontname, point-size, style, color.

Example

sp.SetYCaptionFont("Arial,sans",14,Color.Goldenrod);

Overloads

  • public void SetYCaptionFont(string fontName);
  • public void SetYCaptionFont(double fontSize);
  • public void SetYCaptionFont(Color fontColor);
  • public void SetYCaptionFont(FontStyle fontStyle);
  • public void SetYCaptionFont(string fontName,double fontSize);
  • public void SetYCaptionFont(string fontName,Color fontColor);
  • public void SetYCaptionFont(double fontSize,Color fontColor);
  • public void SetYCaptionFont(string fontName,FontStyle fontStyle);
  • public void SetYCaptionFont(FontStyle fontStyle,Color fontColor);
  • public void SetYCaptionFont(string fontName,double fontSize,Color fontColor);
  • public void SetYCaptionFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetYCaptionFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetYCaptionFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String,Double,FontStyle,Color)

SharpPlot.SetYCaptionFont Method (String,Double,FontStyle,Color)

Set Y Caption font from fontname, point-size, style and color.

public void SetYCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (Double,Color)

SharpPlot.SetYCaptionFont Method (Double,Color)

Set Y Caption font point-size and color.

public void SetYCaptionFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String,Double,Color)

SharpPlot.SetYCaptionFont Method (String,Double,Color)

Set Y Caption font name, point-size and color.

public void SetYCaptionFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String,FontStyle,Color)

SharpPlot.SetYCaptionFont Method (String,FontStyle,Color)

Set Y Caption font name, style and color.

public void SetYCaptionFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String,Double,FontStyle)

SharpPlot.SetYCaptionFont Method (String,Double,FontStyle)

Set Y Caption font name, point-size and style.

public void SetYCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String)

SharpPlot.SetYCaptionFont Method (String)

Set Y Caption font fontname only.

public void SetYCaptionFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (Double)

SharpPlot.SetYCaptionFont Method (Double)

Set Y Caption font point-size only.

public void SetYCaptionFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (Color)

SharpPlot.SetYCaptionFont Method (Color)

Set Y Caption font Color only.

public void SetYCaptionFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (FontStyle)

SharpPlot.SetYCaptionFont Method (FontStyle)

Set Y Caption font style only.

public void SetYCaptionFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String,Double)

SharpPlot.SetYCaptionFont Method (String,Double)

Set Y Caption font name and point-size.

public void SetYCaptionFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String,FontStyle)

SharpPlot.SetYCaptionFont Method (String,FontStyle)

Set Y Caption font name and style.

public void SetYCaptionFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (String,Color)

SharpPlot.SetYCaptionFont Method (String,Color)

Set Y Caption font name and color.

public void SetYCaptionFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYCaptionFont Method (FontStyle,Color)

SharpPlot.SetYCaptionFont Method (FontStyle,Color)

Set Y Caption font style and color.

public void SetYCaptionFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYCaptionFont Method


SharpPlot 3.71 User Manual: SetYDataRange Method

SharpPlot.SetYDataRange Method

You can call any of the plotting routines with an array of arrays to have multiple series ranged and plotted at one call. However it is often more convenient to make several calls, one for each series. This method allows you to pass in all your y-axis data arrays in advance, and notes the extreme values for use when the first plot is drawn.

Example

sp.SetYDataRange(col_Yield);

Overloads

  • public void SetYDataRange(double value);
  • public void SetYDataRange(int[] value);
  • public void SetYDataRange(double[] value);
  • public void SetYDataRange(int[][] valueset);
  • public void SetYDataRange(double[][] valueset);

All the other axis properties (range, tick-interval etc) continue to apply as normal.

See also ...

SharpPlot.SetYRange Method


SharpPlot 3.71 User Manual: SetYDataRange Method (Double[])

SharpPlot.SetYDataRange Method (Double[])

Set Y data range given a double vector.

public void SetYDataRange(
    double[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetYDataRange Method


SharpPlot 3.71 User Manual: SetYDataRange Method (Double)

SharpPlot.SetYDataRange Method (Double)

Set Y data range to a single value.

public void SetYDataRange(
    double value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetYDataRange Method


SharpPlot 3.71 User Manual: SetYDataRange Method (Int32[])

SharpPlot.SetYDataRange Method (Int32[])

Set Y data range to the min and max of an integer array.

public void SetYDataRange(
    int[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetYDataRange Method


SharpPlot 3.71 User Manual: SetYDataRange Method (Double[][])

SharpPlot.SetYDataRange Method (Double[][])

Set Y data range to range several numeric arrays.

public void SetYDataRange(
    double[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetYDataRange Method


SharpPlot 3.71 User Manual: SetYDataRange Method (Int32[][])

SharpPlot.SetYDataRange Method (Int32[][])

Set Y data range to range several integer arrays.

public void SetYDataRange(
    int[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetYDataRange Method


SharpPlot 3.71 User Manual: SetYDatumLines Method

SharpPlot.SetYDatumLines Method

Set Y datum line(s).

Example

sp.SetYDatumLines(new int[] {25,50}); // Acceptable range
sp.SetDatumLineTags(new string[]{"Lower limit","Upper limit"}); // Matching labels

Overloads

  • public void SetYDatumLines(double value);
  • public void SetYDatumLines(int[] value);
  • public void SetYDatumLines(double[] value);

Horizontal datum lines can also be triggered automatically at tickmarks which exceed the YDatum Threshold.

See also ...

SharpPlot Members | SharpPlot.SetDatumLineStyle Method | SharpPlot.SetDatumLineTags Method | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetYDatumLines Method (Double[])

SharpPlot.SetYDatumLines Method (Double[])

Set Y datum line(s) given a double vector.

public void SetYDatumLines(
    double[] value
);

See also ...

SharpPlot Members | SharpPlot.SetYDatumLines Method


SharpPlot 3.71 User Manual: SetYDatumLines Method (Double)

SharpPlot.SetYDatumLines Method (Double)

Set Y datum line(s) to a single value.

public void SetYDatumLines(
    double value
);

See also ...

SharpPlot Members | SharpPlot.SetYDatumLines Method


SharpPlot 3.71 User Manual: SetYDatumLines Method (Int32[])

SharpPlot.SetYDatumLines Method (Int32[])

Set Y datum line(s) to a integer array.

public void SetYDatumLines(
    int[] value
);

See also ...

SharpPlot Members | SharpPlot.SetYDatumLines Method


SharpPlot 3.71 User Manual: SetYGridLines Method

SharpPlot.SetYGridLines Method

Set Y gridline(s) at chosen values.

Example

sp.SetYGridLines(new int[] {0,4,16,19,22,25});

Overloads

  • public void SetYGridLines(double value);
  • public void SetYGridLines(int[] value);
  • public void SetYGridLines(double[] value);

Note that gridlines will be clipped at the axis range – they do not automatically extend the range for you.


SharpPlot 3.71 User Manual: SetYGridLines Method (Double[])

SharpPlot.SetYGridLines Method (Double[])

Set Y gridline(s) given a double vector.

public void SetYGridLines(
    double[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetYGridLines Method


SharpPlot 3.71 User Manual: SetYGridLines Method (Double)

SharpPlot.SetYGridLines Method (Double)

Set Y gridline(s) to a single value.

public void SetYGridLines(
    double value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetYGridLines Method


SharpPlot 3.71 User Manual: SetYGridLines Method (Int32[])

SharpPlot.SetYGridLines Method (Int32[])

Set Y gridline(s) to a integer array.

public void SetYGridLines(
    int[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetYGridLines Method


SharpPlot 3.71 User Manual: SetYLabelFont Method

SharpPlot.SetYLabelFont Method

Set Y label font given any of fontname, point-size, style, color.

Example

sp.SetYLabelFont("Arial,sans",11.5,FontStyle.Bold);

Overloads

  • public void SetYLabelFont(string fontName);
  • public void SetYLabelFont(double fontSize);
  • public void SetYLabelFont(Color fontColor);
  • public void SetYLabelFont(FontStyle fontStyle);
  • public void SetYLabelFont(string fontName,double fontSize);
  • public void SetYLabelFont(string fontName,Color fontColor);
  • public void SetYLabelFont(double fontSize,Color fontColor);
  • public void SetYLabelFont(string fontName,FontStyle fontStyle);
  • public void SetYLabelFont(FontStyle fontStyle,Color fontColor);
  • public void SetYLabelFont(string fontName,double fontSize,Color fontColor);
  • public void SetYLabelFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetYLabelFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetYLabelFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String,Double,FontStyle,Color)

SharpPlot.SetYLabelFont Method (String,Double,FontStyle,Color)

Set Y label font from fontname, point-size, style and color.

public void SetYLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (Double,Color)

SharpPlot.SetYLabelFont Method (Double,Color)

Set Y label font point-size and color.

public void SetYLabelFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String,Double,Color)

SharpPlot.SetYLabelFont Method (String,Double,Color)

Set Y label font name, point-size and color.

public void SetYLabelFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String,FontStyle,Color)

SharpPlot.SetYLabelFont Method (String,FontStyle,Color)

Set Y label font name, style and color.

public void SetYLabelFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String,Double,FontStyle)

SharpPlot.SetYLabelFont Method (String,Double,FontStyle)

Set Y label font name, point-size and style.

public void SetYLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String)

SharpPlot.SetYLabelFont Method (String)

Set Y label font fontname only.

public void SetYLabelFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (Double)

SharpPlot.SetYLabelFont Method (Double)

Set Y label font point-size only.

public void SetYLabelFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (Color)

SharpPlot.SetYLabelFont Method (Color)

Set Y label font Color only.

public void SetYLabelFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (FontStyle)

SharpPlot.SetYLabelFont Method (FontStyle)

Set Y label font style only.

public void SetYLabelFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String,Double)

SharpPlot.SetYLabelFont Method (String,Double)

Set Y label font name and point-size.

public void SetYLabelFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String,FontStyle)

SharpPlot.SetYLabelFont Method (String,FontStyle)

Set Y label font name and style.

public void SetYLabelFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (String,Color)

SharpPlot.SetYLabelFont Method (String,Color)

Set Y label font name and color.

public void SetYLabelFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelFont Method (FontStyle,Color)

SharpPlot.SetYLabelFont Method (FontStyle,Color)

Set Y label font style and color.

public void SetYLabelFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetYLabelFont Method


SharpPlot 3.71 User Manual: SetYLabelNudge Method

SharpPlot.SetYLabelNudge Method

Apply fine adjustment to Y-axis labels from displacements (right,up) in points.

public void SetYLabelNudge(
    double nudgeX,
    double nudgeY
);

Example

// Move labels right and up to appear
// above the Y-axis tickmarks
 sp.SetYLabelNudge(4,4);

This could be used as a space-saver option, for example to move the labels upwards and inwards to reduce the requirement for a left margin, or just to ensure that the output charts conform to a particular house-style.


SharpPlot 3.71 User Manual: SetYLabels Method

SharpPlot.SetYLabels Method

Set Y labels given a string array or a simple string or an array of numbers. Numbers are formatted using the current label format string or wrapped into the available space in the left margin if no formatter is given.

Dates (OLE format integers or YYYYMMDD composite values) will be formatted using the current YDateFormat if the YAxis style is set to Date at the point where this method is called.

Example

sp.SetYLabels(new string[]{"Nuts","Bolts","Washers"});

Overloads

  • public void SetYLabels(string label);
  • public void SetYLabels(int[] values);
  • public void SetYLabels(string[] labels);
  • public void SetYLabels(double[] values);
  • public void SetYLabels(string[][] labels);

If an array of arrays of strings is given, these are treated as the rows of a multi-line set of labels (the N-th vector gives the N-th row for each label).

See also ...

Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.YLabelFormat Property


SharpPlot 3.71 User Manual: SetYLabels Method (String[])

SharpPlot.SetYLabels Method (String[])

Set Y labels from an array of strings.

public void SetYLabels(
    string[] labels
);

See also ...

SharpPlot Members | SharpPlot.SetYLabels Method


SharpPlot 3.71 User Manual: SetYLabels Method (String)

SharpPlot.SetYLabels Method (String)

Set all Y labels to a simple string.

public void SetYLabels(
    string label
);

See also ...

SharpPlot Members | SharpPlot.SetYLabels Method


SharpPlot 3.71 User Manual: SetYLabels Method (String[][])

SharpPlot.SetYLabels Method (String[][])

Set multiple rows of labels.

public void SetYLabels(
    string[][] labels
);

See also ...

SharpPlot Members | SharpPlot.SetYLabels Method


SharpPlot 3.71 User Manual: SetYLabels Method (Int32[])

SharpPlot.SetYLabels Method (Int32[])

Format Y labels from an integer array.

public void SetYLabels(
    int[] values
);

See also ...

SharpPlot Members | SharpPlot.SetYLabels Method


SharpPlot 3.71 User Manual: SetYLabels Method (Double[])

SharpPlot.SetYLabels Method (Double[])

Format Y labels from a numeric array.

public void SetYLabels(
    double[] values
);

See also ...

SharpPlot Members | SharpPlot.SetYLabels Method


SharpPlot 3.71 User Manual: SetYRange Method

SharpPlot.SetYRange Method

Set Y axis range given one or two elements.

Example

sp.SetYRange(1000); // Maximum
sp.SetYRange(-20,20); // Span
sp.SetYRange(); // Return to unset state

Overloads

  • public void SetYRange();
  • public void SetYRange(double max);
  • public void SetYRange(double min,double max);

See also ...

Exact fit of Axis Range | Force zero to include axis origin | SharpPlot Members


SharpPlot 3.71 User Manual: SetYRange Method (Double,Double)

SharpPlot.SetYRange Method (Double,Double)

Set Y axis range minimum and maximum values.

public void SetYRange(
    double min,
    double max
);
min
[todo]
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetYRange Method


SharpPlot 3.71 User Manual: SetYRange Method (Double)

SharpPlot.SetYRange Method (Double)

Set Y axis range maximum value only.

public void SetYRange(
    double max
);
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetYRange Method


SharpPlot 3.71 User Manual: SetYRange Method

SharpPlot.SetYRange Method

Reset Y axis range to default.

public void SetYRange();

See also ...

SharpPlot Members | SharpPlot.SetYRange Method


SharpPlot 3.71 User Manual: SetYTickLengths Method

SharpPlot.SetYTickLengths Method

Set the lengths of all Y-tickmarks individually, as a percentage of standard, or as exact values in points if YTickStyle is Absolute.

Example

sp.SetYTickLengths(120); // Extend all ticks
sp.SetYTickLengths(new int[] {150,80,80}); // Cyclic pattern
sp.YTickStyle = YTickStyles.Absolute;
sp.SetYTickLengths(new int[] {8,2,4,2}); // Values in points

Overloads

  • public void SetYTickLengths(double value);
  • public void SetYTickLengths(int[] value);
  • public void SetYTickLengths(double[] value);

See also ...

SharpPlot.YDatumThreshold Property | SharpPlot.YGridThreshold Property | SharpPlot.YTickStyle Property


SharpPlot 3.71 User Manual: SetYTickLengths Method (Double[])

SharpPlot.SetYTickLengths Method (Double[])

Set Y-tick lengths given a double vector.

public void SetYTickLengths(
    double[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetYTickLengths Method


SharpPlot 3.71 User Manual: SetYTickLengths Method (Double)

SharpPlot.SetYTickLengths Method (Double)

Set Y-tick lengths to a single value.

public void SetYTickLengths(
    double value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetYTickLengths Method


SharpPlot 3.71 User Manual: SetYTickLengths Method (Int32[])

SharpPlot.SetYTickLengths Method (Int32[])

Set Y-tick lengths to a integer array.

public void SetYTickLengths(
    int[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetYTickLengths Method


SharpPlot 3.71 User Manual: SetYTickMarks Method

SharpPlot.SetYTickMarks Method

Set Y tick marks given a tickmark specification.

Example

sp.SetYTickMarks(100); // Every 100
sp.SetYTickMarks(50,1); // Major,minor
sp.SetYTickMarks(new int[] {0,10,20,50,100}); // Exact placement

Overloads

  • public void SetYTickMarks(double majorInterval);
  • public void SetYTickMarks(int[] tickPlacement);
  • public void SetYTickMarks(double[] tickPlacement);
  • public void SetYTickMarks(double majorInterval,int minorTickCount);

The units of the major tick interval are normally just the units of the data, but there are some special cases when plotting time-related values. Axis styles which affect this calculation are:

  • Time – ticks are in hours (fractions of an hour are fine)
  • Duration – ticks are in data units, typically minutes or seconds

The same applies if you choose to give tickmarks exactly as an array.

See also ...

SharpPlot Members | SharpPlot.YAxisStyle Property


SharpPlot 3.71 User Manual: SetYTickMarks Method (Double)

SharpPlot.SetYTickMarks Method (Double)

Set Y tick marks major tick interval.

public void SetYTickMarks(
    double majorInterval
);

See also ...

SharpPlot Members | SharpPlot.SetYTickMarks Method


SharpPlot 3.71 User Manual: SetYTickMarks Method (Double,Int32)

SharpPlot.SetYTickMarks Method (Double,Int32)

Set Y tick marks major interval and minor count.

public void SetYTickMarks(
    double majorInterval,
    int minorTickCount
);

See also ...

SharpPlot Members | SharpPlot.SetYTickMarks Method


SharpPlot 3.71 User Manual: SetYTickMarks Method (Double[])

SharpPlot.SetYTickMarks Method (Double[])

Set Y tick marks to exact positions (no minor ticks).

public void SetYTickMarks(
    double[] tickPlacement
);

See also ...

SharpPlot Members | SharpPlot.SetYTickMarks Method


SharpPlot 3.71 User Manual: SetYTickMarks Method (Int32[])

SharpPlot.SetYTickMarks Method (Int32[])

Set Y tick marks to integer positions (no minor ticks).

public void SetYTickMarks(
    int[] tickPlacement
);

See also ...

SharpPlot Members | SharpPlot.SetYTickMarks Method


SharpPlot 3.71 User Manual: SetYZones Method

SharpPlot.SetYZones Method

Set Y zone.

Example

sp.SetYZones(new Zone(40,60,Color.Orange,FillStyle.GradientTop));

Overloads

  • public void SetYZones(Zone value);
  • public void SetYZones(Zone[] value);

See also ...

SharpPlot Members | Zone Struct


SharpPlot 3.71 User Manual: SetYZones Method (Zone[])

SharpPlot.SetYZones Method (Zone[])

Set Y zone from an array of Zone definitions.

public void SetYZones(
    Zone[] value
);

See also ...

SharpPlot Members | SharpPlot.SetYZones Method


SharpPlot 3.71 User Manual: SetYZones Method (Zone)

SharpPlot.SetYZones Method (Zone)

Set a single Zone definition.

public void SetYZones(
    Zone value
);

See also ...

SharpPlot Members | SharpPlot.SetYZones Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method

SharpPlot.SetZCaptionFont Method

Set Z Caption font given any of fontname, point-size, style, color.

Example

sp.SetZCaptionFont("Times",10);

Overloads

  • public void SetZCaptionFont(string fontName);
  • public void SetZCaptionFont(double fontSize);
  • public void SetZCaptionFont(Color fontColor);
  • public void SetZCaptionFont(FontStyle fontStyle);
  • public void SetZCaptionFont(string fontName,double fontSize);
  • public void SetZCaptionFont(string fontName,Color fontColor);
  • public void SetZCaptionFont(double fontSize,Color fontColor);
  • public void SetZCaptionFont(string fontName,FontStyle fontStyle);
  • public void SetZCaptionFont(FontStyle fontStyle,Color fontColor);
  • public void SetZCaptionFont(string fontName,double fontSize,Color fontColor);
  • public void SetZCaptionFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetZCaptionFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetZCaptionFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String,Double,FontStyle,Color)

SharpPlot.SetZCaptionFont Method (String,Double,FontStyle,Color)

Set Z Caption font from fontname, point-size, style and color.

public void SetZCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (Double,Color)

SharpPlot.SetZCaptionFont Method (Double,Color)

Set Z Caption font point-size and color.

public void SetZCaptionFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String,Double,Color)

SharpPlot.SetZCaptionFont Method (String,Double,Color)

Set Z Caption font name, point-size and color.

public void SetZCaptionFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String,FontStyle,Color)

SharpPlot.SetZCaptionFont Method (String,FontStyle,Color)

Set Z Caption font name, style and color.

public void SetZCaptionFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String,Double,FontStyle)

SharpPlot.SetZCaptionFont Method (String,Double,FontStyle)

Set Z Caption font name, point-size and style.

public void SetZCaptionFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String)

SharpPlot.SetZCaptionFont Method (String)

Set Z Caption font fontname only.

public void SetZCaptionFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (Double)

SharpPlot.SetZCaptionFont Method (Double)

Set Z Caption font point-size only.

public void SetZCaptionFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (Color)

SharpPlot.SetZCaptionFont Method (Color)

Set Z Caption font Color only.

public void SetZCaptionFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (FontStyle)

SharpPlot.SetZCaptionFont Method (FontStyle)

Set Z Caption font style only.

public void SetZCaptionFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String,Double)

SharpPlot.SetZCaptionFont Method (String,Double)

Set Z Caption font name and point-size.

public void SetZCaptionFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String,FontStyle)

SharpPlot.SetZCaptionFont Method (String,FontStyle)

Set Z Caption font name and style.

public void SetZCaptionFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (String,Color)

SharpPlot.SetZCaptionFont Method (String,Color)

Set Z Caption font name and color.

public void SetZCaptionFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZCaptionFont Method (FontStyle,Color)

SharpPlot.SetZCaptionFont Method (FontStyle,Color)

Set Z Caption font style and color.

public void SetZCaptionFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZCaptionFont Method


SharpPlot 3.71 User Manual: SetZDataRange Method

SharpPlot.SetZDataRange Method

You can call any of the plotting routines with an array of arrays to have multiple series ranged and plotted at one call. However it is often more convenient to make several calls, one for each series. This method allows you to pass in all your z-axis data arrays in advance, and notes the extreme values for use when the first plot is drawn.

Example

sp.SetZDataRange(col_Yield);

Overloads

  • public void SetZDataRange(double value);
  • public void SetZDataRange(int[] value);
  • public void SetZDataRange(double[] value);
  • public void SetZDataRange(int[][] valueset);
  • public void SetZDataRange(double[][] valueset);

All the other axis properties (range, tick-interval etc) continue to apply as normal.

See also ...

SharpPlot.SetZRange Method


SharpPlot 3.71 User Manual: SetZDataRange Method (Double[])

SharpPlot.SetZDataRange Method (Double[])

Set Z data range given a double vector.

public void SetZDataRange(
    double[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetZDataRange Method


SharpPlot 3.71 User Manual: SetZDataRange Method (Double)

SharpPlot.SetZDataRange Method (Double)

Set Z data range to a single value.

public void SetZDataRange(
    double value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetZDataRange Method


SharpPlot 3.71 User Manual: SetZDataRange Method (Int32[])

SharpPlot.SetZDataRange Method (Int32[])

Set Z data range to the min and max of an integer array.

public void SetZDataRange(
    int[] value
);
value
Data to be checked for smallest and largest values.

See also ...

SharpPlot Members | SharpPlot.SetZDataRange Method


SharpPlot 3.71 User Manual: SetZDataRange Method (Double[][])

SharpPlot.SetZDataRange Method (Double[][])

Set Z data range to range several numeric arrays.

public void SetZDataRange(
    double[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetZDataRange Method


SharpPlot 3.71 User Manual: SetZDataRange Method (Int32[][])

SharpPlot.SetZDataRange Method (Int32[][])

Set Z data range to range several integer arrays.

public void SetZDataRange(
    int[][] valueset
);
valueset
[todo]

See also ...

SharpPlot Members | SharpPlot.SetZDataRange Method


SharpPlot 3.71 User Manual: SetZDatumLines Method

SharpPlot.SetZDatumLines Method

Set Z-axis datum line(s).

Example

sp.SetZDatumLines(new int[] {50,100});  // Significant contours
sp.SetDatumLineTags("Low,High");        // Labels for them

Overloads

  • public void SetZDatumLines();
  • public void SetZDatumLines(double value);
  • public void SetZDatumLines(int[] value);
  • public void SetZDatumLines(double[] value);

These will be drawn around the walls of the 3D charts (Cloud, Tower etc) and as extra contours in 2D contour plots. If contours are drawn on a fitted 3D surface, the datum lines will also be drawn across the surface.

See also ...

SharpPlot.SetDatumLineTags Method | SharpPlot.SetDatumTagFont Method


SharpPlot 3.71 User Manual: SetZDatumLines Method (Double[])

SharpPlot.SetZDatumLines Method (Double[])

Set Z datum line(s) given a double vector.

public void SetZDatumLines(
    double[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetZDatumLines Method


SharpPlot 3.71 User Manual: SetZDatumLines Method (Double)

SharpPlot.SetZDatumLines Method (Double)

Set Z datum line(s) to a single value.

public void SetZDatumLines(
    double value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetZDatumLines Method


SharpPlot 3.71 User Manual: SetZDatumLines Method (Int32[])

SharpPlot.SetZDatumLines Method (Int32[])

Set Z datum line(s) to a integer array.

public void SetZDatumLines(
    int[] value
);
value
Tick lengths as a percentage of default or exact length in points.

See also ...

SharpPlot Members | SharpPlot.SetZDatumLines Method


SharpPlot 3.71 User Manual: SetZDatumLines Method

SharpPlot.SetZDatumLines Method

Reset Z datum line(s) to default.

public void SetZDatumLines();

See also ...

SharpPlot Members | SharpPlot.SetZDatumLines Method


SharpPlot 3.71 User Manual: SetZLabelFont Method

SharpPlot.SetZLabelFont Method

Set Z label font given any of fontname, point-size, style, color.

Example

sp.SetZLabelFont("Arial,sans",9.5,Color.Navy);

Overloads

  • public void SetZLabelFont(string fontName);
  • public void SetZLabelFont(double fontSize);
  • public void SetZLabelFont(Color fontColor);
  • public void SetZLabelFont(FontStyle fontStyle);
  • public void SetZLabelFont(string fontName,double fontSize);
  • public void SetZLabelFont(string fontName,Color fontColor);
  • public void SetZLabelFont(double fontSize,Color fontColor);
  • public void SetZLabelFont(string fontName,FontStyle fontStyle);
  • public void SetZLabelFont(FontStyle fontStyle,Color fontColor);
  • public void SetZLabelFont(string fontName,double fontSize,Color fontColor);
  • public void SetZLabelFont(string fontName,FontStyle fontStyle,Color fontColor);
  • public void SetZLabelFont(string fontName,double fontSize,FontStyle fontStyle);
  • public void SetZLabelFont(string fontName,double fontSize,FontStyle fontStyle,Color fontColor);

See also ...

SharpPlot Members | SharpPlot.SetLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String,Double,FontStyle,Color)

SharpPlot.SetZLabelFont Method (String,Double,FontStyle,Color)

Set Z label font from fontname, point-size, style and color.

public void SetZLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (Double,Color)

SharpPlot.SetZLabelFont Method (Double,Color)

Set Z label font point-size and color.

public void SetZLabelFont(
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String,Double,Color)

SharpPlot.SetZLabelFont Method (String,Double,Color)

Set Z label font name, point-size and color.

public void SetZLabelFont(
    string fontName,
    double fontSize,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String,FontStyle,Color)

SharpPlot.SetZLabelFont Method (String,FontStyle,Color)

Set Z label font name, style and color.

public void SetZLabelFont(
    string fontName,
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String,Double,FontStyle)

SharpPlot.SetZLabelFont Method (String,Double,FontStyle)

Set Z label font name, point-size and style.

public void SetZLabelFont(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String)

SharpPlot.SetZLabelFont Method (String)

Set Z label font fontname only.

public void SetZLabelFont(
    string fontName
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (Double)

SharpPlot.SetZLabelFont Method (Double)

Set Z label font point-size only.

public void SetZLabelFont(
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (Color)

SharpPlot.SetZLabelFont Method (Color)

Set Z label font Color only.

public void SetZLabelFont(
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (FontStyle)

SharpPlot.SetZLabelFont Method (FontStyle)

Set Z label font style only.

public void SetZLabelFont(
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String,Double)

SharpPlot.SetZLabelFont Method (String,Double)

Set Z label font name and point-size.

public void SetZLabelFont(
    string fontName,
    double fontSize
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String,FontStyle)

SharpPlot.SetZLabelFont Method (String,FontStyle)

Set Z label font name and style.

public void SetZLabelFont(
    string fontName,
    FontStyle fontStyle
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (String,Color)

SharpPlot.SetZLabelFont Method (String,Color)

Set Z label font name and color.

public void SetZLabelFont(
    string fontName,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabelFont Method (FontStyle,Color)

SharpPlot.SetZLabelFont Method (FontStyle,Color)

Set Z label font style and color.

public void SetZLabelFont(
    FontStyle fontStyle,
    Color fontColor
);

See also ...

SharpPlot Members | SharpPlot.SetZLabelFont Method


SharpPlot 3.71 User Manual: SetZLabels Method

SharpPlot.SetZLabels Method

Set text items for each z-tickmark.

public void SetZLabels(
    string[] labels
);

Example

sp.SetZLabels(new string[]{"One","Two","Three"});

Note that the Z-axis does not support multi-line labels.

Overloads

  • public void SetZLabels(string item);
  • public void SetZLabels(string[] value);

See also ...

Formatting text with simple HTML tags | SharpPlot Members


SharpPlot 3.71 User Manual: SetZLabels Method (String[])

SharpPlot.SetZLabels Method (String[])

Set Z labels from an array of strings.

public void SetZLabels(
    string[] value
);

See also ...

SharpPlot Members | SharpPlot.SetZLabels Method


SharpPlot 3.71 User Manual: SetZLabels Method (String)

SharpPlot.SetZLabels Method (String)

Use first item only.

public void SetZLabels(
    string item
);

See also ...

SharpPlot Members | SharpPlot.SetZLabels Method


SharpPlot 3.71 User Manual: SetZRange Method

SharpPlot.SetZRange Method

Set Z axis range given one or two elements.

Example

sp.SetZRange(0,200);

Overloads

  • public void SetZRange();
  • public void SetZRange(double max);
  • public void SetZRange(double min,double max);

See also ...

Exact fit of Axis Range | Force zero to include axis origin | SharpPlot Members


SharpPlot 3.71 User Manual: SetZRange Method (Double,Double)

SharpPlot.SetZRange Method (Double,Double)

Set Z axis range minimum and maximum values.

public void SetZRange(
    double min,
    double max
);
min
[todo]
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetZRange Method


SharpPlot 3.71 User Manual: SetZRange Method (Double)

SharpPlot.SetZRange Method (Double)

Set Z axis range maximum value only.

public void SetZRange(
    double max
);
max
[todo]

See also ...

SharpPlot Members | SharpPlot.SetZRange Method


SharpPlot 3.71 User Manual: SetZRange Method

SharpPlot.SetZRange Method

Reset Z axis range to default.

public void SetZRange();

See also ...

SharpPlot Members | SharpPlot.SetZRange Method


SharpPlot 3.71 User Manual: SetZTickMarks Method

SharpPlot.SetZTickMarks Method

Set Z tick marks given a tickmark specification.

Example

sp.SetZTickMarks(100); // Major interval

Overloads

  • public void SetZTickMarks(double majorInterval);
  • public void SetZTickMarks(int[] tickPlacement);
  • public void SetZTickMarks(double[] tickPlacement);
  • public void SetZTickMarks(double majorInterval,int minorTickCount);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetZTickMarks Method (Double)

SharpPlot.SetZTickMarks Method (Double)

Set Z tick marks major tick interval.

public void SetZTickMarks(
    double majorInterval
);

See also ...

SharpPlot Members | SharpPlot.SetZTickMarks Method


SharpPlot 3.71 User Manual: SetZTickMarks Method (Double,Int32)

SharpPlot.SetZTickMarks Method (Double,Int32)

Set Z tick marks major interval and minor count.

public void SetZTickMarks(
    double majorInterval,
    int minorTickCount
);

See also ...

SharpPlot Members | SharpPlot.SetZTickMarks Method


SharpPlot 3.71 User Manual: SetZTickMarks Method (Double[])

SharpPlot.SetZTickMarks Method (Double[])

Set Z tick marks to exact positions (no minor ticks).

public void SetZTickMarks(
    double[] tickPlacement
);

See also ...

SharpPlot Members | SharpPlot.SetZTickMarks Method


SharpPlot 3.71 User Manual: SetZTickMarks Method (Int32[])

SharpPlot.SetZTickMarks Method (Int32[])

Set Z tick marks to integer positions (no minor ticks).

public void SetZTickMarks(
    int[] tickPlacement
);

See also ...

SharpPlot Members | SharpPlot.SetZTickMarks Method


SharpPlot 3.71 User Manual: SetZZones Method

SharpPlot.SetZZones Method

Set Z zone given one or more Zone definitions.

Example

sp.SetZZones(new Zone(90,110,Color.Red));

Overloads

  • public void SetZZones(Zone value);
  • public void SetZZones(Zone[] value);

See also ...

SharpPlot Members


SharpPlot 3.71 User Manual: SetZZones Method (Zone)

SharpPlot.SetZZones Method (Zone)

Set a single Zone definition.

public void SetZZones(
    Zone value
);

See also ...

SharpPlot Members | SharpPlot.SetZZones Method


SharpPlot 3.71 User Manual: SetZZones Method (Zone[])

SharpPlot.SetZZones Method (Zone[])

Set Z zone given one or more Zone definitions.

public void SetZZones(
    Zone[] value
);

See also ...

SharpPlot Members | SharpPlot.SetZZones Method


SharpPlot 3.71 User Manual: SplitBy Method

SharpPlot.SplitBy Method

Enables series to be split into multiple series according to some criterion prior to plotting. May be called more than once to split according to multiple criterions.

If categories are not provided, then the split series use the unique values in the order in which they appear.

If categories are provided, then they determine the split series order. Integer values for string categories are expected to range from 1 to N where N is the number of categories. Boolean values map true to the first category and false to the second category (any other category will therefore be empty)

SplitBy generally sets relevant text (unless explicitly set by user) such as Series name, Key text to the categories of the split.

Example

sp.SplitBy(new int[]{2,1,1,1,2}); // first and last items are run in a separate series, before the middle values
sp.SplitBy(new int[]{2,1,1,1,2}, new int[]{1,2}); // force to run the middle series first, then the edge items
sp.SplitBy(new int[]{2,1,3,1,2}, new int[]{1,2}); // third item is excluded from series (has no matching category)

See the tutorial on grouping and splitting data for more examples.

Overloads

  • public void SplitBy(int[] values,int[] categories);
  • public void SplitBy(int[] values);
  • public void SplitBy(int[] values,string[] categories);
  • public void SplitBy(string[] values,string[] categories);
  • public void SplitBy(string[] values);
  • public void SplitBy(bool[] values,bool[] categories);
  • public void SplitBy(bool[] values,string[] categories);
  • public void SplitBy(bool[] values);

See also ...

Grouping and Splitting database data | SharpPlot Members


SharpPlot 3.71 User Manual: SplitBy Method (Int32[],Int32[])

SharpPlot.SplitBy Method (Int32[],Int32[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    int[] values,
    int[] categories
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: SplitBy Method (Int32[])

SharpPlot.SplitBy Method (Int32[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    int[] values
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: SplitBy Method (Int32[],String[])

SharpPlot.SplitBy Method (Int32[],String[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    int[] values,
    string[] categories
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: SplitBy Method (String[],String[])

SharpPlot.SplitBy Method (String[],String[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    string[] values,
    string[] categories
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: SplitBy Method (String[])

SharpPlot.SplitBy Method (String[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    string[] values
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: SplitBy Method (Boolean[],Boolean[])

SharpPlot.SplitBy Method (Boolean[],Boolean[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    bool[] values,
    bool[] categories
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: SplitBy Method (Boolean[],String[])

SharpPlot.SplitBy Method (Boolean[],String[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    bool[] values,
    string[] categories
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: SplitBy Method (Boolean[])

SharpPlot.SplitBy Method (Boolean[])

Enables data to be split according to some criterion prior to plotting.

public void SplitBy(
    bool[] values
);

See also ...

SharpPlot Members | SharpPlot.SplitBy Method


SharpPlot 3.71 User Manual: UseCmyk

SharpPlot.UseCmyk

Create a color using the CMYK model. This allows full control over the inks used by PostScript printers if the output is saved in EPS or PDF formats. All other formats simply convert the chosen color to RGB for screen display.

Example

  sp.SetBackground(sp.UseCmyk(0,2,20,0),FillStyle.Solid,0);

  sp.Heading = "Check out Alternate Colour Models";
  sp.Subheading = "This should look very like the main heading";

  Color darkolive = sp.UseCmyk(9,0,24,58);

  sp.SetHeadingFont("Times New Roman",16,FontStyle.Italic,darkolive);
  sp.SetSubheadingFont("Times",12,FontStyle.Regular,Color.DarkOliveGreen);

Overloads

  • public Color UseCmyk(int c,int m,int y);
  • public Color UseCmyk(double c,double m,double y);
  • public Color UseCmyk(int c,int m,int y,int k);
  • public Color UseCmyk(double c,double m,double y,double k);

Returns a standard Color object encoding the required CMYK values. This is used directly by EPS and PDF output (both of which support the CMYK color space) or converted back to RGB for screen display by all other formats. The exact colors shown on screen may vary depending on the software used to view the file.

CMYK-encoded colors will be encoded as ARGB with alpha<9. Therefore transparency lower than 9 should not be used in SharpPlot colors, otherwise they will be wrongfully interpreted as CMYK levels.

See also ...

The CMYK color model


SharpPlot 3.71 User Manual: UseCmyk Method (Int32,Int32,Int32)

SharpPlot.UseCmyk Method (Int32,Int32,Int32)

Percentages of (0-100) each ink (no black).

public Color UseCmyk(
    int c,
    int m,
    int y
);
c
Proportion of Cyan ink.
m
Proportion of Magenta ink.
y
Proportion of Yellow ink.
return value
Color structure containg ink levels rather than ARGB values.

See also ...

SharpPlot Members | SharpPlot.UseCmyk


SharpPlot 3.71 User Manual: UseCmyk Method (Double,Double,Double)

SharpPlot.UseCmyk Method (Double,Double,Double)

Proportions (0-1) of each ink (no black).

public Color UseCmyk(
    double c,
    double m,
    double y
);
c
Proportion of Cyan ink.
m
Proportion of Magenta ink.
y
Proportion of Yellow ink.
return value
Color structure containg ink levels rather than ARGB values.

See also ...

SharpPlot Members | SharpPlot.UseCmyk


SharpPlot 3.71 User Manual: UseCmyk Method (Int32,Int32,Int32,Int32)

SharpPlot.UseCmyk Method (Int32,Int32,Int32,Int32)

Percentages (0-100) of each ink.

public Color UseCmyk(
    int c,
    int m,
    int y,
    int k
);
c
Proportion of Cyan ink.
m
Proportion of Magenta ink.
y
Proportion of Yellow ink.
k
Proportion of Black ink.
return value
Color structure containg ink levels rather than ARGB values.

See also ...

SharpPlot Members | SharpPlot.UseCmyk


SharpPlot 3.71 User Manual: UseCmyk Method (Double,Double,Double,Double)

SharpPlot.UseCmyk Method (Double,Double,Double,Double)

Proportions (0-1) of each ink.

public Color UseCmyk(
    double c,
    double m,
    double y,
    double k
);
c
Proportion of Cyan ink.
m
Proportion of Magenta ink.
y
Proportion of Yellow ink.
k
Proportion of Black ink.
return value
Color structure containg ink levels rather than ARGB values.

See also ...

SharpPlot Members | SharpPlot.UseCmyk


SharpPlot 3.71 User Manual: SharpPlot Structures

SharpPlot Structures

SharpPlot uses the following structures :

HotspotInfo Struct
This structure is used to pass details of chart hotspots between various utilities in the PageMap class. It is likely that a programmer will find it very helpful when debugging a Gui application to have the contents written to the console to check that the mouse really did hit the expected series item.
KeyDefinition Struct
Definition structure for data-placeholder in chart keys. Mostly used internally, but may be defined by the calling application to customise legend placeholders.
Marker Struct
This structures defines Markers for charts. There are a number of built-in, standard markers, but custom markers can also created from arbitrary images, paths, or text.
Zone Struct
Structure to define a shaded region which appears as part of the chart background. Zones may be used on any conventional 2-dimensional chart (see the Gantt tutorials) or on Dial charts to mark out significant areas on the scale. Each Zone has a start and stop value, a color and an optional fillstyle.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: HotspotInfo Struct

HotspotInfo Struct

This structure is used to pass details of chart hotspots between various utilities in the PageMap class. It is likely that a programmer will find it very helpful when debugging a Gui application to have the contents written to the console to check that the mouse really did hit the expected series item.

For advanced applications (for example graphical editing by dragging markers or bars) it holds the detail necessary for developing an appropriate Gui front end. For simple applications, it will identify which item in the data series the user clicked on, which could be used to drill to appropriate detail, or simply highlight the point.

public struct HotspotInfo

Example

  pm = sp.RenderPageMap();
  int hix = pm.FindHotspot(200,120);
  HotspotInfo hi = pm.GetHotspotInfo(hix);
  System.Console.WriteLine(hi.ToString());

Chart=Bar1, Series=Hats, Item=2, Shape=Bar, Locator=186.9 52 216 193.2 0

HotspotInfo Properties (all Readonly)

Chart
Name of chart (set by SetChartName or auto-generated) as a string
Series
Name of series (set by SetSeriesNames or auto-generated) as a string
Item
Index of selected data item (1-origin) in the series
Locator
Vector of doubles (depending on item shape) which define it on the page
Shape
HotspotType enumeration giving the item shape (HotspotType.None if no hotspot detected)

For a HotspotType.Marker, the Locator gives 6 numbers – the (x,y) location of the marker and of its immediate neighbours (or of itself again if it is the first or last of the set). For a HotspotType.Bar it gives the bounding box as (x,y,x,y) lower-left, top-right. For a HotspotType.Wedge it gives (x,y,innerradius,outerradius,startangle,endangle) where the angles measure in degrees anticlockwise from the 3:00 line. For a HotspotType.Segment it gives (origin x, origin y, destination x, destination y).

All text-based hotspots (headings, axis-labels) are HotspotType.Bar and have a bounding rectangle, so the user can click anywhere in the region containing the text.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Active charts in GUI Applications | HotspotType Enumeration


SharpPlot 3.71 User Manual: KeyDefinition Struct

KeyDefinition Struct

Definition structure for data-placeholder in chart keys. Mostly used internally, but may be defined by the calling application to customise legend placeholders.

public struct KeyDefinition

Public Constructors

Create a custom key placeholder (type 1 = line/marker, type 2 = block key for surface or bar, type 3 = stepped line).

Block key uses type=2 and requires colour, and optional FillStyle (solid fill is the default):

public KeyDefinition(
   int type,
   Color color,
   FillStyle pattern
);

You might also want to specify the edge of the block

public KeyDefinition(
   int type,
   Color color,
   FillStyle pattern,
   double edgeNib,
   Color edgeColor,
   LineStyle edgeLine
);

Line/marker key is always type=1 and requires Colour,LineStyle and PenWidth. If MarkerSyle is omitted, no markers are drawn.

public KeyDefinition(
   int type,
   Color color,
   LineStyle line
   double penwidth
   Marker marker
);

You may also use this constructor to make a Stepped line key (type=3) suitable for Stepcharts.

Example

// Make 2 custom legend placeholders
 key1 = new KeyDefinition(1,Color.Red,LineStyle.Solid,0.8,Marker.SmallBullet);
 key2 = new KeyDefinition(1,Color.Navy,LineStyle.Solid,0.8,Marker.Ring);
// Use them in a hand-made legend block
 sp.DrawKey(2,10,new KeyDefinition[]{key1,key2});

This creates two placeholders suitable for a chart with lines and markers.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.DrawKey Method


SharpPlot 3.71 User Manual: Marker Struct

Marker Struct

This structures defines Markers for charts. There are a number of built-in, standard markers, but custom markers can also created from arbitrary images, paths, or text.

The 21 built-in markers are listed below (these can be scaled to any size using the SetMarkerScales method) or you may create your own markers from suitable image files (typically GIF images on disk), SVG symbols, XAML paths, or any text character in a suitable font (e.g. WingDings).

public struct Marker

Public Static Properties

Ball | Marker is a large 3D-effect circle
Bar | Marker is a short vertical line
Block | Marker is a filled square
Bullet | Marker is a medium-sized filled circle
Circle | Marker is an open circle
Cross | Marker is a multiply sign
Del | Marker is a triangle on its point
Diamond | Marker is an open diamond
Dot | Marker is a tiny (approx 1 pixel) dot
DownTick | Marker is a downward tick
Hyphen | Marker is a short horizontal line
Invisible | Marker is not drawn
LeftTick | Marker is a left-aligned tick
Lozenge | Marker is a filled diamond
Node | Marker is a small 3D-effect circle
Plus | Marker is a plus sign
RightTick | Marker is a right-aligned tick
Ring | Marker is a large open circle
SmallBullet | Marker is a small filled circle
Triangle | Marker is a triangle on its base
UpTick | Marker is an upward tick

Public Constructor

Creates a custom marker from a character, or URI to an included SVG symbol or image file.

public Marker(
   string sourceName  // Image is also accepted here
);

Example

Marker ms = new Marker("wingdings,9,#146");
Marker hex = new Marker("{ m -3,0 l 2,2 2,0 2,-2 -2,-2 -2,0 z }");
sp.SetMarkers(new Marker[]{Marker.Cross,Marker.Lozenge,ms,hex});

Creating Custom Markers from Text

The WingDings font is an excellent source of extra marker symbols, and SharpPlot makes it very easy to create markers from any character in any available font. Note that character markers may not work on your user’s browser in the VML or SVG formats unless the correct font is installed. For image formats, the font only needs to be installed on the server.

The string argument to Marker takes three elements, separated by commas. These give:

  • the font name, with optional capitalisation but containing any embedded spaces.
  • the character size to form markers for markerscale=1 (they will be scaled as required).
  • the character or short string that forms the marker. This will be horizontally and vertically centered at each data point. Characters may be given literally (for example in the definition “Arial,10,pH”) or as the decimal code following a # symbol.

Creating Custom Markers from Images

It is also possible to reference small image files as markers in which case you can simply give the URL of the marker file, with an optional ‘natural size’ to scale it:

sp.SetMarkers(new Marker("apple.gif=12,12"));

By default, the image will be scaled to (16,16) where the marker scale = 1. It is obviously important to keep the width and height of the included image in the same ratio as the actual width and height of the referenced file if you override the size.

For charts to be rendered as Raster output, it may be convenient to pass an existing Image object here:

public Marker(
   Image image
);

In this case the size is completely determined by the width and height of the object, so you may need to scale it before passing it to SharpPlot. Using very large markers may make the legend align poorly – be warned!

Example

Marker bug = new Marker(new Bitmap("ladybug.png"));
sp.SetMarkers(bug);

The image will be used at actual size unless the MarkerScale array is set to scale them as needed.

You may combine both methods, giving an Image for raster use and a source URL for the same (or a different) image for use in vector output:

Marker bug = new Marker(new Bitmap("ladybug.png"),"http://serverpath/ladybug16.gif");
sp.SetMarkers(bug);

Creating Custom Markers from Paths

The XAML specification has a simple notation for drawing any vector path, so this is what SharpPlot uses to allow you to build any vector path as a marker. This notation works in all output formats, so is preferred to the symbol reference which is supported only by SVG.

Some examples of simple paths are:

hex = "{ m -3,0 l 2,2 2,0 2,-2 -2,-2 -2,0 z }";  // stroke is implied but note the closepath!
box = "{ m -2 -2 v 4 h 4 v -4 z }";  // Minimalist square
duck = "{  m -11 4 c 1.95 -1.65 3.66 -1.89 6.81 -0.33 3.12  ....  5.91} F";   // Filled duck

The path is enclosed in braces, and the commands you can use are:

m
relative moveto
l
relative lineto
c
relative curveto
v
relative vertical lineto
h
relative horizontal lineto
z
closepath (join the figure to its startpoint cleanly)
S
stroke the finished path (implied if omitted)
F
fill the finished path

Pairs of co-ordinates may be separated by commas or spaces, and the path command does not need to be repeated when there is a long sequence of similar commands (typically a polyline). Note that only the relative path commands may be used and that the marker is drawn with the (0,0) point at the data – it is up to you to get a good visual balance for complex symbols such as the duck.

Filled symbols will be outlined in the current background color if the Halo style has been set on the chart.

Creating Custom Markers from SVG Symbols (SVG output only)

For SVG output, it is possible to include the code for any SVG symbol inline in the output stream, then refer to the included symbol by its id:

sp.IncludeSource(myDuck);
sp.SetMarkers(new Marker[]{Marker.Lozenge,new Marker("#duck=32,24")});

where the first few lines of the duck might be:

  <symbol id="duck" viewBox="0 0 3200 2400">
   <path d="
        M 424 1424
        C 619 1589 790 1613 1105 1457
        C 1417 1301 1474 1325 1564 1340
        C 1654 1352 1681 1388 1723 1355
        C 1867 1241 1684 836 1915 716
        C 2032 656 2164 704 2263 794
        C 2362 884 2446 1052 2647 1055
        C 2587 1190 2563 1202 2248 1190
        C 1933 1181 2014 1361 2185 1511
        C 2266 1589 2425 1712 2377 1898
        C 2329 2084 2119 2147 1888 2147
        C 1657 2147 1060 2117 832 2015
        C 622 1877 430 1547 424 1424 z"
         stroke="#000000"
         fill="Teal"
         stroke-width="20" />
 </symbol>

The proportions given in the viewbox should normally match the width and height given for the symbol in the definition.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.IncludeSource Method | SharpPlot.SetMarkers Method


SharpPlot 3.71 User Manual: Zone Struct

Zone Struct

Structure to define a shaded region which appears as part of the chart background. Zones may be used on any conventional 2-dimensional chart (see the Gantt tutorials) or on Dial charts to mark out significant areas on the scale. Each Zone has a start and stop value, a color and an optional fillstyle.

For xy-plots (scatterplots or bubblecharts) you may define a matching array of x-zones and y-zones to mark out arbitrary rectangular areas on the chart by using ZoneStyles.Intersect. These are shaded at the intersection of the zone pairs rather than spanning the axis range.

public struct Zone

Public Constructors

Creates a solid-filled shaded region.

public Zone(
   double startValue,
   double stopValue,
   Color regionColor
);

Creates a shaded region with given fill-style.

public Zone(
   double startValue,
   double stopValue,
   Color regionColor,
   FillStyle regionPattern
);

Creates a shaded region with given fill-style and zone-style

public Zone(
   double startValue,
   double stopValue,
   Color regionColor,
   FillStyle regionPattern,
   ZoneStyles regionStyle
);

Creates a solid region with given zone-style

public Zone(
   double startValue,
   double stopValue,
   Color regionColor,
   ZoneStyles regionStyle
);

Example

sp.SetXZones(new Zone(40,60,Color.Green,FillStyle.Opacity30));

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.SetIZones Method | SharpPlot.SetXZones Method | SharpPlot.SetYZones Method | ZoneStyles Enumeration


SharpPlot 3.71 User Manual: SharpPlot Enumerations

SharpPlot Enumerations

These lists are (mostly) flags which combine to set chart styles.

BarChartStyles Enumeration
Barchart Style (flags).
BoxPlotStyles Enumeration
Box and Whisker style (flags).
BubbleChartStyles Enumeration
Bubblechart Style (flags).
CaptionStyles Enumeration
Caption style (flags).
ChartType Enumeration
Chart types which may be used with DrawMultiple to create a trellis automatically.
CloudChartStyles Enumeration
Cloudchart Style (flags).
ContourPlotStyles Enumeration
Contourplot Style (flags).
DataStyles Enumeration
Data Style (flags).
DatumTagStyles Enumeration
Datum Tag Style (flags).
DialChartStyles Enumeration
Dial-chart Style (flags).
EquationStyles Enumeration
Placement and other options for model-fit equation (flags).
FootnoteStyles Enumeration
Footnote style (flags).
FrameStyles Enumeration
Frame style (flags).
GanttChartStyles Enumeration
Gantt chart style (flags).
GroupByFunction Enumeration
Alternative strategies for aggregating data (simple summation is the default).
HeadingStyles Enumeration
Heading style (flags).
HistogramStyles Enumeration
Histogram style (flags).
HotspotType Enumeration
Various types of hotspots reported by the active chart components.
IAxisStyles Enumeration
Inner-axis style (flags).
ITickStyles Enumeration
Inner-axis tickmark style (flags).
KeyStyles Enumeration
Key style (flags).
LabelStyles Enumeration
Label Style (flags).
LineGraphStyles Enumeration
Linegraph Style (flags).
MinMaxChartStyles Enumeration
Min-Max (Hi-Lo plot) Style (flags).
NoteStyles Enumeration
Note style (flags).
ParityStyles Enumeration
Parity plot style (flags).
PieChartStyles Enumeration
Piechart Style (flags).
PolarChartStyles Enumeration
Polarchart Style (flags).
ResetOptions Enumeration
Reset options (what persists through a reset)
ResponsePlotStyles Enumeration
Response surface Style (flags).
ScalebarStyles Enumeration
Scale bar style (flags).
ScatterPlotStyles Enumeration
Scatterplot Style (flags).
ScriptTarget Enumeration
Chart text elements which may be used as targets for JavaScript handlers or SVG attributes.
StepChartStyles Enumeration
Stepchart Style (flags).
TableStyles Enumeration
Table-chart Style (flags).
TowerChartStyles Enumeration
Towerchart style (flags).
TraceChartStyles Enumeration
Trace chart style (flags).
TreeMapStyles Enumeration
Tree map style (flags).
TrellisStyles Enumeration
Trellis Style (flags).
TriangleStyles Enumeration
Triangle chart style (flags).
ValueTagStyles Enumeration
Value-label style (flags).
VectorStyles Enumeration
Vector style (flags).
VennDiagramStyles Enumeration
Venn diagram style (flags).
XAxisStyles Enumeration
X-Axis style (flags).
XBarChartStyles Enumeration
Barchart Style (flags).
XTickStyles Enumeration
X-Axis tickmark style (flags).
YAxisStyles Enumeration
Y-Axis style (flags).
YTickStyles Enumeration
Y-Axis tickmark style (flags).
ZAxisStyles Enumeration
Z-Axis style (flags).
ZoneStyles Enumeration
Zone style (flags).
ZTickStyles Enumeration
Z-Axis tickmark style (flags).
NetworkMapStyles Enumeration
Styles for the SharpPlot.DrawNetworkMap method.

See Also

HotspotType enumeration

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: BarChartStyles Enumeration

BarChartStyles Enumeration

Barchart Style (flags).

[flags]
public enum BarChartStyles

Members

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FloatingBars | Floating bars (lowest bar of stack not drawn)
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
Logarithmic | Bars are drawn logarithmically
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
StackedBars | Stacked barcharts (data is accumulated)
TicksBetween | Tickmarks are drawn between bars or groups of bars
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.BarChartStyle Property | SharpPlot.DrawBarChart Method


SharpPlot 3.71 User Manual: BoxPlotStyles Enumeration

BoxPlotStyles Enumeration

Box and Whisker style (flags).

[flags]
public enum BoxPlotStyles

Members

CroppedAxes | Crops all chart elements at the axis boundary
DecileWhiskers | BoxWhisker indicates deciles with dotted lines
ErrorBars | Shows errorbars on Hi-Lo charts and boxplots
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Boxes are drawn horizontally
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
Plain | Omits median line from boxplots
TabularData | Array elements represent categories of data, not categorisations
TicksBetween | Tickmarks are drawn between bars or groups of bars

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.BoxPlotStyle Property | SharpPlot.DrawBoxPlot Method


SharpPlot 3.71 User Manual: BubbleChartStyles Enumeration

BubbleChartStyles Enumeration

Bubblechart Style (flags).

[flags]
public enum BubbleChartStyles

Members

AltitudeShading | Altitude shading is used with contour plots, bubble charts and response surfaces
AnnotateModel | Annotate model with computed equation
Clipped | Clip axes and all lines and markers at chart edge
Contours | Draw contour lines across data points
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Lines | Datapoints are connected with lines
Logarithmic | All chart axes are drawn logarithmically
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoMarkers | Do not draw markers at data points
OnTopModel | Modelfit is drawn ontop of data
OverlayGrid | Gridlines are drawn ontop of data
RadialScaling | Bubble charts scale using radius rather than area
ScaleBar | Atlitude-shaded bubble chart adds a nominal Z-Axis
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot.BubbleChartStyle Property | SharpPlot.DrawBubbleChart Method


SharpPlot 3.71 User Manual: CaptionStyles Enumeration

CaptionStyles Enumeration

Caption style (flags).

[flags]
public enum CaptionStyles

Members

FlatText | Flat text is used for 3D captions
LeftAlign | Left aligned caption
NoWrap | Captions are not wrapped automatically.
RightAlign | Right aligned caption

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.CaptionStyle Property


SharpPlot 3.71 User Manual: ChartType Enumeration

ChartType Enumeration

Chart types which may be used with DrawMultiple to create a trellis automatically.

public enum ChartType

Members

BarChart | Bar Chart
DialChart | Dial Chart
Histogram | Histogram
LineGraph | Line Graph
None | No chart
PieChart | Pie Chart
PolarChart | Polar Chart
ScatterPlot | Scatter Plot
VennDiagram | Venn Diagram
XBarChart | XBar Chart

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.DrawMultiple Method


SharpPlot 3.71 User Manual: CloudChartStyles Enumeration

CloudChartStyles Enumeration

Cloudchart Style (flags).

[flags]
public enum CloudChartStyles

Members

AltitudeShading | Altitude shading is used with cloud chart
Contours | Draw contour lines across data points
ContourTags | Contour lines are tagged with height values
Curves | Points are joined with smooth curves rather than straight lines
Fine | Altitude shading interpolated in fine detail (slow for vectorial rendering)
FlatText | Flat labels and captions are used on 3D charts
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers (improves 3D effect on Cloud charts)
Indexed | Data is indexed to the initial value = 100
Lines | Datapoints are connected with lines
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoMarkers | No markers are drawn (turns off default)
ProjectContours | Contours are drawn on the xy-plane in 3D charts
Risers | Draw risers to data points from axis or fitted model
ScaleBar | Altitude-shaded cloud chart adds a nominal Z-Axis
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
TiledSurface | Tile surfaces on response plots
TrendSurface | Compute trend surface (2D Gaussian smooth)
WallShading | Shade walls on all 3D charts
XYPlot | First column gives the X-values for LinePlot

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.CloudChartStyle Property | SharpPlot.DrawCloudChart Method


SharpPlot 3.71 User Manual: ContourPlotStyles Enumeration

ContourPlotStyles Enumeration

Contourplot Style (flags).

[flags]
public enum ContourPlotStyles

Members

AltitudeShading | Altitude shading is used with contour plot
Clipped | Clip axes and all lines and markers at chart edge
Coarse | No refinement is done to colors on altitude-shaded plots
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
Fine | Altitude shading interpolated in fine detail (slow for vectorial rendering)
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Lines | Datapoints are connected with lines
NoAxes | No axes are drawn on the chart
NoMarkers | Markers are not drawn at data points
NoTags | Contour lines are not tagged with height values
OverlayGrid | Gridlines are drawn ontop of data
ScaleBar | Altitude-shaded contour plot adds a nominal Z-Axis
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot.ContourPlotStyle Property | SharpPlot.DrawContourPlot Method


SharpPlot 3.71 User Manual: DataStyles Enumeration

DataStyles Enumeration

Data Style (flags).

[flags]
public enum DataStyles

Members

Relative | Relative data (values are accumulated)
Rows | Series are presented in rows, not columns

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot.DataStyle Property


SharpPlot 3.71 User Manual: DatumTagStyles Enumeration

DatumTagStyles Enumeration

Datum Tag Style (flags).

[flags]
public enum DatumTagStyles

Members

AtEnd | All tags are written centered at the chosen end of the line
Bottom | X-Tags are moved to the bottom of the line
Left | Y-Tags are moved to the left end of the line
Right | Y-Tags are moved to the right end of the line
Top | X-Tags are moved to the top of the line

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot.DatumTagStyle Property | SharpPlot.SetDatumLineTags Method


SharpPlot 3.71 User Manual: DialChartStyles Enumeration

DialChartStyles Enumeration

Dial-chart Style (flags).

[flags]
public enum DialChartStyles

Members

Anticlockwise | Scale on dialchart runs from right to left
ArrowLines | Draw arrows at ends of lines
WedgeZones | Use wedge zones on dialcharts rather than annular zones

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.DialChartStyle Property | SharpPlot.DrawDialChart Method


SharpPlot 3.71 User Manual: EquationStyles Enumeration

EquationStyles Enumeration

Placement and other options for model-fit equation (flags).

[flags]
public enum EquationStyles

Members

Absolute | Position is interpreted in points
AtEnd | Outside the line at the right-hand end
Below | Below the line
ForceOrigin | Force fitted line through the origin
Left | Left end of fitted line
LinearFit | Force a linear equation even if we have logarithmic axes
Middle | Middle of fitted line
Opaque | Opaque background to text
Percentage | Position is interpreted in percentage of axes
SpanData | Fitted line spans data range, not X-axis
Straddle | Straddling the line

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.EquationStyle Property


SharpPlot 3.71 User Manual: FootnoteStyles Enumeration

FootnoteStyles Enumeration

Footnote style (flags).

[flags]
public enum FootnoteStyles

Members

Center | Centered footnote
NoWrap | Footers are not wrapped automatically.
Right | Right-aligned footnote
RuledAbove | Footnote is ruled above

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.Footnote Property | SharpPlot.FootnoteStyle Property


SharpPlot 3.71 User Manual: FrameStyles Enumeration

FrameStyles Enumeration

Frame style (flags).

[flags]
public enum FrameStyles

Members

Boxed | Boxed frame
Filled | Filled with background colour
Rounded | Rounded corners
Shadowed | Shadowed box

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.FrameStyle Property


SharpPlot 3.71 User Manual: GanttChartStyles Enumeration

GanttChartStyles Enumeration

Gantt chart style (flags).

[flags]
public enum GanttChartStyles

Members

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.GanttChartStyle Property | SharpPlot.DrawGanttChart Method


SharpPlot 3.71 User Manual: GroupByFunction Enumeration

GroupByFunction Enumeration

Alternative strategies for aggregating data (simple summation is the default).

public enum GroupByFunction

Members

Average | Takes the arithmetic mean of the items in each category
Count | Counts the occurences of items in each category
Maximum | Finds the largest value in each category
Minimum | Finds the smallest value in each category
Sum | Totals the values in each category (default)

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.GroupBy Method


SharpPlot 3.71 User Manual: HeadingStyles Enumeration

HeadingStyles Enumeration

Heading style (flags).

[flags]
public enum HeadingStyles

Members

Bottom | Bottom-aligned heading
Left | Left-aligned heading
NoWrap | Headings are not wrapped automatically.
Opaque | Opaque background to heading text
Right | Right-aligned heading
RuledBelow | Heading is ruled below

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.Heading Property | SharpPlot.HeadingStyle Property | SharpPlot.Subheading Property


SharpPlot 3.71 User Manual: HistogramStyles Enumeration

HistogramStyles Enumeration

Histogram style (flags).

[flags]
public enum HistogramStyles

Members

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Mean | Histogram marks the mean value with a datumline
NormalCurve | Histogram shows a fitted Normal Distribution
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SDev1 | Histogram marks 1 StdDev with a datumline
SDev2 | Histogram marks 2 StdDev with a datumline
SDev3 | Histogram marks 3 StdDev with a datumline
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.HistogramStyle Property | SharpPlot.DrawHistogram Method


SharpPlot 3.71 User Manual: HotspotType Enumeration

HotspotType Enumeration

Various types of hotspots reported by the active chart components.

public enum HotspotType

This is used in the active chart components to hold details of any active regions on the chart. Typically these are associated with hints or tips for the individual data items.

Members

Marker | Chart marker (center, scale). Markers are detected when the cursor falls within 4px of the center, scaled up if the marker itself it scaled.
Bar | Chart bar (bounding box). Bars are detected when the cursor is within the bar, or is hovering up to 4px above the top.
Wedge | Pie sector (center x, center y, inner radius, outer radius in points, start angle, end angle in degrees). The cursor must be within the wedge for these to be reported.
Segment | Line segment (origin x, origin y, destination x, destination y). The cursor may be off the line by 1px in any direction.
ScriptTarget | Heading, labels and so on (always rectangular). The cursor must be within the rectangle that encloses the text.
PlotRegion | Rectangle defined by chart axes (bounding box). This is used to convert from physical to user co-ordinates when the cursor is over the chart.
OriginScale | Chart origin (x,y) and scale of xy-Axes relative to points
Gradient | Rectangle defining a gradient fill. Used to create appropriate gradients for pie sectors and other tricky shapes.
XAxisStyle | Indicator that x-axis labels are non-standard. Used to format the cursor tracker in the x-direction.
YAxisStyle | Indicator that y-axis labels are non-standard. Used to format the cursor tracker in the y-direction.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Active charts in GUI Applications | PageMap.FindHotspot Method


SharpPlot 3.71 User Manual: IAxisStyles Enumeration

IAxisStyles Enumeration

Inner-axis style (flags).

[flags]
public enum IAxisStyles

Members

ExactFit | Exact fit (no extra ticks added)
ForceZero | Force zero in axis
GridLines | Draw gridlines parallel to inner axis
NoLabels | No Labels
PlainAxis | Plain axis (no ticks or labels)

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.IAxisStyle Property


SharpPlot 3.71 User Manual: ITickStyles Enumeration

ITickStyles Enumeration

Inner-axis tickmark style (flags).

[flags]
public enum ITickStyles

Members

CrossingTicks | Ticks cross the axis
InsideTicks | Ticks are drawn inside the axis
NoTicks | No ticks are drawn

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.ITickStyle Property


SharpPlot 3.71 User Manual: KeyStyles Enumeration

KeyStyles Enumeration

Key style (flags).

[flags]
public enum KeyStyles

Members

Absolute | Position is interpreted in points
AutofitText | Shrink text to fit within given frame
Baseline | Baselined legend (on first line of text)
BottomAlign | Vertically bottom aligned key frame
Boxed | Boxed key
BoxFrame | Box given frame instead of text
CenterAlign | Horizontally center aligned key frame
InlineWithData | Legends are written inline with data
LeftAlign | Horizontally left aligned key frame
MiddleAlign | Vertically middle aligned key frame
NoKey | No key (always omit key)
NoWrap | Key text is not wrapped to margin
Percentage | Position is interpreted in percentage of axes
Plain | Plain (no markers) key
Reversed | Reversed order of legend items
RightAlign | Horizontally right aligned key frame
Rounded | Rounded key box
Shadowed | Shadowed key box
TopAlign | Vertically top aligned key frame
Vertical | Vertically arranged legend

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.KeyStyle Property | SharpPlot.DrawKey Method | SharpPlot.SetKeyText Method


SharpPlot 3.71 User Manual: LabelStyles Enumeration

LabelStyles Enumeration

Label Style (flags).

[flags]
public enum LabelStyles

Members

Center | Centered (on y-axis) labels
FlatText | Flat text is used for 3D labels
LeftAlign | Left-align coltitles on table charts
Middle | Middled (on x-axis) labels
NoWrap | Labels are not wrapped automatically.
Opaque | Opaque background to label text
RightAlign | Right-align coltitles on table charts

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.LabelStyle Property


SharpPlot 3.71 User Manual: LineGraphStyles Enumeration

LineGraphStyles Enumeration

Linegraph Style (flags).

[flags]
public enum LineGraphStyles

Members

AnnotateModel | Annotate model with computed equation
ArrowLines | Draw arrows at ends of lines
CellsCreated | Make cells at each marker for miniature plots
Clipped | Clip axes and all lines and markers at chart edge
CrispEdges | Turns off anti-aliasing on data lines
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
Filled | Lines are completed back to the start and shaded inside the region created
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
GrowthCurve | Growth curve (exponential) is computed
HaloMarkers | Halo all markers
Indexed | Data is indexed to the initial value = 100
Markers | Markers are drawn at data points
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
OnTopModel | Modelfit is drawn ontop of data
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SegmentLines | Break lines at missing values rather than drawing across the gap
SkipRepeats | Repeated y-values are eliminated (treated as missing values)
SkipRuns | Runs of identical y-values are eliminated (preserves the first and last of each run)
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
TrendLine | Compute trend line (Gaussian smooth)
ValueTags | Value tags are written for data items
XYPlot | First column gives the X-values for LinePlot

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.LineGraphStyle Property | SharpPlot.DrawLineGraph Method


SharpPlot 3.71 User Manual: MinMaxChartStyles Enumeration

MinMaxChartStyles Enumeration

Min-Max (Hi-Lo plot) Style (flags).

[flags]
public enum MinMaxChartStyles

Members

ArrowLines | Draw arrows at ends of lines
Clipped | Clip axes and lines and markers at chart edge
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
DriftMarkers | Mark only the far end of bounds (2nd series)
Envelope | Shade region within bounds
ErrorBars | Show errorbars on ranges
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
OverlayGrid | Gridlines are drawn ontop of data
Terminated | Draw current marker on both bounds
ValueTags | Value tags are written for data items
XYPlot | First column gives the X-values for LinePlot

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.MinMaxChartStyle Property | SharpPlot.DrawMinMaxChart Method


SharpPlot 3.71 User Manual: NoteStyles Enumeration

NoteStyles Enumeration

Note style (flags).

[flags]
public enum NoteStyles

Members

Absolute | Position is interpreted in points
Baseline | Baselined note box (on first line of text)
Bottom | Vertically bottom-aligned note text
Boxed | Boxed notes
CenterAlign | Horizontally centered note text
Cropped | Eliminates entire note if text will be clipped
Middle | Vertically middle-aligned note text
Opaque | Opaque text for notes
Percentage | Position is interpreted in percentage of axes
RightAlign | Horizontally right aligned note text
Rounded | Rounded box
Shadowed | Shadowed box
TopAlign | Vertically top aligned note text

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.NoteStyle Property | SharpPlot.DrawNote Method


SharpPlot 3.71 User Manual: ParityStyles Enumeration

ParityStyles Enumeration

Parity plot style (flags).

[flags]
public enum ParityStyles

Members

Absolute | Tolerances are given as constant values
Percentage | Tolerances are given as percentages
Proportion | Tolerances are given as a proportion of the prediction

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Parity plot


SharpPlot 3.71 User Manual: PieChartStyles Enumeration

PieChartStyles Enumeration

Piechart Style (flags).

[flags]
public enum PieChartStyles

Members

Absolute | Pie Center and Radius are in points
ChartX | Pie Center is in chart coordinates – Pie Radius is in X coordinates
ChartY | Pie Center is in chart coordinates – Pie Radius is in Y coordinates
FarthestFirst | Drawing order allows 3D extrusion
MergeInsideTags | Inside tags that don’t fit will be merged to XLabels
Percentage | Pie Center and Radius are in percentage of available area
Plain | Plain axes or value tags on piechart
RoseDiagram | Exploded pie sectors are drawn from centre to form a Rose Diagram
ShowAllLabels | Draw all XLabels even if they don’t fit the Frame
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.PieChartStyle Property | SharpPlot.DrawPieChart Method


SharpPlot 3.71 User Manual: PolarChartStyles Enumeration

PolarChartStyles Enumeration

Polarchart Style (flags).

[flags]
public enum PolarChartStyles

Members

ArrowLines | Draw arrows at ends of lines
ClockFace | Polar chart represents a 24-hour clock
CompassPlot | Treat X-values as degrees in Polar plots
Curves | Points are joined with smooth curves rather than straight lines
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
HollowCenter | Polar gridlines radiate from first tick rather than centre
Indexed | Data is indexed to the initial value = 100
Markers | Markers are drawn at data points
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
OriginMarker | Mark centre of polar plot with a bold dot
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SkipRepeats | Repeated y-values are eliminated (treated as missing values)
SkipRuns | Runs of identical y-values are eliminated (preserves the first and last of each run)
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
ValueTags | Value tags are written for data items
XYPlot | First column gives the X-values for LinePlot

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.PolarChartStyle Property | SharpPlot.DrawPolarChart Method


SharpPlot 3.71 User Manual: ResetOptions Enumeration

ResetOptions Enumeration

Reset options (what persists through a reset)

public enum ResetOptions

Members

CyclesPersist | Cycles persist across reset
KeysPersist | Keys persist across reset
SettingsPersist | Settings persist across reset

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.ResetOption Property


SharpPlot 3.71 User Manual: ResponsePlotStyles Enumeration

ResponsePlotStyles Enumeration

Response surface Style (flags).

[flags]
public enum ResponsePlotStyles

Members

AltitudeShading | Altitude shading is used with response surface
Contours | Draw contour lines across data points
ContourTags | Contour lines are tagged with height values
Curves | Points are joined with smooth curves rather than straight lines
Fine | Altitude shading interpolated in fine detail (slow for vectorial rendering)
FlatText | Flat labels and captions are used on 3D charts
ForceZero | Force zero (all axes include origin)
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Markers | Markers are drawn at data points
NoAxes | No axes are drawn on the chart
NoLines | No lines are drawn (turns off default)
Risers | Draw risers to data points from axis or fitted model
ScaleBar | Altitude shaded reponse plot adds a nominal Z-Axis
TiledSurface | Tile surfaces on response plots
WallShading | Shade walls on all 3D charts

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.ResponsePlotStyle Property | SharpPlot.DrawResponsePlot Method


SharpPlot 3.71 User Manual: ScalebarStyles Enumeration

ScalebarStyles Enumeration

Scale bar style (flags).

[flags]
public enum ScalebarStyles

Members

Bottom | Scalebar is placed horizontally below the chart
Left | Scalebar is drawn in the left margin or at the bottom left
Right | Scalebar is drawn in the right margin or below the chart at the right
Small | Scalebar is drawn in minimalist style

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Scale bar for Bubble and Altitude-shaded plots | SharpPlot Members | SharpPlot.ScalebarStyle Property


SharpPlot 3.71 User Manual: ScatterPlotStyles Enumeration

ScatterPlotStyles Enumeration

Scatterplot Style (flags).

[flags]
public enum ScatterPlotStyles

Members

AnnotateModel | Annotate model with computed equation
ArrowLines | Draw arrows at ends of lines
CellsCreated | Make cells at each marker for miniature plots
Clipped | Clip axes and all lines and markers at chart edge
Contours | Draw contour lines across data points
CroppedAxes | Crops all chart elements at the axis boundary
Curves | Points are joined with smooth curves rather than straight lines
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
GrowthCurve | Growth curve (exponential) is computed
HaloMarkers | Halo all markers
Lines | Datapoints are connected with lines
Logarithmic | All chart axes are drawn logarithmically
ModelFit | Compute and show regression line or surface
NoAxes | No axes are drawn on the chart
NoMarkers | No markers are drawn (turns off default)
OnTopModel | Modelfit is drawn ontop of data
OverlayGrid | Gridlines are drawn ontop of data
Parity | Axes are made square and a diagonal is drawn with tolerance lines
Risers | Draw risers to data points from axis or fitted model
TrendLine | Compute trend line (Gaussian smooth)
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.ScatterPlotStyle Property | SharpPlot.DrawScatterPlot Method


SharpPlot 3.71 User Manual: ScriptTarget Enumeration

ScriptTarget Enumeration

Chart text elements which may be used as targets for JavaScript handlers or SVG attributes.

public enum ScriptTarget

Members

Axes | X and Y Axes (together)
ClipRect | Clipping rectangle at chart axes
Footnote | Footer
Frame | Entire chart region
GridLines | Grid lines (both x and y)
Heading | Main chart title
Key | Key placeholder and text (array)
None | No target
Notes | Note frame
OriginScale | Coordinate system
PageLabels | Page labels (array)
PlotRegion | Area bounded by chart axes
Subhead | Secondary title
Values | Value tags (array)
XCaption | X-Axis Caption
XLabels | X-Axis Labels (array)
XYZones | XY rectangular zones (array)
XZones | X-axis zones (array)
YCaption | Y-Axis caption
YLabels | y-Axis labels (array)
YZones | Y-axis zones (array)

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Adding Links & Handlers | SharpPlot Members


SharpPlot 3.71 User Manual: StepChartStyles Enumeration

StepChartStyles Enumeration

Stepchart Style (flags).

[flags]
public enum StepChartStyles

Members

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
Risers | Draw risers to data points from axis or fitted model
SegmentLines | Break lines at missing values rather than drawing across the gap
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.StepChartStyle Property | SharpPlot.DrawStepChart Method


SharpPlot 3.71 User Manual: TableStyles Enumeration

TableStyles Enumeration

Table-chart Style (flags).

[flags]
public enum TableStyles

Members

Absolute | Position is interpreted in points
Bottom | Vertically bottom-align within available area
Boxed | Chart elements are boxed
Center | Horizontally centre-align within available area
FitHeight | Table is scaled to fit available height
FitWidth | Table is scaled to fit available width
GridLines | Draw gridlines (all axes)
Merged | Matching row-labels are merged
Middle | Vertically middle-align within available area
Opaque | Background area is filled with current background style
Right | Horizontally right-align within available area
Rounded | Boxes are drawn with rounded corners
Shadowed | Boxes are drawn with a drop-shadow
Spanned | Matching column labels are merged
UseHeaders | Tables pick up headers and footers

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.TableStyle Property | SharpPlot.DrawTable Method


SharpPlot 3.71 User Manual: TowerChartStyles Enumeration

TowerChartStyles Enumeration

Towerchart style (flags).

[flags]
public enum TowerChartStyles

Members

FlatText | Flat labels and captions are used on 3D charts
ForceZero | Force zero (all axes include origin)
GridLines | Draw gridlines (all axes)
Indexed | Data is indexed to the initial value = 100
NoAxes | No axes are drawn on the chart
Plain | Plain axes or value tags on piechart
WallShading | Shade walls on all 3D charts

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.TowerChartStyle Property | SharpPlot.DrawTowerChart Method


SharpPlot 3.71 User Manual: TraceChartStyles Enumeration

TraceChartStyles Enumeration

Trace chart style (flags).

[flags]
public enum TraceChartStyles

Members

CrispEdges | Turns off anti-aliasing on data lines
CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
KiteDiagram | Draw Trace chart in Kite-diagram form
NoAxes | No axes are drawn on the chart
SurfaceShading | Surface shading is used on linecharts, down to the axis or a given baseline
XYPlot | First column gives the X-values for LinePlot

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.TraceChartStyle Property | SharpPlot.DrawTraceChart Method


SharpPlot 3.71 User Manual: TreeMapStyles Enumeration

TreeMapStyles Enumeration

Tree map style (flags).

[flags]
public enum TreeMapStyles

Members

AltitudeShading | Altitude shading is used with contour plots, bubble charts and response surfaces
FrameAxes | Axes are completed to frame chart and all data is cropped
Logarithmic | Area of rectangles scales to log of data value in TreeMap
ScaleBar | Bubble charts and altitude-shaded Contour plots add a nominal Z-Axis
SquareRoot | Area of rectangles scales to square root of data value in TreeMap
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.TreeMapStyle Property | SharpPlot.DrawTreeMap Method


SharpPlot 3.71 User Manual: TrellisStyles Enumeration

TrellisStyles Enumeration

Trellis Style (flags).

[flags]
public enum TrellisStyles

Members

Gridlines | Trellis is gridded like a table
PagedMultiples | Paged multiples, rather than trellised
ResetAtEachCell | Reset all properties on completing each cell
SnakingCells | Cells go down, then across the trellis

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.TrellisStyle Property | SharpPlot.SetTrellis Method


SharpPlot 3.71 User Manual: TriangleStyles Enumeration

TriangleStyles Enumeration

Triangle chart style (flags).

[flags]
public enum TriangleStyles

Members

Curves | Points are joined with smooth curves rather than straight lines
Filled | Lines are completed back to the start and shaded inside the region created
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers (improves 3D effect on Cloud charts)
Labelled | Triangle plot is drawn with labelled sides
Lines | Datapoints are connected with lines
Markers | Markers are drawn at data points
Percentage | Triangle plots are labelled in the range 0-100
RedrawOutline | Chart outline is redrawn over filled areas
SideCaptions | Triangle captions are moved to the sides
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.TriangleStyle Property | SharpPlot.DrawTriangle Method


SharpPlot 3.71 User Manual: ValueTagStyles Enumeration

ValueTagStyles Enumeration

Value-label style (flags).

[flags]
public enum ValueTagStyles

Members

Angled | Angled text is used for values
Center | Values are horizontally centered above markers
CumulativeValues | Cumulative values are used on stacked barcharts
Duration | Numeric values are formatted to base-60
Hints | Values are set as status-line hints
InheritColor | Values inherit color from data points
Inside | Values are written inside bars, pie-sectors, markers
Left | Values are written to the left of markers
Middle | Values are vertically centred in each bar
Normal | Values are written as text (default)
Opaque | Value text is drawn with opaque background
Radial | Values are displaced outward along a radius
RecolorOutside | Values on bars match the bar colour when forced outside the bar
Right | Values are right-aligned above markers
SectorValues | Sector values are used on stacked barcharts
ShowAllTags | Value tags are drawn even if they have too little space
Tips | Values are set as pop-up tips
Vertical | Vertical text is used for values

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Value Tags are drawn | SharpPlot Members | SharpPlot.ValueTagStyle Property | SharpPlot.SetValueTags Method


SharpPlot 3.71 User Manual: VectorStyles Enumeration

VectorStyles Enumeration

Vector style (flags).

[flags]
public enum VectorStyles

Members

ArrowLines | Draw arrows at ends of lines
Clipped | Clip axes and vectors at chart edge
CroppedAxes | Crops all chart elements at the axis boundary
Dissected | Vectors are spaced away from target points
ExplodeAxes | Axes are set back from the plotting area
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Middle | Markers in the middle of vectors
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
Rooted | Markers at the source of vectors
Terminated | Markers on target of vectors
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.VectorStyle Property | SharpPlot.DrawVectors Method


SharpPlot 3.71 User Manual: VennDiagramStyles Enumeration

VennDiagramStyles Enumeration

Venn diagram style (flags).

[flags]
public enum VennDiagramStyles

Members

Filled | Lines are completed back to the start and shaded inside the region created
RedrawOutline | Chart outline is redrawn over filled areas
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.VennDiagramStyle Property | SharpPlot.DrawVennDiagram Method


SharpPlot 3.71 User Manual: XAxisStyles Enumeration

XAxisStyles Enumeration

X-Axis style (flags).

[flags]
public enum XAxisStyles

Members

AngledLabels | Angled labels are used
AnnualTicks | Annual ticks are used for dates
ArrowedAxis | Axis ends with an arrowhead
AtEndCaption | Caption is drawn at the end of the axis
BalancedAxis | Tickmarks are ranged around zero and the Y-axis is horizontally centred
CenteredCaption | Caption is centered below axis
Clipped | Axis and data is clipped at the first and last tickmarks
Date | X-values are taken as OLE dates
DuplicateAxes | Duplicate X-axes are drawn
Duration | Format X axis labels using base-60 rather than 10
ExactFit | Axis is not rounded up to the next whole tickmark interval
FlatText | Flat text is used for 3D charts
ForceZero | The X-axis always includes zero
GridLines | Grid lines are drawn vertically at major ticks
InsideLabels | Labels are written within the chart area
InvisibleAxis | Axis and ticks are invisible, but labels will be drawn as normal
LogScale | Log scale is used
Longitude | Longitude scale is drawn for GPS data
MaskedLabels | Labels are already masked so must not be thinned further
MiddleLabels | Labels are placed between tickmarks
MonthlyTicks | Monthly ticks are used for dates
NoAxis | No axis is generated
NoLabels | No labels are drawn
OmitLastLabel | Drops off rightmost label to avoid potential collisions
OverlayGrid | Grid lines are drawn over the data
PlainAxis | Plain axis (no ticks or labels)
RightCaption | Right-aligned axis caption (default)
SpannedLabels | Repeated labels are blanked and spanned across the repeated range
StayAtEdge | Labels stay at edge when axis is centrally placed
Time | X-values are taken as OLE date-time numbers
TopAxis | Axis is drawn at the top of the chart

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.XAxisStyle Property


SharpPlot 3.71 User Manual: XBarChartStyles Enumeration

XBarChartStyles Enumeration

Barchart Style (flags).

[flags]
public enum XBarChartStyles

Members

CroppedAxes | Crops all chart elements at the axis boundary
ExplodeAxes | Axes are set back from the plotting area
FloatingBars | Floating bars (lowest bar of stack not drawn)
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
Horizontal | Horizontal chart
Indexed | Data is indexed to the initial value = 100
Logarithmic | All chart axes are drawn logarithmically
NoAxes | No axes are drawn on the chart
OverlayGrid | Gridlines are drawn ontop of data
StackedBars | Stacked barcharts (data is accumulated)
TicksBetween | Tickmarks are drawn between bars or groups of bars
ValueTags | Value tags are written for data items

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.XBarChartStyle Property | SharpPlot.DrawXBarChart Method


SharpPlot 3.71 User Manual: XTickStyles Enumeration

XTickStyles Enumeration

X-Axis tickmark style (flags).

[flags]
public enum XTickStyles

Members

Absolute | Tick-lengths are in points, not percent of standard
CrossingTicks | Ticks cross the axis
DuplicateTicks | Ticks repeat on the alternate axis
InsideTicks | Ticks are drawn inside the axis
MinorTicks | Minor ticks are added automatically
NoTicks | No ticks are drawn

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.XTickStyle Property


SharpPlot 3.71 User Manual: YAxisStyles Enumeration

YAxisStyles Enumeration

Y-Axis style (flags).

[flags]
public enum YAxisStyles

Members

AboveGrid | Labels are written above gridlines and tickmarks
AngledLabels | Angled labels are used on 3D charts
ArrowedAxis | Axis ends with an arrowhead
AtEndCaption | The caption is written horizontally above the top of the axis
BalancedAxis | Tickmarks are ranged around zero and the X-axis is vertically centred
CenteredCaption | The caption is vertically centred
ClampToAxis | Data is clamped to fit within the axis range
Clipped | Data and axes are clipped at the extreme tick marks
Date | The data is assumed to be OLE dates
DuplicateAxes | Duplicate axes are drawn
Duration | Format Y axis labels using base-60 rather than 10
ExactFit | The axis will not be extended to the nearest whole tick interval
FlatText | Flat text is used for 3D captions and labels
ForceZero | Axis range always includes zero
GridLines | Horizontal gridlines are drawn at major ticks
InsideLabels | Labels are written within the chart area
InvertAxis | The axis is drawn with data values increasing from the top down
InvisibleAxis | No axis or ticks are drawn, but labels are written normally
Latitude | The scale is formatted as latitude values for GPS data
LeftAxis | The axis is drawn and labelled at the left even for secondary axes
LogScale | A logarithmic scale is used
MiddleLabels | Axis labels are written on the middle of the axis
NoAxis | No axis is drawn
NoLabels | No labels are added
OverlayGrid | Gridlines are drawn on top of data
PlainAxis | No labels or ticks are created
RightAxis | The axis is drawn at the right
StayAtEdge | Labels stay at the chart edge when the axis intercept is explicitly set
Synchronised | Secondary axis will match tick positions of primary
Time | The data is assumed to be OLE date/time values

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.YAxisStyle Property


SharpPlot 3.71 User Manual: YTickStyles Enumeration

YTickStyles Enumeration

Y-Axis tickmark style (flags).

[flags]
public enum YTickStyles

Members

Absolute | Tick-lengths are in points, not percent of standard
CrossingTicks | Ticks cross the axis
DuplicateTicks | Ticks repeat on the alternate axis
InsideTicks | Ticks are drawn inside the axis
MinorTicks | Minor ticks are added automatically
NoTicks | No ticks are drawn

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.YTickStyle Property


SharpPlot 3.71 User Manual: ZAxisStyles Enumeration

ZAxisStyles Enumeration

Z-Axis style (flags).

[flags]
public enum ZAxisStyles

Members

AtEndCaption | The caption is written above the top of the axis
ExactFit | The axis is not extended to the nearest whole tickmark
FlatText | Flat text is used for the caption and labels
ForceZero | The axis is forced to include zero
GridLines | Grid lines are drawn around the chart walls
NoLabels | No labels are drawn
PlainAxis | No ticks or labels are drawn

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.ZAxisStyle Property


SharpPlot 3.71 User Manual: ZoneStyles Enumeration

ZoneStyles Enumeration

Zone style (flags).

[flags]
public enum ZoneStyles

Members

Intersect | Zone is painted only at intersections with orthogonal zones
SpanFrame | Zone spans the chart area rather than the axes

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: ZTickStyles Enumeration

ZTickStyles Enumeration

Z-Axis tickmark style (flags).

[flags]
public enum ZTickStyles

Members

NoTicks No ticks are drawn

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.ZTickStyle Property


SharpPlot 3.71 User Manual: NetworkMapStyles Enumeration

NetworkMapStyles Enumeration

Styles for the SharpPlot.DrawNetworkMap method.

[flags]
public enum NetworkMapStyles

Members

ArrowLines | Draw arrows at the end of links
CellsCreated | Make cells at each node for miniature plots
Clipped | Clip axes and all lines and markers at chart edge
CounterClockwise | Links go counter-clockwise
CroppedAxes | Crops all chart elements at the axis boundary
Dissected | Links are spaced away from nodes
ExplodeAxes | Axes are set back from the plotting area
FixedArcs | Fixed link arc radius
ForceZero | Force zero (all axes include origin)
FrameAxes | Axes are completed to frame chart and all data is cropped
GridLines | Draw gridlines (all axes)
HaloMarkers | Halo all markers
Horizontal | Node series are laid out horizontally
NoAxes | No axes are drawn on the chart
NoLines | Links are not drawn
NoLinkKey | Do not output key for links
NoMarkers | Nodes are not drawn
NoNodeKey | Do not output key for nodes
OnTopMarkers | Force drawing nodes over links
OverlayGrid | Gridlines are drawn ontop of data
RoundLines | Links are drawn with round ends
SplitByDestination | Link aspects are split by destination node
SplitByLink | SplitBy applies to individual links rather than nodes
SplitByOrigin | Link aspects are split by origin node
ValueTags | Value tags are written for links
Vertical | Node series are laid out vertically

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot Members | SharpPlot.NetworkMapStyle Property | SharpPlot.DrawNetworkMap Method


SharpPlot 3.71 User Manual: PageMap Class

PageMap Class

The PageMap class allows the programmer to explore hotspot data contained in any chart to reproduce the typical behaviour of a VML graphic deployed by a web-server.

public class PageMap

A PageMap object is obtained by the SharpPlot.RenderPageMap method.

This utility class is designed to permit an application to convert mouse-tracking information into references back to the original data from which the chart was created.

This may be used (for example) to eliminate outliers from a regression analysis or to implement data editing by allowing the user to drag markers or bars. The examples all refer to this simple chart, which has 2 data series (one with bars and one with markers) and also has a tip on the heading text.

The hotspot detail is always returned in a HotspotInfo structure which tells you all you need to know to implement a graphical enquiry or editing application.

See PageMap Introduction for a fuller description and a simple worked example.

PageMap Instance Properties

Height | Height of paper in user’s units (ReadOnly)
Scale | User’s units relative to points (ReadOnly)
Width | Width of paper in user’s units (ReadOnly)

PageMap Methods

AxesToPoints | Convert Axis co-ordinates to absolute points
EnumerateCharts | List all charts found on this page
FindChart | Report the name of the chart at these (x,y) co-ordinates
FindHint | Recover hint text given hotspot handle
FindHotspot | Find the details of any data points on this page at given (x,y) location
FindHyperlink | Recover link text given hotspot handle
FindInfo | Find the details of any standard chart object(s) given chartid and target
FindPoints | Locate all data points whose centres lie within given bounding box
FindScriptValue | Recover saved script value from hotspot
FindTip | Recover tip text given hotspot details
GetHotspotInfo | Return hotspot detail as a structure
GetTracker | Convert points to status message giving formatted x and y in user-space
PointsToAxes | Convert points to axis co-ordinates, defaulting to topmost chart

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: PageMap Members

PageMap Members

PageMap Instance Properties

Height | Height of paper in user’s units (ReadOnly)
Scale | User’s units relative to points (ReadOnly)
Width | Width of paper in user’s units (ReadOnly)

PageMap Methods

AxesToPoints | Convert Axis co-ordinates to absolute points
EnumerateCharts | List all charts found on this page
FindChart | Report the name of the chart at these (x,y) co-ordinates
FindHint | Recover hint text given hotspot handle
FindHotspot | Find the details of any data points on this page at given (x,y) location
FindHyperlink | Recover link text given hotspot handle
FindInfo | Find the details of any standard chart object(s) given chartid and target
FindPoints | Locate all data points whose centres lie within given bounding box
FindScriptValue | Recover saved script value from hotspot
FindTip | Recover tip text given hotspot details
GetHotspotInfo | Return hotspot detail as a structure
GetTracker | Convert points to status message giving formatted x and y in user-space
PointsToAxes | Convert points to axis co-ordinates, defaulting to topmost chart

See also ...

Active charts in GUI Applications | SharpPlot.RenderPageMap Method


SharpPlot 3.71 User Manual: Width Property (ReadOnly)

PageMap.Width Property (ReadOnly)

The width (in points) of the paper used to draw the chart

public double {get; }

Example

pagewidth = pm.Width;

See also ...

Active charts in GUI Applications | PageMap.PageMap Members


SharpPlot 3.71 User Manual: Height Property (ReadOnly)

PageMap.Height Property (ReadOnly)

The height (in points) of the paper used to draw the chart

public double {get; }

Example

pageht = pm.Height;

See also ...

Active charts in GUI Applications | PageMap.PageMap Members


SharpPlot 3.71 User Manual: PointsToAxes Method

PageMap.PointsToAxes Method

Convert between co-ordinate systems based on given chart, or topmost chart at this location.

Example

PointF xya = pm.PointsToAxes("Bar1",100,100);
System.Console.WriteLine("Axis conversion based on left scale - (100,100)=" + xya;

This gives the output

Axis conversion based on left scale - (100,100)={X=0.9864865, Y=1.699115}
Axis conversion based on right scale - (100,100)={X=0.9864865, Y=127.4336}
Axis conversion based on topmost scale - (100,100)={X=0.9864865, Y=127.4336}

Overloads

  • public PointF PointsToAxes(double x,double y);
  • public PointF PointsToAxes(string chartid,double x,double y);

Description

This could be used to show the current mouse co-ordinates in terms of the chart axes in a status field if the formatted value provided by GetTracker is unsuitable.

See also ...

Active charts in GUI Applications | PageMap.PageMap Members | PageMap.GetTracker Method


SharpPlot 3.71 User Manual: PointsToAxes Method (Double,Double)

PageMap.PointsToAxes Method (Double,Double)

Convert based on topmost chart at this location.

public PointF PointsToAxes(
    double x,
    double y
);
x
X co-ordinate in points.
y
Y co-ordinate in points.
return value
XY co-ords based on chart axes (empty array if not over a region bounded by rectangular axes).

See also ...

PageMap.PageMap Members | PageMap.PointsToAxes Method


SharpPlot 3.71 User Manual: PointsToAxes Method (String,Double,Double)

PageMap.PointsToAxes Method (String,Double,Double)

Convert points to axis co-ordinates for given chart.

public PointF PointsToAxes(
    string chartid,
    double x,
    double y
);
chartid
Name of chart to be used for conversion.
x
X co-ordinate in points.
y
Y co-ordinate in points.
return value
XY co-ords based on chart axes (empty array if not over a region bounded by rectangular axes).

See also ...

PageMap.PageMap Members | PageMap.PointsToAxes Method


SharpPlot 3.71 User Manual: AxesToPoints Method

PageMap.AxesToPoints Method

Do conversion from chart axis units to points based on given chart, or last chart drawn if omitted.

Example

PointF xy = pm.AxesToPoints("Bar1",2,5);
System.Console.WriteLine("Points conversion based on left scale - (2,5)=" + xy);

Possible output would be

Points conversion based on left scale - (2,5)={X=225, Y=193.25}
Points conversion based on right scale - (2,500)={X=225, Y=240.3333}
Points conversion based on topmost scale - (2,600)={X=225, Y=278}

Overloads

  • public PointF AxesToPoints(double xa,double ya);
  • public PointF AxesToPoints(string chartid,double xa,double ya);

Description

This could be used to overdraw the chart with arbitrary graphics, for example to allow the user to click on points to have them circled on the display, and temporarily eliminated from some analysis.

See also ...

Active charts in GUI Applications | PageMap.PageMap Members


SharpPlot 3.71 User Manual: AxesToPoints Method (Double,Double)

PageMap.AxesToPoints Method (Double,Double)

Do conversion based on last available chart on the page.

public PointF AxesToPoints(
    double xa,
    double ya
);
xa
Y co-ords in points.
ya
Y co-ords in points.
return value
XY coordinates in chart axis units.

See also ...

PageMap.PageMap Members | PageMap.AxesToPoints Method


SharpPlot 3.71 User Manual: AxesToPoints Method (String,Double,Double)

PageMap.AxesToPoints Method (String,Double,Double)

Convert axis co-ordinates to points for a given chartid.

public PointF AxesToPoints(
    string chartid,
    double xa,
    double ya
);
chartid
Chart to use for coordinate conversion (last chart drawn if omitted).
xa
Y co-ords in points.
ya
Y co-ords in points.
return value
XY coordinates in chart axis units.

See also ...

PageMap.PageMap Members | PageMap.AxesToPoints Method


SharpPlot 3.71 User Manual: EnumerateCharts Method

PageMap.EnumerateCharts Method

List all charts found on this page.

public string[] EnumerateCharts();

This returns the (unique) list of chart names (possibly set by the programmer with SetChartName) which are available on the page. It may be used to determine the auto-generated names created by SharpPlot if you don’t want to enforce your own naming.

See also ...

Active charts in GUI Applications | PageMap.PageMap Members


SharpPlot 3.71 User Manual: FindChart Method

PageMap.FindChart Method

Report the name of the chart at these (x,y) co-ordinates.

public string FindChart(
    double x,
    double y
);

Example

pm = sp.RenderPageMap();
cht = pm.FindChart(100,100);
x
Cursor-x in points.
y
Cursor-y in points.
return value
Chart name at this location (null string if none).

This can be used to check that the cursor is over a valid chart region (bounded bt rectangular axes) before attempting to convert points to axis values.

See also ...

Active charts in GUI Applications | PageMap.PageMap Members | PageMap.PointsToAxes Method


SharpPlot 3.71 User Manual: FindHint Method

PageMap.FindHint Method

Recover hint text given hotspot handle. This gets the value of any hint text set for a data value by SharpPlot.AddHints when the chart is created.

public string FindHint(
    int hotspot
);

Example

int hix = pm.FindHotspot(200,120);
hint = pm.FindHint(hix);

An application might use this to display hints in a status field as the mouse is tracked over the chart.

See also ...

Active charts in GUI Applications | SharpPlot.AddHints Method | PageMap.PageMap Members


SharpPlot 3.71 User Manual: FindHotspot Method

PageMap.FindHotspot Method

Find the details of any data points on this page at given (x,y) location.

public int FindHotspot(
    double x,
    double y
);
x
Cursor-x in points.
y
Cursor-y in points.
return value
Integer handle to hotspot or 0 if none matched.

This returns a unique integer id for the topmost hotspot under the cursor. The id may be used to recover any hints or tips that have been associated with the data item, or to get full details of the hotspot for graphical editing purposes.

See also ...

Active charts in GUI Applications | PageMap.PageMap Members | PageMap.GetHotspotInfo Method


SharpPlot 3.71 User Manual: FindHyperlink Method

PageMap.FindHyperlink Method

Recover link text given hotspot handle. This gets the value of any hyperlink set for a data value by SharpPlot.AddHyperlinks when the chart is created.

public string FindHyperlink(
    int hotspot
);

This will report the hyperlink (if any) which has been added to this data item. An application could use this information to emulate standard web behaviour by switching the display to a ‘child’ chart showing details of the data the composed a summary.

Alternatively, you may like to display the link in a status field to give the user appropriate feedback.

See also ...

Active charts in GUI Applications | SharpPlot.AddHyperlinks Method | PageMap.PageMap Members


SharpPlot 3.71 User Manual: FindInfo Method

PageMap.FindInfo Method

Find the details of any standard chart object(s) given the chart id and any ScriptTarget.

public HotspotInfo[] FindInfo(
    string chartid,
    ScriptTarget objid
);

Example

HotspotInfo[] ylabs = pm.FindInfo("Bar1",ScriptTarget.YLabels);
foreach (HotspotInfo spot in ylabs)
   System.Console.WriteLine(spot.ToString());
chartid
Chart name.
objid
Object id.
return value
Hotspot info array.

A typical result would be

Chart=Bar1, Series=YLabels, Item=1, Type=ScriptTarget, Locator=29.5 45.6 33.5 59.2
Chart=Bar1, Series=YLabels, Item=2, Type=ScriptTarget, Locator=29.5 73.8 33.5 87.4
Chart=Bar1, Series=YLabels, Item=3, Type=ScriptTarget, Locator= ....

which might be echoed to the console for debugging use. You could use this array to implement your own hotspot searching, for example to highlight drop-targets in a ‘slice-and-dice’ application which allowed the user to re-position the datacube by dropping placeholders on the chart axis labels.

See also ...

Active charts in GUI Applications | HotspotInfo Struct | PageMap.PageMap Members


SharpPlot 3.71 User Manual: FindPoints Method

PageMap.FindPoints Method

Locate all data points whose centres lie within given bounding box.

public int[] FindPoints(
    double[] xyxy
);
xyxy
Region to check for data markers (left,bottom,right,top) in points.
return value
Array of selected hotspot ids.

This could be used by an application to allow a user to drag-select one or more markers. It only reports type-1 hotspots (markers) and includes only those whose centres fall within the given rectangle.

See also ...

Active charts in GUI Applications | PageMap.PageMap Members


SharpPlot 3.71 User Manual: FindScriptValue Method

PageMap.FindScriptValue Method

Recovers the value of any attribute set for a data value by SharpPlot.AddAttributes when the chart is created.

Example

int hix = pm.FindHotspot(225,209);
string pval = pm.FindScriptValue(hix,"Fluffyness")

System.Console.WriteLine("Fluffyness value = " + pval));

Overloads

  • public string FindScriptValue(int hotspot);
  • public string FindScriptValue(int hotspot,string pname);

Description

Typically, this would be some kind of unique key (such as a product code) which could be used by the application to drill down to a more detailed analysis of that product.

See also ...

Active charts in GUI Applications | PageMap.PageMap Members


SharpPlot 3.71 User Manual: FindScriptValue Method (Int32)

PageMap.FindScriptValue Method (Int32)

Returns first available property value for this hotspot.

public string FindScriptValue(
    int hotspot
);
hotspot
Handle to hotspot.
return value
Property value (as text).

See also ...

PageMap.PageMap Members | PageMap.FindScriptValue Method


SharpPlot 3.71 User Manual: FindScriptValue Method (Int32,String)

PageMap.FindScriptValue Method (Int32,String)

Recover saved script value given hotspot details and property name.

public string FindScriptValue(
    int hotspot,
    string pname
);
hotspot
Handle to hotspot.
pname
Name of saved script item.
return value
Property value (as text).

See also ...

PageMap.PageMap Members | PageMap.FindScriptValue Method


SharpPlot 3.71 User Manual: FindTip Method

PageMap.FindTip Method

Recover tip text given hotspot handle. This gets the value of any tip set for a data value by SharpPlot.AddTips when the chart is created.

public string FindTip(
    int hotspot
);

Example

int hix = pm.FindHotspot(200,120);
tip = pm.FindTip(hix);

An application might use this to popup tips for each data-point as the mouse is tracked over the chart.

See also ...

Active charts in GUI Applications | SharpPlot.AddTips Method | PageMap.PageMap Members


SharpPlot 3.71 User Manual: GetHotspotInfo Method

PageMap.GetHotspotInfo Method

Recover hotspot details given hotspot handle.

public HotspotInfo GetHotspotInfo(
    int hotspot
);

Example

int hix = pm.FindHotspot(250,300);   // Main heading
HotspotInfo hi = pm.GetHotspotInfo(hix);

System.Console.WriteLine("Heading is found at " + hi.ToString());

This might be required if the application wanted to ‘illuminate targets’ as the mouse was tracked over a chart. For example you could circle a data-point if the mouse was over its hotzone, or draw a bright edge over the potentially-selected bar on a barchart.

See also ...

Active charts in GUI Applications | HotspotInfo Struct | PageMap.PageMap Members | PageMap.FindPoints Method


SharpPlot 3.71 User Manual: GetTracker Method

PageMap.GetTracker Method

Convert points to status message giving x and y in user-space.

public string GetTracker(
    double x,
    double y
);
x
Cursor-x in points.
y
Cursor-y in points.
return value
Co-ordinates formatted in user-space.

Description

This takes note of the axis type, so will (for example) correctly represent the cursor position as a date for timeseries charts. A typical result for a scatterplot would be “x:234 y:12.7” where the mouse position is translated to axis values, rounded off to 3 significant figures. Dates are shown in the standard ‘short-date’ style unless you give your own format string.

See also ...

Active charts in GUI Applications | SharpPlot.XTrackFormat Property | SharpPlot.YTrackFormat Property | PageMap.PageMap Members


SharpPlot 3.71 User Manual: Scale Property (ReadOnly)

PageMap.Scale Property (ReadOnly)

User’s units relative to points (ReadOnly).

public double Scale {get;}

Example

double scale = pm.Scale;

See also ...

PageMap.PageMap Members


SharpPlot 3.71 User Manual: SharpLeaf Class

SharpLeaf Class

The SharpLeaf class allows the creation of automated reports.

public class SharpLeaf

Example

A SharpLeaf report is generally accomplished in 3 phases:

  1. Set up the document layout (master pages) and the paragraph styles
  2. Flow content into frames
  3. Render report to image
   para = "Here's a dummy paragraph of text. As the qualifier suggests its content is "+
            "not particularly interesting, but it still reaches its goal of being long "+
            "enough to take up more than one line.";

  // Define document layouts
   page = new PageLayout(PaperSize.Landscape(PaperSize.A5));
   page.Add(new Frame("Main",36,36,-36,-36));  // Half-inch margin all around invisible frame
   layout = new DocumentLayout(page);

  // Define paragraph styles
   body = new ParagraphStyle();
   body.IndentFirst = 36;
   body.SpaceAfter = -1;  // Equivalent of one empty line of text after each paragraph
   title = body.Clone();  // take a deep copy
   title.Font = new FontType("Garamond",15,FontStyle.Bold,Color.Navy);
   title.SpaceBefore = -2;  // Leave room before a title - unless at top of frame
   title.BookmarkLevel = 1;  // Automatically bookmark titles at top level

  // Start flowing
   lf = new SharpLeaf(layout);
   lf.AddParagraphs("First title",title);
   lf.AddParagraphs(new string[]{para,para},body);
   lf.AddParagraphs("Second title",title);
   lf.AddParagraphs(new string[]{para,para,para},body);

  // Render
   lf.SavePdf("myreport.pdf",PdfMode.ShowOutlines);

Have a look at the SharpLeaf tutorials for more examples.

Constructors

  • public SharpLeaf();
  • public SharpLeaf(DocumentLayout layout);
  • public SharpLeaf(DocumentLayout layout,string[] arglist);

SharpLeaf Instance Properties

ArgumentList | Substitution values for {1} ... {99} in TextBlock captions
BulletCount | Next value for numbered lists
CapFont | Font for dropped capitals (default is null for paragraph font)
Decimal | Decimal separator used by Alignment.Decimal (defaults to ‘.’)
Ellipsis | Character that marks text clipping (default is ‘…’ – Unicode 0x2026 – code point 8230 – set to ‘ ‘ to disable)
FrameHeight | Height of current frame (excluding gutter) (ReadOnly)
FrameId | Identifier of the current Frame (ReadOnly)
FrameLeft | Left of current frame (excluding gutter) (ReadOnly)
FrameTop | Top of current frame (excluding gutter) (ReadOnly)
FrameWidth | Width of current frame (excluding gutter) (ReadOnly)
Page | Number of current page, starting at 1 (ReadOnly)
Pages | Number of non-empty pages of the report so far (ReadOnly)
PaperSize | Paper size of current page (ReadOnly)
SoftHyphen | Character marking silent word break (default is Unicode standard ‘’ – U+0x00AD – code point 173)
Style | Working ParagraphStyle
Title | Document title
Version | Get SharpLeaf Version (ReadOnly)
YPosition | Current position on page (ReadOnly)

SharpLeaf Methods

AddBookmarkReference | Flow text into the current paragraph that will point to a named bookmark (earlier or later set with SetBookmark)
AddHtml | Append text with simple HTML tags to the current paragraph
AddHyperlink | Flow text that will point to a URL
AddParagraphs | Flow new paragraphs of texts into the current frame with optional style
AddRichText | Run a vector of "WordPad" Rich Text Format into frame as new paragraphs. This is specific to "old-style" RTF, and not a general RTF parser.
AddSubscript | Append subscripted text to the current paragraph
AddSuperscript | Append superscripted text to the current paragraph
AddText | Append text to the current paragraph
DrawArrow | Low-level routine to draw an arrow with specified parameters
DrawElement | Draw an arbitrary PageElement on current page
GetCharsets | Return the list of used characters for each used font
GetRemainingHeight | Get remaining height in current frame (from current point to bottom)
GetRemainingWidth | Get available width in current frame
GetTextHeight | Measure the height taken by a paragraph of text, interpreting linebreaks, possibly wrapping inside a specified width.
GetTextWidth | Measure the width taken by a paragraph of text, interpreting newline characters (but not tab characters)
IncludeChart | Add a SharpPlot chart to a report, with optional scaling and wraparound
IncludeImage | Add a picture to a report, with optional scaling and wraparound
IncludeRule | Rule line across frame – unless at the top of a frame
IncludeSpace | Include empty space within text flow
IncludeTable | Flow a table within current frame
NextClear | Move down to the closest spot with a clear margin on the left and/or the right hand side.
NextFrame | Skip flow to a new Frame – may imply a new page.
NextLine | Skip to next line – optionally skipping several
NextPage | Force page throws
NextParagraph | Skip to next paragraph – does nothing if already in a new paragraph
NextTab | Skip a number of tabstops
PopStyle | Restore the ParagraphStyle used before the last PushStyle
PushStyle | Temporarily change the current ParagraphStyle, while pushing previous on to the style stack – undone by PopStyle
RenderAnimatedSvg | Return report rendered as animated SVG, with one frame per page
RenderDocument | Return completed report as a Document instance
RenderLog | Return report as a readable log
RenderPS | Return report rendered as raw PostScript
RenderPdf | Return report as a PDF stream
RenderSvg | Return report rendered as SVG
RenderXaml | Return report rendered as a XAML Canvas
SaveAnimatedGif | Save report rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save report to named file as animated SVG, with one frame per page
SaveLog | Save completed report as a readable log file
SavePS | Save report to named file as raw PostScript
SavePdf | Save report to named file as PDF
SaveSvg | Save report to named file as SVG
SaveXaml | Save report to named file as a XAML Canvas
SetArgument | Set a specific argument in the ArgumentList
SetBookmark | Create a bookmark entry for upcoming element (paragraph, text, includes, etc.)
SetBox | Start and stop boxing decorations around text
SetCap | Set up a dropped capital on upcoming paragraph
SetLayout | Change master page layout, closing any started page.

See also

SharpLeaf Tutorials | Text Flow Tutorials

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: SharpLeaf Members

SharpLeaf Members

Constructors

  • public SharpLeaf();
  • public SharpLeaf(DocumentLayout layout);
  • public SharpLeaf(DocumentLayout layout,string[] arglist);

SharpLeaf Instance Properties

ArgumentList | Substitution values for {1} ... {99} in TextBlock captions
BulletCount | Next value for numbered lists
CapFont | Font for dropped capitals (default is null for paragraph font)
Decimal | Decimal separator used by Alignment.Decimal (defaults to ‘.’)
Ellipsis | Character that marks text clipping (default is ‘…’ – Unicode 0x2026 – code point 8230 – set to ‘ ‘ to disable)
FrameHeight | Height of current frame (excluding gutter) (ReadOnly)
FrameId | Identifier of the current Frame (ReadOnly)
FrameLeft | Left of current frame (excluding gutter) (ReadOnly)
FrameTop | Top of current frame (excluding gutter) (ReadOnly)
FrameWidth | Width of current frame (excluding gutter) (ReadOnly)
Page | Number of current page, starting at 1 (ReadOnly)
Pages | Number of non-empty pages of the report so far (ReadOnly)
PaperSize | Paper size of current page (ReadOnly)
SoftHyphen | Character marking silent word break (default is Unicode standard ‘’ – U+0x00AD – code point 173)
Style | Working ParagraphStyle
Title | Document title
Version | Get SharpLeaf Version (ReadOnly)
YPosition | Current position on page (ReadOnly)

SharpLeaf Methods

AddBookmarkReference | Flow text into the current paragraph that will point to a named bookmark (earlier or later set with SetBookmark)
AddHtml | Append text with simple HTML tags to the current paragraph
AddHyperlink | Flow text that will point to a URL
AddParagraphs | Flow new paragraphs of texts into the current frame with optional style
AddRichText | Run a vector of "WordPad" Rich Text Format into frame as new paragraphs. This is specific to "old-style" RTF, and not a general RTF parser.
AddSubscript | Append subscripted text to the current paragraph
AddSuperscript | Append superscripted text to the current paragraph
AddText | Append text to the current paragraph
DrawArrow | Low-level routine to draw an arrow with specified parameters
DrawElement | Draw an arbitrary PageElement on current page
GetCharsets | Return the list of used characters for each used font
GetRemainingHeight | Get remaining height in current frame (from current point to bottom)
GetRemainingWidth | Get available width in current frame
GetTextHeight | Measure the height taken by a paragraph of text, interpreting linebreaks, possibly wrapping inside a specified width.
GetTextWidth | Measure the width taken by a paragraph of text, interpreting newline characters (but not tab characters)
IncludeChart | Add a SharpPlot chart to a report, with optional scaling and wraparound
IncludeImage | Add a picture to a report, with optional scaling and wraparound
IncludeRule | Rule line across frame – unless at the top of a frame
IncludeSpace | Include empty space within text flow
IncludeTable | Flow a table within current frame
NextClear | Move down to the closest spot with a clear margin on the left and/or the right hand side.
NextFrame | Skip flow to a new Frame – may imply a new page.
NextLine | Skip to next line – optionally skipping several
NextPage | Force page throws
NextParagraph | Skip to next paragraph – does nothing if already in a new paragraph
NextTab | Skip a number of tabstops
PopStyle | Restore the ParagraphStyle used before the last PushStyle
PushStyle | Temporarily change the current ParagraphStyle, while pushing previous on to the style stack – undone by PopStyle
RenderAnimatedSvg | Return report rendered as animated SVG, with one frame per page
RenderDocument | Return completed report as a Document instance
RenderLog | Return report as a readable log
RenderPS | Return report rendered as raw PostScript
RenderPdf | Return report as a PDF stream
RenderSvg | Return report rendered as SVG
RenderXaml | Return report rendered as a XAML Canvas
SaveAnimatedGif | Save report rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save report to named file as animated SVG, with one frame per page
SaveLog | Save completed report as a readable log file
SavePS | Save report to named file as raw PostScript
SavePdf | Save report to named file as PDF
SaveSvg | Save report to named file as SVG
SaveXaml | Save report to named file as a XAML Canvas
SetArgument | Set a specific argument in the ArgumentList
SetBookmark | Create a bookmark entry for upcoming element (paragraph, text, includes, etc.)
SetBox | Start and stop boxing decorations around text
SetCap | Set up a dropped capital on upcoming paragraph
SetLayout | Change master page layout, closing any started page.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: SharpLeaf Constructor

SharpLeaf Constructor

Create a new report, taking an optional document layout and argument list.

Overloads

  • public SharpLeaf();
  • public SharpLeaf(DocumentLayout layout);
  • public SharpLeaf(DocumentLayout layout,string[] arglist);

Example

   page = new PageLayout(PaperSize.A4);
  // Invisible frame with one-inch margin all around
   page.Add(new Frame("MyFrameId",72,72,-72,-72));
   layout = new DocumentLayout(page);
   lf = new SharpLeaf(layout);

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: SharpLeaf Constructor

SharpLeaf Constructor

Using default layout (US letter portrait with 1-inch margin).

public SharpLeaf();

See also ...

SharpLeaf Members | SharpLeaf Constructor


SharpPlot 3.71 User Manual: SharpLeaf Constructor (DocumentLayout)

SharpLeaf Constructor (DocumentLayout)

Use specified layout with no arguments.

public SharpLeaf(
    DocumentLayout layout
);
layout
Master pages definition (null for default).

See also ...

SharpLeaf Members | SharpLeaf Constructor


SharpPlot 3.71 User Manual: SharpLeaf Constructor (DocumentLayout,String[])

SharpLeaf Constructor (DocumentLayout,String[])

Create a new report, taking an optional document layout and argument list.

public SharpLeaf(
    DocumentLayout layout,
    string[] arglist
);
layout
Master pages definition (null for default).
arglist
Argument list for custom parameter substitution in TextBlock.

See also ...

SharpLeaf Members | SharpLeaf Constructor


SharpPlot 3.71 User Manual: SharpLeaf Properties

SharpLeaf Properties

SharpLeaf Instance Properties

ArgumentList | Substitution values for {1} ... {99} in TextBlock captions
BulletCount | Next value for numbered lists
CapFont | Font for dropped capitals (default is null for paragraph font)
Decimal | Decimal separator used by Alignment.Decimal (defaults to ‘.’)
Ellipsis | Character that marks text clipping (default is ‘…’ – Unicode 0x2026 – code point 8230 – set to ‘ ‘ to disable)
FrameHeight | Height of current frame (excluding gutter) (ReadOnly)
FrameId | Identifier of the current Frame (ReadOnly)
FrameLeft | Left of current frame (excluding gutter) (ReadOnly)
FrameTop | Top of current frame (excluding gutter) (ReadOnly)
FrameWidth | Width of current frame (excluding gutter) (ReadOnly)
Page | Number of current page, starting at 1 (ReadOnly)
Pages | Number of non-empty pages of the report so far (ReadOnly)
PaperSize | Paper size of current page (ReadOnly)
SoftHyphen | Character marking silent word break (default is Unicode standard ‘’ – U+0x00AD – code point 173)
Style | Working ParagraphStyle
Title | Document title
Version | Get SharpLeaf Version (ReadOnly)
YPosition | Current position on page (ReadOnly)


SharpPlot 3.71 User Manual: ArgumentList Property

SharpLeaf.ArgumentList Property

Substitution values for {1} ... {99} in TextBlock.Caption.

public string[] ArgumentList {get; set;}

Example

lf.ArgumentList = new string[] {"Draft 12", "John Smith"};

In all TextBlocks used in the DocumentLayout or drawn with SharpLeaf.DrawElement, “{1}” will be replace with “Draft12” and “{2}” by “John Smith”.

See also ...

SharpLeaf Members | SharpLeaf.SetArgument Method | TextBlock.Caption Property


SharpPlot 3.71 User Manual: BulletCount Property

SharpLeaf.BulletCount Property

Next value for numbered lists.

BulletCount is automatically reset to 1 when Bullet changes.

public int BulletCount {get; set;}

Example

lf.BulletCount = 3;

See also ...

SharpLeaf Members | ParagraphStyle.SetBullet Method


SharpPlot 3.71 User Manual: CapFont Property

SharpLeaf.CapFont Property

Font for dropped capitals (default is null for paragraph font).

public FontType CapFont {get; set;}

Example

lf.CapFont = new FontType("Old English Text MT");

See also ...

SharpLeaf Members | SharpLeaf.SetCap Method


SharpPlot 3.71 User Manual: Decimal Property

SharpLeaf.Decimal Property

Decimal separator used by Alignment.Decimal (defaults to ‘.’)

public char Decimal {get; set;}

Example

lf.Decimal = ',';

See also ...

SharpLeaf Members | Table.SetCellAlignment Method | ParagraphStyle.SetTabAlignments Method | Alignment Enumeration


SharpPlot 3.71 User Manual: Ellipsis Property

SharpLeaf.Ellipsis Property

Character that marks text clipping (default is ‘…’ – Unicode 0x2026 – code point 8230 – set to ‘ ‘ to disable).

public char Ellipsis {get; set;}

Example

lf.Ellipsis = ' '; // Disable ellipsis

Description

Set to blank space to disable ellipsis.

See also ...

SharpLeaf Members | Table.SetCellClip Method | Frame.XClip Property


SharpPlot 3.71 User Manual: FrameHeight Property (ReadOnly)

SharpLeaf.FrameHeight Property (ReadOnly)

Height of current frame (excluding gutter) (ReadOnly).

public double FrameHeight {get;}

Example

double height = lf.FrameHeight;

See also ...

Paragraph Glossary | SharpLeaf Members | SharpLeaf.FrameTop Property (ReadOnly) | SharpLeaf.GetRemainingHeight Method | Frame.Gutter Property | Frame.SetCoordinates Method


SharpPlot 3.71 User Manual: FrameId Property (ReadOnly)

SharpLeaf.FrameId Property (ReadOnly)

Identifier of the current Frame (ReadOnly).

public string FrameId {get;}

Example

string id = lf.FrameId;

See also ...

SharpLeaf Members | SharpLeaf.NextFrame Method | Frame.Id Property


SharpPlot 3.71 User Manual: FrameLeft Property (ReadOnly)

SharpLeaf.FrameLeft Property (ReadOnly)

Left of current frame (excluding gutter) (ReadOnly).

public double FrameLeft {get;}

Example

double left = lf.FrameLeft;

See also ...

Paragraph Glossary | SharpLeaf Members | SharpLeaf.FrameWidth Property (ReadOnly) | SharpLeaf.GetRemainingWidth Method | Frame.Gutter Property | Frame.SetCoordinates Method


SharpPlot 3.71 User Manual: FrameTop Property (ReadOnly)

SharpLeaf.FrameTop Property (ReadOnly)

Top of current frame (excluding gutter) (ReadOnly).

public double FrameTop {get;}

Example

double val = lf.FrameTop;

See also ...

Paragraph Glossary | SharpLeaf Members | SharpLeaf.FrameHeight Property (ReadOnly) | Frame.Gutter Property | Frame.SetCoordinates Method


SharpPlot 3.71 User Manual: FrameWidth Property (ReadOnly)

SharpLeaf.FrameWidth Property (ReadOnly)

Width of current frame (excluding gutter) (ReadOnly).

public double FrameWidth {get;}

Example

double width = lf.FrameWidth;

See also ...

Paragraph Glossary | SharpLeaf Members | SharpLeaf.GetRemainingWidth Method | Frame.Gutter Property | Frame.SetCoordinates Method


SharpPlot 3.71 User Manual: Page Property (ReadOnly)

SharpLeaf.Page Property (ReadOnly)

Number of current page, starting at 1 (ReadOnly).

public int Page {get;}

Example

int currpage = lf.Page;

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: Pages Property (ReadOnly)

SharpLeaf.Pages Property (ReadOnly)

Number of non-empty pages of the report so far (ReadOnly).

public int Pages {get;}

Example

int pages = lf.Pages;

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: PaperSize Property (ReadOnly)

SharpLeaf.PaperSize Property (ReadOnly)

Paper size of current page (ReadOnly).

public double[] PaperSize {get;}

Example

double[] size = lf.PaperSize;

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: SoftHyphen Property

SharpLeaf.SoftHyphen Property

Character marking silent word break (default is Unicode standard ‘’ – U+0x00AD – code point 173).

public char SoftHyphen {get; set;}

Example

lf.SoftHyphen = '~';

See also ...

SharpLeaf Members | Table.SetCellWrap Method | ParagraphStyle.Wrap Property | TextBlock.Wrap Property


SharpPlot 3.71 User Manual: Style Property

SharpLeaf.Style Property

Current working ParagraphStyle. Because it is passed by reference, further modifications to the style will be applied in-flight by the SharpLeaf engine.

Style can be temporarily amended with PushStyle/PopStyle.

public ParagraphStyle Style {get; set;}

Example

style = new ParagraphStyle;
lf.Style = style;
style.Alignment = Alignment.Center; // will change alignment in current flow

See also ...

ParagraphStyle Structure | SharpLeaf Members


SharpPlot 3.71 User Manual: Title Property

SharpLeaf.Title Property

Document title, for viewers that display a title bar.

public string Title {get; set;}

Example

lf.Title = "My Report";

See also ...

SharpLeaf Members | DocumentLayout.Title Property | Document.Title Property


SharpPlot 3.71 User Manual: Version Property (ReadOnly)

SharpLeaf.Version Property (ReadOnly)

Get SharpLeaf Version (ReadOnly).

public string Version {get;}

Example

string version = lf.Version;

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: YPosition Property (ReadOnly)

SharpLeaf.YPosition Property (ReadOnly)

Current position on page (ReadOnly).

public double YPosition {get;}

Example

double y = lf.YPosition;

See also ...

SharpLeaf Members | SharpLeaf.GetRemainingHeight Method


SharpPlot 3.71 User Manual: SharpLeaf Methods

SharpLeaf Methods

SharpLeaf Methods

AddBookmarkReference | Flow text into the current paragraph that will point to a named bookmark (earlier or later set with SetBookmark)
AddHtml | Append text with simple HTML tags to the current paragraph
AddHyperlink | Flow text that will point to a URL
AddParagraphs | Flow new paragraphs of texts into the current frame with optional style
AddRichText | Run a vector of "WordPad" Rich Text Format into frame as new paragraphs. This is specific to "old-style" RTF, and not a general RTF parser.
AddSubscript | Append subscripted text to the current paragraph
AddSuperscript | Append superscripted text to the current paragraph
AddText | Append text to the current paragraph
DrawArrow | Low-level routine to draw an arrow with specified parameters
DrawElement | Draw an arbitrary PageElement on current page
GetCharsets | Return the list of used characters for each used font
GetRemainingHeight | Get remaining height in current frame (from current point to bottom)
GetRemainingWidth | Get available width in current frame
GetTextHeight | Measure the height taken by a paragraph of text, interpreting linebreaks, possibly wrapping inside a specified width.
GetTextWidth | Measure the width taken by a paragraph of text, interpreting newline characters (but not tab characters)
IncludeChart | Add a SharpPlot chart to a report, with optional scaling and wraparound
IncludeImage | Add a picture to a report, with optional scaling and wraparound
IncludeRule | Rule line across frame – unless at the top of a frame
IncludeSpace | Include empty space within text flow
IncludeTable | Flow a table within current frame
NextClear | Move down to the closest spot with a clear margin on the left and/or the right hand side.
NextFrame | Skip flow to a new Frame – may imply a new page.
NextLine | Skip to next line – optionally skipping several
NextPage | Force page throws
NextParagraph | Skip to next paragraph – does nothing if already in a new paragraph
NextTab | Skip a number of tabstops
PopStyle | Restore the ParagraphStyle used before the last PushStyle
PushStyle | Temporarily change the current ParagraphStyle, while pushing previous on to the style stack – undone by PopStyle
RenderAnimatedSvg | Return report rendered as animated SVG, with one frame per page
RenderDocument | Return completed report as a Document instance
RenderLog | Return report as a readable log
RenderPS | Return report rendered as raw PostScript
RenderPdf | Return report as a PDF stream
RenderSvg | Return report rendered as SVG
RenderXaml | Return report rendered as a XAML Canvas
SaveAnimatedGif | Save report rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save report to named file as animated SVG, with one frame per page
SaveLog | Save completed report as a readable log file
SavePS | Save report to named file as raw PostScript
SavePdf | Save report to named file as PDF
SaveSvg | Save report to named file as SVG
SaveXaml | Save report to named file as a XAML Canvas
SetArgument | Set a specific argument in the ArgumentList
SetBookmark | Create a bookmark entry for upcoming element (paragraph, text, includes, etc.)
SetBox | Start and stop boxing decorations around text
SetCap | Set up a dropped capital on upcoming paragraph
SetLayout | Change master page layout, closing any started page.


SharpPlot 3.71 User Manual: AddBookmarkReference Method

SharpLeaf.AddBookmarkReference Method

Flow text into the current paragraph that will point to a named bookmark (earlier or later set with SetBookmark).

Overloads

  • public void AddBookmarkReference(string title);
  • public void AddBookmarkReference(string title,string text);

Example

   lf.AddBookmarkReference("Conclusions","See conclusions p.{page}.");
  // [...]
   lf.SetBookmark("Conclusions");

Description

Keywords that may be replaced dynamically within argument text :

{page}
Page number of the target bookmark
{title}
Bookmark title as defined by SharpLeaf.SetBookmark

If these keywords need to be used as text, the closing braces can be escaped with a backslash, so that “\}” renders as “}”.

In PDF, the argument text will hyperlink to the bookmark entry.

See also ...

SharpLeaf Members | SharpLeaf.SetBookmark Method


SharpPlot 3.71 User Manual: AddBookmarkReference Method (String)

SharpLeaf.AddBookmarkReference Method (String)

Simply add the page number of the target bookmark (and point to it).

public void AddBookmarkReference(
    string title
);
title
title and unique identifier used as argument of Bookmark.

See also ...

SharpLeaf Members | SharpLeaf.AddBookmarkReference Method


SharpPlot 3.71 User Manual: AddBookmarkReference Method (String,String)

SharpLeaf.AddBookmarkReference Method (String,String)

Flow text into the current paragraph that will point to a named bookmark (earlier or later set with SetBookmark).

public void AddBookmarkReference(
    string title,
    string text
);
title
title and unique identifier used as argument of Bookmark.
text
text to flow that should point to it (page number by default).

See also ...

SharpLeaf Members | SharpLeaf.AddBookmarkReference Method


SharpPlot 3.71 User Manual: AddHtml Method

SharpLeaf.AddHtml Method

Append text with simple HTML tags to the current paragraph.

public void AddHtml(
    string text
);
text
HTML-tagged string.

Example

   lf.AddHtml("What a <b>bold</b> statement&#x2026;");

Description

Supported tags are : <b> <i> <u> <strike> <sup> <sub> <pre> <code> <a> <br> <p> <hr> <ul> <ol> <li>.

Unsupported combinations are : <a>, <sup> or <sub> within <sup> or <sub>.

Invalid tags are trimmed off.

Tag modifications are not retained on exit – AddHtml does not modify the current ParagraphStyle.

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: AddHyperlink Method

SharpLeaf.AddHyperlink Method

Flow text that will point to a URL.

Overloads

  • public void AddHyperlink(string url);
  • public void AddHyperlink(string url,string text);

Example

   lf.AddHyperlink("http://www.sharpplot.com","(click here to visit website)");

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: AddHyperlink Method (String)

SharpLeaf.AddHyperlink Method (String)

Simply add the URL as text and point to it.

public void AddHyperlink(
    string url
);
url
URL to link to.

See also ...

SharpLeaf Members | SharpLeaf.AddHyperlink Method


SharpPlot 3.71 User Manual: AddHyperlink Method (String,String)

SharpLeaf.AddHyperlink Method (String,String)

Flow text that will point to a URL.

public void AddHyperlink(
    string url,
    string text
);
url
URL to link to.
text
text that should hyperlink to it.

See also ...

SharpLeaf Members | SharpLeaf.AddHyperlink Method


SharpPlot 3.71 User Manual: AddParagraphs Method

SharpLeaf.AddParagraphs Method

Flow new paragraphs of texts into the current frame with optional style.

Overloads

  • public void AddParagraphs(string text);
  • public void AddParagraphs(string text,string extras);
  • public void AddParagraphs(string text,ParagraphStyle style);
  • public void AddParagraphs(string[] text);
  • public void AddParagraphs(string[] text,string extras);
  • public void AddParagraphs(string[] text,ParagraphStyle style);
  • public void AddParagraphs(string[] text,ParagraphStyle style,string extras);

Example

  // Flow using current style with centered alignment
   lf.AddParagraphs("Centered text","Alignment=Center");

See also ...

ParagraphStyle Structure | Flowing Paragraphs | SharpLeaf Members


SharpPlot 3.71 User Manual: AddParagraphs Method (String)

SharpLeaf.AddParagraphs Method (String)

Flow a paragraph of text with the current style.

public void AddParagraphs(
    string text
);
text
Text to flow, using one string per paragraph.

See also ...

SharpLeaf Members | SharpLeaf.AddParagraphs Method


SharpPlot 3.71 User Manual: AddParagraphs Method (String,String)

SharpLeaf.AddParagraphs Method (String,String)

Flow a paragraph of text, temporarily changing chosen properties.

public void AddParagraphs(
    string text,
    string extras
);
text
Text to flow, using one string per paragraph.
extras
Text description of style amendments, as produced by ParagraphStyle.ToString.

See also ...

SharpLeaf Members | SharpLeaf.AddParagraphs Method


SharpPlot 3.71 User Manual: AddParagraphs Method (String,ParagraphStyle)

SharpLeaf.AddParagraphs Method (String,ParagraphStyle)

Flow a paragraph of text with a given style.

public void AddParagraphs(
    string text,
    ParagraphStyle style
);
text
Text to flow, using one string per paragraph.
style
Formatting to be applied for this paragraph only.

See also ...

SharpLeaf Members | SharpLeaf.AddParagraphs Method


SharpPlot 3.71 User Manual: AddParagraphs Method (String[])

SharpLeaf.AddParagraphs Method (String[])

Flow paragraphs of text with the current style.

public void AddParagraphs(
    string[] text
);
text
Text to flow, using one string per paragraph.

See also ...

SharpLeaf Members | SharpLeaf.AddParagraphs Method


SharpPlot 3.71 User Manual: AddParagraphs Method (String[],String)

SharpLeaf.AddParagraphs Method (String[],String)

Flow paragraphs of text, temporarily changing chosen properties.

public void AddParagraphs(
    string[] text,
    string extras
);
text
Text to flow, using one string per paragraph.
extras
Text description of style amendments, as produced by ParagraphStyle.ToString.

See also ...

SharpLeaf Members | SharpLeaf.AddParagraphs Method


SharpPlot 3.71 User Manual: AddParagraphs Method (String[],ParagraphStyle)

SharpLeaf.AddParagraphs Method (String[],ParagraphStyle)

Flow a paragraphs of text with a given Style.

public void AddParagraphs(
    string[] text,
    ParagraphStyle style
);
text
Text to flow, using one string per paragraph.
style
Formatting to be applied for this paragraph only.

See also ...

SharpLeaf Members | SharpLeaf.AddParagraphs Method


SharpPlot 3.71 User Manual: AddParagraphs Method (String[],ParagraphStyle,String)

SharpLeaf.AddParagraphs Method (String[],ParagraphStyle,String)

Flow new paragraphs of texts into the current frame with optional style.

public void AddParagraphs(
    string[] text,
    ParagraphStyle style,
    string extras
);
text
Text to flow, using one string per paragraph.
style
Formatting to be applied for this paragraph only.
extras
Text description of style amendments, as produced by ParagraphStyle.ToString.

See also ...

SharpLeaf Members | SharpLeaf.AddParagraphs Method


SharpPlot 3.71 User Manual: AddRichText Method

SharpLeaf.AddRichText Method

Run a vector of “WordPad” Rich Text Format into frame as new paragraphs. This is specific to “old-style” RTF, and not a general RTF parser.

public void AddRichText(
    string rtf
);
rtf
Newline-delimited RTF stream to run.

Example

   lf.AddRichText("{\\rtf1\\ansi\\ansicpg1252\\pard What a \\b bold\\b0  statement\\'85\\par}");

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: AddSubscript Method

SharpLeaf.AddSubscript Method

Append subscripted text to the current paragraph.

Overloads

  • public void AddSubscript(char txt);
  • public void AddSubscript(string txt);

Example

   lf.AddText('H');
   lf.AddSubscript('2');
   lf.AddText('O');

See also ...

Advanced Text Control | SharpLeaf Members


SharpPlot 3.71 User Manual: AddSubscript Method (Char)

SharpLeaf.AddSubscript Method (Char)

Append a subscripted char to the current paragraph.

public void AddSubscript(
    char txt
);

See also ...

SharpLeaf Members | SharpLeaf.AddSubscript Method


SharpPlot 3.71 User Manual: AddSubscript Method (String)

SharpLeaf.AddSubscript Method (String)

Append subscripted text to the current paragraph.

public void AddSubscript(
    string txt
);

See also ...

SharpLeaf Members | SharpLeaf.AddSubscript Method


SharpPlot 3.71 User Manual: AddSuperscript Method

SharpLeaf.AddSuperscript Method

Append superscripted text to the current paragraph.

Overloads

  • public void AddSuperscript(char txt);
  • public void AddSuperscript(string txt);

Example

   lf.AddText("E = mc");
   lf.AddSuperscript('2');

See also ...

Advanced Text Control | SharpLeaf Members


SharpPlot 3.71 User Manual: AddSuperscript Method (Char)

SharpLeaf.AddSuperscript Method (Char)

Append a superscripted char to the current paragraph.

public void AddSuperscript(
    char txt
);

See also ...

SharpLeaf Members | SharpLeaf.AddSuperscript Method


SharpPlot 3.71 User Manual: AddSuperscript Method (String)

SharpLeaf.AddSuperscript Method (String)

Append superscripted text to the current paragraph.

public void AddSuperscript(
    string txt
);

See also ...

SharpLeaf Members | SharpLeaf.AddSuperscript Method


SharpPlot 3.71 User Manual: AddText Method

SharpLeaf.AddText Method

Append text to the current paragraph.

Overloads

  • public void AddText(char text);
  • public void AddText(string text);

Example

   lf.AddText("Hello world!");

See also ...

Advanced Text Control | SharpLeaf Members


SharpPlot 3.71 User Manual: AddText Method (Char)

SharpLeaf.AddText Method (Char)

Append a character to the current paragraph.

public void AddText(
    char text
);

See also ...

SharpLeaf Members | SharpLeaf.AddText Method


SharpPlot 3.71 User Manual: AddText Method (String)

SharpLeaf.AddText Method (String)

Append text to the current paragraph.

public void AddText(
    string text
);

See also ...

SharpLeaf Members | SharpLeaf.AddText Method


SharpPlot 3.71 User Manual: DrawArrow Method

SharpLeaf.DrawArrow Method

Low-level routine to draw an arrow with specified parameters.

Overloads

  • public void DrawArrow(double xfrom,double yfrom,double xto,double yto);
  • public void DrawArrow(double xfrom,double yfrom,double xto,double yto,double width);
  • public void DrawArrow(double xfrom,double yfrom,double xto,double yto,double width,Color color);
  • public void DrawArrow(double xfrom,double yfrom,double xto,double yto,double width,Color color,LineStyle linestyle);
  • public void DrawArrow(double xfrom,double yfrom,double xto,double yto,double width,Color color,LineStyle linestyle,bool begin,bool end,double size,double angle);

Example

// Draw an 2-point thick, 1-inch long, downwards blue arrow on the left of frame
            // gutter from current Y position
   x = lf.FrameLeft - 5;
   y = lf.YPosition;
   lf.DrawArrow(x,y,x,y + 72,2,Color.Navy);

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: DrawArrow Method (Double,Double,Double,Double)

SharpLeaf.DrawArrow Method (Double,Double,Double,Double)

Draw a 1-point wide black arrow.

public void DrawArrow(
    double xfrom,
    double yfrom,
    double xto,
    double yto
);
xfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
yfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
xto
coordinates of the arrow in points within paper (positive from top left, negative from.
yto
coordinates of the arrow in points within paper (positive from top left, negative from.

See also ...

SharpLeaf Members | SharpLeaf.DrawArrow Method


SharpPlot 3.71 User Manual: DrawArrow Method (Double,Double,Double,Double,Double)

SharpLeaf.DrawArrow Method (Double,Double,Double,Double,Double)

Draw a black solid arrow with given width.

public void DrawArrow(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    double width
);
xfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
yfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
xto
coordinates of the arrow in points within paper (positive from top left, negative from.
yto
coordinates of the arrow in points within paper (positive from top left, negative from.
width
line width to use for segment and arrow (defaults to 1).

See also ...

SharpLeaf Members | SharpLeaf.DrawArrow Method


SharpPlot 3.71 User Manual: DrawArrow Method (Double,Double,Double,Double,Double,Color)

SharpLeaf.DrawArrow Method (Double,Double,Double,Double,Double,Color)

Draw a solid arrow with given width and color.

public void DrawArrow(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    double width,
    Color color
);
xfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
yfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
xto
coordinates of the arrow in points within paper (positive from top left, negative from.
yto
coordinates of the arrow in points within paper (positive from top left, negative from.
width
line width to use for segment and arrow (defaults to 1).
color
color to use for segment and arrow (defaults to Black).

See also ...

SharpLeaf Members | SharpLeaf.DrawArrow Method


SharpPlot 3.71 User Manual: DrawArrow Method (Double,Double,Double,Double,Double,Color,LineStyle)

SharpLeaf.DrawArrow Method (Double,Double,Double,Double,Double,Color,LineStyle)

Draw a simple arrow with given width, color and linestyle.

public void DrawArrow(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    double width,
    Color color,
    LineStyle linestyle
);
xfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
yfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
xto
coordinates of the arrow in points within paper (positive from top left, negative from.
yto
coordinates of the arrow in points within paper (positive from top left, negative from.
width
line width to use for segment and arrow (defaults to 1).
color
color to use for segment and arrow (defaults to Black).
linestyle
line style (defa.

See also ...

SharpLeaf Members | SharpLeaf.DrawArrow Method


SharpPlot 3.71 User Manual: DrawArrow Method (Double,Double,Double,Double,Double,Color,LineStyle,Boolean,Boolean,Double,Double)

SharpLeaf.DrawArrow Method (Double,Double,Double,Double,Double,Color,LineStyle,Boolean,Boolean,Double,Double)

Low-level routine to draw an arrow with specified parameters.

public void DrawArrow(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    double width,
    Color color,
    LineStyle linestyle,
    bool begin,
    bool end,
    double size,
    double angle
);
xfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
yfrom
coordinates of the arrow in points within paper (positive from top left, negative from.
xto
coordinates of the arrow in points within paper (positive from top left, negative from.
yto
coordinates of the arrow in points within paper (positive from top left, negative from.
width
line width to use for segment and arrow (defaults to 1).

See also ...

SharpLeaf Members | SharpLeaf.DrawArrow Method


SharpPlot 3.71 User Manual: DrawElement Method

SharpLeaf.DrawElement Method

Draw an arbitrary PageElement on current page.

public void DrawElement(
    PageElement element
);
element
Element to draw.

Example

   font = new FontType("Arial",72,FontStyle.Bold,Color.LightGray);
  // Create a text block from bottom-left to top-right (no wrapping)
   text = new TextBlock("Confidential",font,72,-72,-72,72,Alignment.Center,
            VerticalAlignment.Middle,false);
   lf.DrawElement(text);  // Water-mark page with "Confidential"

Description

Draws any arbitrary TextBlock, ImageBlock, Box, Rule or Frame on current page. Frames will only be drawn. To flow into it you need to call NextFrame(Frame) instead.

See also ...

PageElement Abstract Class | PageLayout Glossary | SharpLeaf Members


SharpPlot 3.71 User Manual: GetCharsets Method

SharpLeaf.GetCharsets Method

Return the list of used characters for each used font.

Result

Three string[] lists : fontnames, fontstyles, charsets.

Description

The result is three lists of strings :

  • First is list of font names, as registered by the Operating System
  • Second is corresponding list of fontstyles (one of “Regular” “Bold” “Italic” “Bold, Italic”, as returned by FontStyle.ToString)
  • Third is corresponding list of character subsets.

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: GetRemainingHeight Method

SharpLeaf.GetRemainingHeight Method

Get remaining height in current frame (from current point to bottom).

public double GetRemainingHeight();

Example

   lf.IncludeSpace(lf.GetRemainingHeight() - 72);  // Go one inch from frame bottom

See also ...

Paragraph Glossary | SharpLeaf Members | SharpLeaf.FrameHeight Property (ReadOnly) | SharpLeaf.FrameTop Property (ReadOnly)


SharpPlot 3.71 User Manual: GetRemainingWidth Method

SharpLeaf.GetRemainingWidth Method

Get available width in current frame.

public double GetRemainingWidth(
    bool text
);
text
get width for flowing text on current line, rather than generally available frame width.
return value
width available.

Example

   if (72 < lf.GetRemainingWidth(true)) {  // less than an inch for text
     lf.NextClear();  // Skip wrap-arounds
   }

Description

If text is false, returns the frame width less gutter, left and right indents and included wrap-arounds. If text is true, returns the remaining width available for flowing text on current line (which will be less than the above).

See also ...

Paragraph Glossary | SharpLeaf Members | SharpLeaf.FrameLeft Property (ReadOnly) | SharpLeaf.FrameWidth Property (ReadOnly)


SharpPlot 3.71 User Manual: GetTextHeight Method

SharpLeaf.GetTextHeight Method

Measure the height taken by a paragraph of text, interpreting linebreaks, possibly wrapping inside a specified width.

Overloads

  • public double GetTextHeight(string text);
  • public double GetTextHeight(string text,ParagraphStyle style);
  • public double GetTextHeight(string text,ParagraphStyle style,double width);

Result

Measured height.

Example

  // Measure height when wrapping text within an inch
   style = new ParagraphStyle(lf.Style,"Wrap=true");
   height = lf.GetTextHeight("Hello\nworld",style,72);

Description

Measurement assumes constant width, and ignores tab stops.

Width is ignored if ParagraphStyle.Wrap is false.

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: GetTextHeight Method (String)

SharpLeaf.GetTextHeight Method (String)

Measure paragraph height, using current ParagraphStyle and Frame width.

public double GetTextHeight(
    string text
);
text
Text to measure, possibly including linebreaks.
return value
Measured height.

See also ...

SharpLeaf Members | SharpLeaf.GetTextHeight Method


SharpPlot 3.71 User Manual: GetTextHeight Method (String,ParagraphStyle)

SharpLeaf.GetTextHeight Method (String,ParagraphStyle)

Measure paragraph width in current frame using specified ParagraphStyle.

public double GetTextHeight(
    string text,
    ParagraphStyle style
);
text
Text to measure, possibly including linebreaks.
style
ParagraphStyle to use for font and wrapping (current style by default).
return value
Measured height.

See also ...

SharpLeaf Members | SharpLeaf.GetTextHeight Method


SharpPlot 3.71 User Manual: GetTextHeight Method (String,ParagraphStyle,Double)

SharpLeaf.GetTextHeight Method (String,ParagraphStyle,Double)

Measure the height taken by a paragraph of text, interpreting linebreaks, possibly wrapping inside a specified width.

public double GetTextHeight(
    string text,
    ParagraphStyle style,
    double width
);
text
Text to measure, possibly including linebreaks.
style
ParagraphStyle to use for font and wrapping (current style by default).
width
Width of the text wrapping (currently available frame width by default).
return value
Measured height.

See also ...

SharpLeaf Members | SharpLeaf.GetTextHeight Method


SharpPlot 3.71 User Manual: GetTextWidth Method

SharpLeaf.GetTextWidth Method

Measure the width taken by a paragraph of text, interpreting newline characters (but not tab characters).

Overloads

  • public double GetTextWidth(string text);
  • public double GetTextWidth(string text,FontType font);

Result

Measured width.

Example

   font = new FontType("Arial",24);
   width = lf.GetTextWidth("Hello world",font);

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: GetTextWidth Method (String)

SharpLeaf.GetTextWidth Method (String)

Measure paragraph width using current paragraph font.

public double GetTextWidth(
    string text
);
text
Text to measure, possibly including linebreaks.
return value
Measured width.

See also ...

SharpLeaf Members | SharpLeaf.GetTextWidth Method


SharpPlot 3.71 User Manual: GetTextWidth Method (String,FontType)

SharpLeaf.GetTextWidth Method (String,FontType)

Measure the width taken by a paragraph of text, interpreting newline characters (but not tab characters).

public double GetTextWidth(
    string text,
    FontType font
);
text
Text to measure, possibly including linebreaks.
font
Font to measure text with – current paragraph’s by default.
return value
Measured width.

See also ...

SharpLeaf Members | SharpLeaf.GetTextWidth Method


SharpPlot 3.71 User Manual: IncludeChart Method

SharpLeaf.IncludeChart Method

Add a SharpPlot chart to a report, with optional scaling and wraparound.

The horizontal spacing around the included chart is controlled by ParagraphStyle.HorizontalGap.

Overloads

  • public void IncludeChart(SharpPlot sp);
  • public void IncludeChart(SharpPlot sp,BoxFlow flow);
  • public void IncludeChart(SharpPlot sp,BoxFlow flow,double width);
  • public void IncludeChart(SharpPlot sp,BoxFlow flow,double width,double height);
  • public void IncludeChart(SharpPlot sp,BoxFlow flow,double width,double height,int page);

Example

   sp = new SharpPlot(180,120);
   sp.Heading = "My Bar Chart";
   sp.DrawBarChart(new int[]{10,12,23,42,37});
  // Include chart at default size
   lf.IncludeChart(sp,BoxFlow.Left);

See also ...

SharpPlot Tutorials | SharpPlot Class | Text Inclusions | SharpLeaf Members | ParagraphStyle.HorizontalGap Property


SharpPlot 3.71 User Manual: IncludeChart Method (SharpPlot)

SharpLeaf.IncludeChart Method (SharpPlot)

Include chart at default size as paragraph.

public void IncludeChart(
    SharpPlot sp
);
sp
Chart to embed.

See also ...

SharpLeaf Members | SharpLeaf.IncludeChart Method


SharpPlot 3.71 User Manual: IncludeChart Method (SharpPlot,BoxFlow)

SharpLeaf.IncludeChart Method (SharpPlot,BoxFlow)

Include chart at default size.

public void IncludeChart(
    SharpPlot sp,
    BoxFlow flow
);
sp
Chart to embed.
flow
How to flow the chart (BoxFlow.Paragraph by default).

See also ...

SharpLeaf Members | SharpLeaf.IncludeChart Method


SharpPlot 3.71 User Manual: IncludeChart Method (SharpPlot,BoxFlow,Double)

SharpLeaf.IncludeChart Method (SharpPlot,BoxFlow,Double)

Scale chart to specified width.

public void IncludeChart(
    SharpPlot sp,
    BoxFlow flow,
    double width
);
sp
Chart to embed.
flow
How to flow the chart (BoxFlow.Paragraph by default).
width
Size that the chart will be scaled to fit (0 for default, negative for proportion of available frame area).

See also ...

SharpLeaf Members | SharpLeaf.IncludeChart Method


SharpPlot 3.71 User Manual: IncludeChart Method (SharpPlot,BoxFlow,Double,Double)

SharpLeaf.IncludeChart Method (SharpPlot,BoxFlow,Double,Double)

Scale chart to fit specified box.

public void IncludeChart(
    SharpPlot sp,
    BoxFlow flow,
    double width,
    double height
);
sp
Chart to embed.
flow
How to flow the chart (BoxFlow.Paragraph by default).
width
Size that the chart will be scaled to fit (0 for default, negative for proportion of available frame area).
height
Size that the chart will be scaled to fit (0 for default, negative for proportion of available frame area).

See also ...

SharpLeaf Members | SharpLeaf.IncludeChart Method


SharpPlot 3.71 User Manual: IncludeChart Method (SharpPlot,BoxFlow,Double,Double,Int32)

SharpLeaf.IncludeChart Method (SharpPlot,BoxFlow,Double,Double,Int32)

Add a SharpPlot chart to a report, with optional scaling and wraparound.

public void IncludeChart(
    SharpPlot sp,
    BoxFlow flow,
    double width,
    double height,
    int page
);
sp
Chart to embed.
flow
How to flow the chart (BoxFlow.Paragraph by default).
width
Size that the chart will be scaled to fit (0 for default, negative for proportion of available frame area).
height
Size that the chart will be scaled to fit (0 for default, negative for proportion of available frame area).
page
Chart page to include (defaults to 1).

See also ...

SharpLeaf Members | SharpLeaf.IncludeChart Method


SharpPlot 3.71 User Manual: IncludeImage Method

SharpLeaf.IncludeImage Method

Add a picture to a report, with optional scaling and wraparound.

The horizontal spacing around the included image is controlled by ParagraphStyle.HorizontalGap.

Overloads

  • public void IncludeImage(Image bmp,string uri);
  • public void IncludeImage(Image bmp,string uri,BoxFlow flow);
  • public void IncludeImage(Image bmp,string uri,BoxFlow flow,double width);
  • public void IncludeImage(Image bmp,string uri,BoxFlow flow,double width,double height);
  • public void IncludeImage(Image bmp,string uri,BoxFlow flow,double width,double height,bool stretch);
  • public void IncludeImage(string filename,string uri);
  • public void IncludeImage(string filename,string uri,BoxFlow flow);
  • public void IncludeImage(string filename,string uri,BoxFlow flow,double width);
  • public void IncludeImage(string filename,string uri,BoxFlow flow,double width,double height);
  • public void IncludeImage(string filename,string uri,BoxFlow flow,double width,double height,bool stretch);

Example

  // Take a quarter of the frame width on the right, and flow text on the left
   lf.IncludeImage("dyalog.jpg","dyalog.jpg",BoxFlow.Right,-0.25);

See also ...

ImageBlock : PageElement Class | Text Inclusions | SharpLeaf Members | ParagraphStyle.HorizontalGap Property


SharpPlot 3.71 User Manual: IncludeImage Method (Image,String)

SharpLeaf.IncludeImage Method (Image,String)

Add image at actual size as paragraph.

public void IncludeImage(
    Image bmp,
    string uri
);
bmp
Image to embed.
uri
Link to image at display time.

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (String,String,BoxFlow,Double,Double,Boolean)

SharpLeaf.IncludeImage Method (String,String,BoxFlow,Double,Double,Boolean)

Add image at given size, possibly stretchting to fit.

public void IncludeImage(
    string filename,
    string uri,
    BoxFlow flow,
    double width,
    double height,
    bool stretch
);
filename
Path to image to embed at run time.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).
width
Size to use for image (0 for default, negative for proportion of available frame area).
height
Size to use for image (0 for default, negative for proportion of available frame area).
stretch
Stretch image to fit bounding box exactly (false by default) (applies only when both width and height are non-zero).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (Image,String,BoxFlow)

SharpLeaf.IncludeImage Method (Image,String,BoxFlow)

Add image at actual size.

public void IncludeImage(
    Image bmp,
    string uri,
    BoxFlow flow
);
bmp
Image to embed.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (Image,String,BoxFlow,Double)

SharpLeaf.IncludeImage Method (Image,String,BoxFlow,Double)

Add image at given width, preserving aspect ratio.

public void IncludeImage(
    Image bmp,
    string uri,
    BoxFlow flow,
    double width
);
bmp
Image to embed.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).
width
Size to use for image (0 for default, negative for proportion of available frame area).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (Image,String,BoxFlow,Double,Double)

SharpLeaf.IncludeImage Method (Image,String,BoxFlow,Double,Double)

Add image at given size, preserving aspect ratio.

public void IncludeImage(
    Image bmp,
    string uri,
    BoxFlow flow,
    double width,
    double height
);
bmp
Image to embed.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).
width
Size to use for image (0 for default, negative for proportion of available frame area).
height
Size to use for image (0 for default, negative for proportion of available frame area).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (Image,String,BoxFlow,Double,Double,Boolean)

SharpLeaf.IncludeImage Method (Image,String,BoxFlow,Double,Double,Boolean)

Add image at given size, possibly stretching to fit.

public void IncludeImage(
    Image bmp,
    string uri,
    BoxFlow flow,
    double width,
    double height,
    bool stretch
);
bmp
Image to embed.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).
width
Size to use for image (0 for default, negative for proportion of available frame area).
height
Size to use for image (0 for default, negative for proportion of available frame area).
stretch
Stretch image to fit bounding box exactly (false by default) (applies only when both width and height are non-zero).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (String,String)

SharpLeaf.IncludeImage Method (String,String)

Add image at actual size as paragraph.

public void IncludeImage(
    string filename,
    string uri
);
filename
Path to image to embed at run time.
uri
Link to image at display time.

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (String,String,BoxFlow)

SharpLeaf.IncludeImage Method (String,String,BoxFlow)

Add image at actual size.

public void IncludeImage(
    string filename,
    string uri,
    BoxFlow flow
);
filename
Path to image to embed at run time.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (String,String,BoxFlow,Double)

SharpLeaf.IncludeImage Method (String,String,BoxFlow,Double)

Add image at given width, preserving aspect ratio.

public void IncludeImage(
    string filename,
    string uri,
    BoxFlow flow,
    double width
);
filename
Path to image to embed at run time.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).
width
Size to use for image (0 for default, negative for proportion of available frame area).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeImage Method (String,String,BoxFlow,Double,Double)

SharpLeaf.IncludeImage Method (String,String,BoxFlow,Double,Double)

Add image at given size, preserving aspect ratio.

public void IncludeImage(
    string filename,
    string uri,
    BoxFlow flow,
    double width,
    double height
);
filename
Path to image to embed at run time.
uri
Link to image at display time.
flow
How to flow the image (BoxFlow.Paragraph by default).
width
Size to use for image (0 for default, negative for proportion of available frame area).
height
Size to use for image (0 for default, negative for proportion of available frame area).

See also ...

SharpLeaf Members | SharpLeaf.IncludeImage Method


SharpPlot 3.71 User Manual: IncludeRule Method

SharpLeaf.IncludeRule Method

Rule a line across frame – unless at the top of a new frame.

Overloads

  • public bool IncludeRule();
  • public bool IncludeRule(double weight);
  • public bool IncludeRule(double weight,double length);
  • public bool IncludeRule(double weight,double length,Alignment alignment);
  • public bool IncludeRule(double weight,double length,Alignment alignment,Color color);
  • public bool IncludeRule(double weight,double length,Alignment alignment,Color color,LineStyle style);

Result

Flag indicating whether a rule was actually drawn or not.

Example

  // Two-point wide centered rule taking half the frame width
   if ((lf.IncludeRule(2,-0.5))) {
    // Add more space if rule was drawn (i.e. not at top of frame)
     lf.IncludeSpace(lf.Style.SpaceAfter);
   }

See also ...

Text Inclusions | SharpLeaf Members


SharpPlot 3.71 User Manual: IncludeRule Method

SharpLeaf.IncludeRule Method

Draw a solid, black, 1-point rule across frame.

public bool IncludeRule();

Result

Whether a rule was actually drawn or not.

See also ...

SharpLeaf Members | SharpLeaf.IncludeRule Method


SharpPlot 3.71 User Manual: IncludeRule Method (Double)

SharpLeaf.IncludeRule Method (Double)

Draw a solid, black rule with specified weight across frame.

public bool IncludeRule(
    double weight
);
weight
Width of the ruled line in points (default to 1).
return value
Whether a rule was actually drawn or not.

See also ...

SharpLeaf Members | SharpLeaf.IncludeRule Method


SharpPlot 3.71 User Manual: IncludeRule Method (Double,Double)

SharpLeaf.IncludeRule Method (Double,Double)

Draw a solid, black centered rule with specified length and weight.

public bool IncludeRule(
    double weight,
    double length
);
weight
Width of the ruled line in points (default to 1).
length
Length of the ruled line (positive is absolute size in points, negative is relative to current frame width) (defaults to ¯1 = frame width).
return value
Whether a rule was actually drawn or not.

See also ...

SharpLeaf Members | SharpLeaf.IncludeRule Method


SharpPlot 3.71 User Manual: IncludeRule Method (Double,Double,Alignment)

SharpLeaf.IncludeRule Method (Double,Double,Alignment)

Draw a solid black rule with specified weight, length and alignment.

public bool IncludeRule(
    double weight,
    double length,
    Alignment alignment
);
weight
Width of the ruled line in points (default to 1).
length
Length of the ruled line (positive is absolute size in points, negative is relative to current frame width) (defaults to ¯1 = frame width).
alignment
Horizontal alignment of the rule.
return value
Whether a rule was actually drawn or not.

See also ...

SharpLeaf Members | SharpLeaf.IncludeRule Method


SharpPlot 3.71 User Manual: IncludeRule Method (Double,Double,Alignment,Color)

SharpLeaf.IncludeRule Method (Double,Double,Alignment,Color)

Draw a solid rule with specified weight, length and alignment.

public bool IncludeRule(
    double weight,
    double length,
    Alignment alignment,
    Color color
);
weight
Width of the ruled line in points (default to 1).
length
Length of the ruled line (positive is absolute size in points, negative is relative to current frame width) (defaults to ¯1 = frame width).
alignment
Horizontal alignment of the rule.
color
Color of the ruled line (defaults to Black).
return value
Whether a rule was actually drawn or not.

See also ...

SharpLeaf Members | SharpLeaf.IncludeRule Method


SharpPlot 3.71 User Manual: IncludeRule Method (Double,Double,Alignment,Color,LineStyle)

SharpLeaf.IncludeRule Method (Double,Double,Alignment,Color,LineStyle)

Rule line across frame – unless at the top of a frame.

public bool IncludeRule(
    double weight,
    double length,
    Alignment alignment,
    Color color,
    LineStyle style
);
weight
Width of the ruled line in points (default to 1).
length
Length of the ruled line (positive is absolute size in points, negative is relative to current frame width) (defaults to ¯1 = frame width).
alignment
Horizontal alignment of the rule.
color
Color of the ruled line (defaults to Black).
style
.
return value
Whether a rule was actually drawn or not.

See also ...

SharpLeaf Members | SharpLeaf.IncludeRule Method


SharpPlot 3.71 User Manual: IncludeSpace Method

SharpLeaf.IncludeSpace Method

Include empty space within text flow.

Overloads

  • public void IncludeSpace(double height);
  • public void IncludeSpace(double width,double height);
  • public void IncludeSpace(double width,double height,BoxFlow flow);

Example

   lf.IncludeSpace(lf.GetRemainingHeight() - 72);  // Go one inch from frame bottom

Description

BoxFlow.Paragraph is treated as BoxFlow.Center – SpaceBefore and SpaceAfter are not added.

See also ...

Text Inclusions | SharpLeaf Members


SharpPlot 3.71 User Manual: IncludeSpace Method (Double)

SharpLeaf.IncludeSpace Method (Double)

Bump vertical position by specified distance.

public void IncludeSpace(
    double height
);
height
Size of the space (positive is absolute size in points, negative is multiple of line pitch).

See also ...

SharpLeaf Members | SharpLeaf.IncludeSpace Method


SharpPlot 3.71 User Manual: IncludeSpace Method (Double,Double)

SharpLeaf.IncludeSpace Method (Double,Double)

Knock-out rectangular space from the left margin.

public void IncludeSpace(
    double width,
    double height
);
width
Size of the space (positive is absolute size in points, negative is multiple of available frame width).
height
Size of the space (positive is absolute size in points, negative is multiple of line pitch).

See also ...

SharpLeaf Members | SharpLeaf.IncludeSpace Method


SharpPlot 3.71 User Manual: IncludeSpace Method (Double,Double,BoxFlow)

SharpLeaf.IncludeSpace Method (Double,Double,BoxFlow)

Include empty space within text flow.

public void IncludeSpace(
    double width,
    double height,
    BoxFlow flow
);
width
Size of the space (positive is absolute size in points, negative is multiple of available frame width).
height
Size of the space (positive is absolute size in points, negative is multiple of line pitch).
flow
Way to flow the space (default is BoxFlow.Left if width is provided, BoxFlow.Paragraph otherwise).

See also ...

SharpLeaf Members | SharpLeaf.IncludeSpace Method


SharpPlot 3.71 User Manual: IncludeTable Method

SharpLeaf.IncludeTable Method

Flow a table within current frame.

The horizontal spacing around the included table is controlled by ParagraphStyle.HorizontalGap.

Overloads

  • public void IncludeTable(Table tbl);
  • public void IncludeTable(Table tbl,BoxFlow flow);
  • public void IncludeTable(Table tbl,BoxFlow flow,double targetwidth);
  • public void IncludeTable(Table tbl,BoxFlow flow,double targetwidth,bool fitwidth);
  • public void IncludeTable(Table tbl,BoxFlow flow,double targetwidth,bool fitwidth,double blockwidth);
  • public void IncludeTable(Table tbl,BoxFlow flow,double targetwidth,bool fitwidth,double blockwidth,double scale);

Example

   tb = new Table();
   tb.AddRows(new string[]{"","Column 1","Column 2","Column 3"});
   tb.AddColumns(new string[]{"Row 1","Row 2","Row 3","Row 4"});
   tb.AddRows(new int[][]{new int[]{101,201,301},new int[]{102,202,302},new int[]{103,
            203,303},new int[]{104,204,304}});
  // Force the fit to frame width
   lf.IncludeTable(tb,BoxFlow.Paragraph,-1,true);

Target Width

Positive values are absolute sizes in points, negative values are proportions of the current frame width. Default is -1 for available frame width.

The table will size relative columns (see negative values in Table.SetColumnWidths) so that the whole table width is no less than the target width.

The table may end up wider than the target width if fixed-sized columns (including auto-fit) take up too much width for relative-sized columns to observe Table.SetColumnMinWidths.

The table may end up narrower or wider than the target width if there are no relative-sized columns (target width doesn’t affect the column width at that point).

A target width of 0 will therefore force all relative-sized columns to take their minimum allowed width.

Fit Width

Flag to force the table to fit the target width – and blocks of columns to fit the block width, possibly scaling the table up or down. Default is false.

Block Width

Positive values are absolute sizes in points, negative values are proportions of the current frame width. Default is -1 for available frame width.

Maximum width at which to chop blocks of columns. Determines the eventual number of blocks of columns.

Blocks will generally be slightly shorter due to the fact that effective column widths do not generally add up to block width exactly.

A typical degenerate case is a 3-column table with column widths of {50,-1,50} with a targetwidth of 200 and a block width of 100: the middle column must be of size 100, and blocks can not be even.

Blocks may be wider if retained columns take up too much space (see Table.SetTitles and Table.SetColumnRetain)

A block width of 0 forbids the splitting of columns into blocks.

Scaling factor

Arbitrary scaling factor to apply on table before computing the widths and heights. Default is 1.

See also ...

Table Tutorials | Splitting Blocks of Columns | SharpLeaf Members


SharpPlot 3.71 User Manual: IncludeTable Method (Table)

SharpLeaf.IncludeTable Method (Table)

Flow a table as paragraph, using currently available frame width.

public void IncludeTable(
    Table tbl
);
tbl
Table to flow.

See also ...

SharpLeaf Members | SharpLeaf.IncludeTable Method


SharpPlot 3.71 User Manual: IncludeTable Method (Table,BoxFlow)

SharpLeaf.IncludeTable Method (Table,BoxFlow)

Flow a table with specifed flow, using currently available frame width.

public void IncludeTable(
    Table tbl,
    BoxFlow flow
);
tbl
Table to flow.
flow
How to flow the table (BoxFlow.Paragraph by default).

See also ...

SharpLeaf Members | SharpLeaf.IncludeTable Method


SharpPlot 3.71 User Manual: IncludeTable Method (Table,BoxFlow,Double)

SharpLeaf.IncludeTable Method (Table,BoxFlow,Double)

Flow a table with specifed flow, targetting such width.

public void IncludeTable(
    Table tbl,
    BoxFlow flow,
    double targetwidth
);
tbl
Table to flow.
flow
How to flow the table (BoxFlow.Paragraph by default).
targetwidth
Target table width (positive is absolute width in points – negative is relative to currently available frame width) (default is -1).

See also ...

SharpLeaf Members | SharpLeaf.IncludeTable Method


SharpPlot 3.71 User Manual: IncludeTable Method (Table,BoxFlow,Double,Boolean)

SharpLeaf.IncludeTable Method (Table,BoxFlow,Double,Boolean)

Flow a table with specifed flow, targetting such width, optionally fitting it.

public void IncludeTable(
    Table tbl,
    BoxFlow flow,
    double targetwidth,
    bool fitwidth
);
tbl
Table to flow.
flow
How to flow the table (BoxFlow.Paragraph by default).
targetwidth
Target table width (positive is absolute width in points – negative is relative to currently available frame width) (default is -1).
fitwidth
Scale table so that it fits the target width exactly.

See also ...

SharpLeaf Members | SharpLeaf.IncludeTable Method


SharpPlot 3.71 User Manual: IncludeTable Method (Table,BoxFlow,Double,Boolean,Double)

SharpLeaf.IncludeTable Method (Table,BoxFlow,Double,Boolean,Double)

Flow a table with specifed flow, targetting such width, optionally fitting it, and specifying the width of blocks of columns.

public void IncludeTable(
    Table tbl,
    BoxFlow flow,
    double targetwidth,
    bool fitwidth,
    double blockwidth
);
tbl
Table to flow.
flow
How to flow the table (BoxFlow.Paragraph by default).
targetwidth
Target table width (positive is absolute width in points – negative is relative to currently available frame width) (default is -1).
fitwidth
Scale table so that it fits the target width exactly.
blockwidth
Width to use for blocks of columns (positive is absolute width in points – negative is relative to currently available frame width – 0 disables column splitting) (default is -1).

See also ...

SharpLeaf Members | SharpLeaf.IncludeTable Method


SharpPlot 3.71 User Manual: IncludeTable Method (Table,BoxFlow,Double,Boolean,Double,Double)

SharpLeaf.IncludeTable Method (Table,BoxFlow,Double,Boolean,Double,Double)

Flow a table within current frame.

public void IncludeTable(
    Table tbl,
    BoxFlow flow,
    double targetwidth,
    bool fitwidth,
    double blockwidth,
    double scale
);

See also ...

SharpLeaf Members | SharpLeaf.IncludeTable Method


SharpPlot 3.71 User Manual: NextClear Method

SharpLeaf.NextClear Method

Move down to the closest spot with no inclusion on the left and/or the right hand side. Does nothing if there is no inclusion.

Overloads

  • public void NextClear();
  • public void NextClear(bool left,bool right);

Example

  // Ensure no inclusion on the left before starting paragraph
   lf.NextClear(true,false);
   lf.NextParagraph();

See also ...

Text Inclusions | SharpLeaf Members | ParagraphStyle.ClearLeft Property | ParagraphStyle.ClearRight Property


SharpPlot 3.71 User Manual: NextClear Method

SharpLeaf.NextClear Method

Move down to the closest spot with both margins clear.

public void NextClear();

See also ...

SharpLeaf Members | SharpLeaf.NextClear Method


SharpPlot 3.71 User Manual: NextClear Method (Boolean,Boolean)

SharpLeaf.NextClear Method (Boolean,Boolean)

Move down to the closest spot with a clear margin on the left and/or the right hand side.

public void NextClear(
    bool left,
    bool right
);

See also ...

SharpLeaf Members | SharpLeaf.NextClear Method


SharpPlot 3.71 User Manual: NextFrame Method

SharpLeaf.NextFrame Method

Skip flow to a new Frame – may imply a new page.

Overloads

  • public string NextFrame();
  • public string NextFrame(Frame frame);
  • public string NextFrame(string frameid);

Result

Frame.Id actually used.

Example

   lf.NextFrame();  // Skip to next frame

Description

If the target frame belongs to a PageLayout.FrameList, all the frames before it will be skipped. Otherwise, the target frame is inserted in front of the current page’s frame list, so that flow will resume to normal at the next frame skip. In all cases the current frame is considered done.

See also ...

Frame : PageElement Class | SharpLeaf Members | PageLayout.FrameList Property | Frame.Skip Property | Frame.Id Property


SharpPlot 3.71 User Manual: NextFrame Method

SharpLeaf.NextFrame Method

Skip to the next frame, possibly starting a new page.

public string NextFrame();

Result

Frame.Id actually used.

See also ...

SharpLeaf Members | SharpLeaf.NextFrame Method


SharpPlot 3.71 User Manual: NextFrame Method (Frame)

SharpLeaf.NextFrame Method (Frame)

Skip to a floating Frame on current page.

public string NextFrame(
    Frame frame
);
return value
Frame.Id actually used.

See also ...

SharpLeaf Members | SharpLeaf.NextFrame Method


SharpPlot 3.71 User Manual: NextFrame Method (String)

SharpLeaf.NextFrame Method (String)

Skip flow to a new Frame – may imply a new page.

public string NextFrame(
    string frameid
);
frameid
Frame.Id to use for next frame (defaults to empty string for next frame in the default list).
return value
Frame.Id actually used.

See also ...

SharpLeaf Members | SharpLeaf.NextFrame Method


SharpPlot 3.71 User Manual: NextLine Method

SharpLeaf.NextLine Method

Skip to next line – optionally skipping several.

Overloads

  • public void NextLine();
  • public void NextLine(int newlines);

Example

   lf.NextLine(2);  // Two new lines

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: NextLine Method

SharpLeaf.NextLine Method

Skip to next line.

public void NextLine();

See also ...

SharpLeaf Members | SharpLeaf.NextLine Method


SharpPlot 3.71 User Manual: NextLine Method (Int32)

SharpLeaf.NextLine Method (Int32)

Skip to next line – optionally skipping several.

public void NextLine(
    int newlines
);
newlines
number of new lines.

See also ...

SharpLeaf Members | SharpLeaf.NextLine Method


SharpPlot 3.71 User Manual: NextPage Method

SharpLeaf.NextPage Method

Force page throws.

Overloads

  • public int NextPage();
  • public int NextPage(int pages);

Result

New page number (starting at 1).

Example

   lf.NextPage();  // Skip to next page

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: NextPage Method

SharpLeaf.NextPage Method

Force a single page throw.

public int NextPage();

Result

New page number (starting at 1).

See also ...

SharpLeaf Members | SharpLeaf.NextPage Method


SharpPlot 3.71 User Manual: NextPage Method (Int32)

SharpLeaf.NextPage Method (Int32)

Force page throws.

public int NextPage(
    int pages
);
pages
Number of pages to skip.
return value
New page number (starting at 1).

See also ...

SharpLeaf Members | SharpLeaf.NextPage Method


SharpPlot 3.71 User Manual: NextParagraph Method

SharpLeaf.NextParagraph Method

Skip to next paragraph – does nothing if already in a new paragraph. To bump space between paragraph, use IncludeSpace.

public void NextParagraph();

See also ...

Paragraph Glossary | SharpLeaf Members


SharpPlot 3.71 User Manual: NextTab Method

SharpLeaf.NextTab Method

Skip a number of tabstops.

Overloads

  • public void NextTab();
  • public void NextTab(int tabs);

Example

   lf.NextTab();  // Skip to next tab

See also ...

SharpLeaf Members | ParagraphStyle.SetTabs Method


SharpPlot 3.71 User Manual: NextTab Method

SharpLeaf.NextTab Method

Skip a single tabstop.

public void NextTab();

See also ...

SharpLeaf Members | SharpLeaf.NextTab Method


SharpPlot 3.71 User Manual: NextTab Method (Int32)

SharpLeaf.NextTab Method (Int32)

Skip a number of tabstops.

public void NextTab(
    int tabs
);
tabs
number of tabstops to skip.

See also ...

SharpLeaf Members | SharpLeaf.NextTab Method


SharpPlot 3.71 User Manual: PopStyle Method

SharpLeaf.PopStyle Method

Restore the ParagraphStyle used before the last PushStyle().

public void PopStyle();

See also ...

ParagraphStyle Structure | SharpLeaf Members | SharpLeaf.Style Property | SharpLeaf.PushStyle Method


SharpPlot 3.71 User Manual: PushStyle Method

SharpLeaf.PushStyle Method

Temporarily change the current ParagraphStyle, while pushing previous on to the style stack – undone by PopStyle().

The pushed ParagraphStyle is still a reference, so modifications to it will be applied after the matching PopStyle().

Overloads

  • public void PushStyle();
  • public void PushStyle(string extras);
  • public void PushStyle(ParagraphStyle style);
  • public void PushStyle(ParagraphStyle style,string extras);

Example

   lf.PushStyle("Alignment=Center");
   lf.AddParagraphs("Centered text");
   lf.PopStyle();

See also ...

SharpLeaf Members | SharpLeaf.Style Property | SharpLeaf.PopStyle Method


SharpPlot 3.71 User Manual: PushStyle Method

SharpLeaf.PushStyle Method

Push a clone of the current style.

public void PushStyle();

See also ...

SharpLeaf Members | SharpLeaf.PushStyle Method


SharpPlot 3.71 User Manual: PushStyle Method (String)

SharpLeaf.PushStyle Method (String)

Push a clone of the current style, amending it with extra properties.

public void PushStyle(
    string extras
);
extras
Extra temporary settings as produced by the ParagraphStyle.ToString method.

See also ...

SharpLeaf Members | SharpLeaf.PushStyle Method


SharpPlot 3.71 User Manual: PushStyle Method (ParagraphStyle)

SharpLeaf.PushStyle Method (ParagraphStyle)

Push a given style (and not a clone).

public void PushStyle(
    ParagraphStyle style
);
style
Style to use (clone of current by default).

See also ...

SharpLeaf Members | SharpLeaf.PushStyle Method


SharpPlot 3.71 User Manual: PushStyle Method (ParagraphStyle,String)

SharpLeaf.PushStyle Method (ParagraphStyle,String)

Temporarily change the current ParagraphStyle, while pushing previous on to the style stack – undone by PopStyle.

public void PushStyle(
    ParagraphStyle style,
    string extras
);
style
Style to use (clone of current by default).
extras
Extra temporary settings as produced by the ParagraphStyle.ToString method.

See also ...

SharpLeaf Members | SharpLeaf.PushStyle Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method

SharpLeaf.RenderAnimatedSvg Method

Return report rendered as animated SVG, with one frame per page.

If the delay is 0, then the user can flick through pages with keyboard arrows or mouse wheel.

Overloads

  • public string RenderAnimatedSvg();
  • public string RenderAnimatedSvg(double delay);
  • public string RenderAnimatedSvg(double delay,SvgMode mode);
  • public string RenderAnimatedSvg(double delay,SvgMode mode,double dpi);
  • public string RenderAnimatedSvg(double delay,SvgMode mode,double dpi,string header);

Result

Report as animated SVG.

Example

   svg = lf.RenderAnimatedSvg(1); // Render report as animated svg, 1 second per page;

See also ...

SharpLeaf Members | SharpLeaf.RenderSvg Method | SharpLeaf.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method

SharpLeaf.RenderAnimatedSvg Method

Return report as animated SVG at one page per second, with fixed size at 96 dpi.

public string RenderAnimatedSvg();

Result

Report as animated SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double)

SharpLeaf.RenderAnimatedSvg Method (Double)

Return report as animated SVG with fixed size SVG at 96 dpi.

public string RenderAnimatedSvg(
    double delay
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
return value
Report as animated SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode)

SharpLeaf.RenderAnimatedSvg Method (Double,SvgMode)

Return report as animated SVG with given aspect setting.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
return value
Report as animated SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode,Double)

SharpLeaf.RenderAnimatedSvg Method (Double,SvgMode,Double)

Return report as animated SVG with given aspect setting and resolution.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode,
    double dpi
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
return value
Report as animated SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode,Double,String)

SharpLeaf.RenderAnimatedSvg Method (Double,SvgMode,Double,String)

Return report rendered as animated SVG, with one frame per page.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode,
    double dpi,
    string header
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
header
Arbitrary SVG code to include before report.
return value
Report as animated SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderDocument Method

SharpLeaf.RenderDocument Method

Return completed report as a Document instance, for advanced page-level control and output.

Overloads

  • public Document RenderDocument();
  • public Document RenderDocument(int page);
  • public Document RenderDocument(int[] pages);

Result

Document containing report.

Example

   doc = lf.RenderDocument(lf.Page);  // Get current page only
   doc.SaveImage("page"+lf.Page.ToString()+".png",ImageFormat.Png);

See also ...

Document Class | SharpLeaf Members


SharpPlot 3.71 User Manual: RenderDocument Method

SharpLeaf.RenderDocument Method

Return report as a Document instance.

public Document RenderDocument();

Result

Document containing chart.

See also ...

SharpLeaf Members | SharpLeaf.RenderDocument Method


SharpPlot 3.71 User Manual: RenderDocument Method (Int32)

SharpLeaf.RenderDocument Method (Int32)

Return selected report page as a Document instance.

public Document RenderDocument(
    int page
);
return value
Document containing chart.

See also ...

SharpLeaf Members | SharpLeaf.RenderDocument Method


SharpPlot 3.71 User Manual: RenderDocument Method (Int32[])

SharpLeaf.RenderDocument Method (Int32[])

Return completed report as a Document instance.

public Document RenderDocument(
    int[] pages
);
pages
Report pages to put into Document (in that order).
return value
Document containing chart.

See also ...

SharpLeaf Members | SharpLeaf.RenderDocument Method


SharpPlot 3.71 User Manual: RenderLog Method

SharpLeaf.RenderLog Method

Return report as a readable log.

The optional prescan flag will parse any HTML tagged text into simple settings of font and associated text fragments. It will also ensure 7-bit ASCII output by HTML-encoding any hi-bit or Unicode characters.

The standard log only records drawing instructions – this makes it ideal for text comparison tools to check for changes to graphics output. The optional detail flag will add logging of internal settings (used for animations and JavaScript handlers) if you need to debug these.

Overloads

  • public string RenderLog();
  • public string RenderLog(bool prescan);
  • public string RenderLog(bool prescan,bool detail);

Result

Readable version of internal report macros.

Example

   log = lf.RenderLog();

See also ...

SharpLeaf Members | SharpLeaf.SaveLog Method


SharpPlot 3.71 User Manual: RenderLog Method

SharpLeaf.RenderLog Method

Return unprocessed, undetailed log.

public string RenderLog();

Result

Readable version of internal report macros.

See also ...

SharpLeaf Members | SharpLeaf.RenderLog Method


SharpPlot 3.71 User Manual: RenderLog Method (Boolean)

SharpLeaf.RenderLog Method (Boolean)

Return undetailed log, with optional pre-scan flag.

public string RenderLog(
    bool prescan
);
prescan
Flag to allow the prescan code to run on the intermediate page format.
return value
Readable version of internal report macros.

See also ...

SharpLeaf Members | SharpLeaf.RenderLog Method


SharpPlot 3.71 User Manual: RenderLog Method (Boolean,Boolean)

SharpLeaf.RenderLog Method (Boolean,Boolean)

Return report as a readable log.

public string RenderLog(
    bool prescan,
    bool detail
);
prescan
Flag to allow the prescan code to run on the intermediate page format.
detail
Flag to allow ids and other detail to be shown in addition to basic logging.
return value
Readable version of internal report macros.

See also ...

SharpLeaf Members | SharpLeaf.RenderLog Method


SharpPlot 3.71 User Manual: RenderPdf Method

SharpLeaf.RenderPdf Method

Return report as a PDF stream.

The default is to have the document open in the user’s default mode, to embed all non-standard TrueType fonts and to compress the PDF content. You can set the PdfMode to open the outlines window, or to start with the document in full-screen view (useful for presentations).

By default, all fonts except the ‘base-14’ set will be embedded in the document automatically. If you are sure that all your potential viewers will have the fonts you have used, then set the noembed list to the names of the safe fonts, for example “Verdana,Perpetua” would be typical. This will make the document very much smaller, and the Acrobat Reader will usually be quite successful in substituting missing fonts if you are unlucky.

Overloads

  • public string RenderPdf();
  • public string RenderPdf(PdfMode mode);
  • public string RenderPdf(PdfMode mode,bool deflate);
  • public string RenderPdf(PdfMode mode,bool deflate,string noembed);

Result

Report as PDF.

Example

  // Show bookmarks and compress
   pdf = lf.RenderPdf(PdfMode.ShowOutlines,true);

Embedding the PDF into a webpage

If you want to write the PDF content directly into a webpage, you should give it the correct content type “application/pdf”, and link to it with an appropriate <embed> tag such as:

<embed src="makepdf.aspx" height=300 width=640 type="application/pdf" >

The PdfMode parameter of RenderPDF should be set to FullScreen here, which causes the Acrobat Reader to occupy the entire frame set up by the <embed> tag with no toolbars or scrollbars. If you render a multipage PDF here, set the flag to ShowOutlines and allow enough extra space for the outline pane and Acrobat Reader toolbars. You will probably need to experiment to get the height and width to look correct.

See also ...

SharpLeaf Members | SharpLeaf.SavePdf Method


SharpPlot 3.71 User Manual: RenderPdf Method

SharpLeaf.RenderPdf Method

PDF will be opened in user’s default view with all fonts embedded and will be compressed.

public string RenderPdf();

Result

Report as PDF.

See also ...

SharpLeaf Members | SharpLeaf.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode)

SharpLeaf.RenderPdf Method (PdfMode)

PDF will have all non-native fonts embedded and is compressed.

public string RenderPdf(
    PdfMode mode
);
mode
Controls how the PDF is shown on opening.
return value
Report as PDF.

See also ...

SharpLeaf Members | SharpLeaf.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode,Boolean)

SharpLeaf.RenderPdf Method (PdfMode,Boolean)

PDF optionally compressed and will open in chosen mode with all fonts embedded.

public string RenderPdf(
    PdfMode mode,
    bool deflate
);
mode
Controls how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
return value
Report as PDF.

See also ...

SharpLeaf Members | SharpLeaf.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode,Boolean,String)

SharpLeaf.RenderPdf Method (PdfMode,Boolean,String)

Return report as a PDF stream.

public string RenderPdf(
    PdfMode mode,
    bool deflate,
    string noembed
);
mode
Controls how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
noembed
Selected fonts to be omitted (comma-separated list of names).
return value
Report as PDF.

See also ...

SharpLeaf Members | SharpLeaf.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPS Method

SharpLeaf.RenderPS Method

Return report rendered as raw PostScript.

Overloads

  • public string RenderPS();
  • public string RenderPS(bool forceMonochrome);
  • public string RenderPS(bool forceMonochrome,string prologue);

Result

The result of this call is a string representation of a PostScript document. This may be written to file as text or directly to any PostScript device. If the final output is to be monochrome, it is better to have SharpPlot render the chart in black and white at this point, rather than rely on the printer to greyscale it. The prologue may contain arbitrary PostScript code to include before first page.

Example

   ps = lf.RenderPS();

See also ...

SharpLeaf Members | SharpLeaf.SavePS Method


SharpPlot 3.71 User Manual: RenderPS Method

SharpLeaf.RenderPS Method

Return PostScript in full color.

public string RenderPS();

Result

Report as PostScript.

See also ...

SharpLeaf Members | SharpLeaf.RenderPS Method


SharpPlot 3.71 User Manual: RenderPS Method (Boolean)

SharpLeaf.RenderPS Method (Boolean)

Return PostScript with monochrome flag.

public string RenderPS(
    bool forceMonochrome
);
forceMonochrome
Disable color support (defaults to false).
return value
Report as PostScript.

See also ...

SharpLeaf Members | SharpLeaf.RenderPS Method


SharpPlot 3.71 User Manual: RenderPS Method (Boolean,String)

SharpLeaf.RenderPS Method (Boolean,String)

Return report rendered as raw PostScript.

public string RenderPS(
    bool forceMonochrome,
    string prologue
);
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before first page.
return value
Report as PostScript.

See also ...

SharpLeaf Members | SharpLeaf.RenderPS Method


SharpPlot 3.71 User Manual: RenderSvg Method

SharpLeaf.RenderSvg Method

Return report rendered as SVG.

Overloads

  • public string RenderSvg();
  • public string RenderSvg(SvgMode mode);
  • public string RenderSvg(SvgMode mode,double dpi);
  • public string RenderSvg(SvgMode mode,double dpi,PageMode pagemode);
  • public string RenderSvg(SvgMode mode,double dpi,PageMode pagemode,string header);

Result

The result of this call is a string representation of an SVG document. This may be written to file as text for inclusion in a webpage, or returned via HTTP with content type “image/svg+xml”.

Most modern browsers (including Microsoft Internet Explorer 9 – 2011) natively support SVG. So not only they will display SVG files save with SaveSvg, but you can also inline the string returned by RenderSvg directly into you HTML body.

For compatibility with older browsers, you can embed the SVG using the <embed> tag :

<embed src="mychart.svg" height=300 width=640 type="image/svg+xml">

Example

  // Render SVG that fits to container's width
   svg = lf.RenderSvg(SvgMode.FitWidth);

See also ...

SharpLeaf Members | SharpLeaf.SaveSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method

SharpLeaf.RenderSvg Method

Return report as fixed size SVG at 96 dpi.

public string RenderSvg();

Result

Report as SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode)

SharpLeaf.RenderSvg Method (SvgMode)

Return report as SVG with given aspect setting.

public string RenderSvg(
    SvgMode mode
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
return value
Report as SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double)

SharpLeaf.RenderSvg Method (SvgMode,Double)

Return report as SVG with given aspect setting and resolution.

public string RenderSvg(
    SvgMode mode,
    double dpi
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
return value
Report as SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double,PageMode)

SharpLeaf.RenderSvg Method (SvgMode,Double,PageMode)

Return report as SVG with given aspect setting and resolution, and page mode.

public string RenderSvg(
    SvgMode mode,
    double dpi,
    PageMode pagemode
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
pagemode
Page layout to use (defaults to PageMode.Vertical).
return value
Report as SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double,PageMode,String)

SharpLeaf.RenderSvg Method (SvgMode,Double,PageMode,String)

Return report rendered as SVG.

public string RenderSvg(
    SvgMode mode,
    double dpi,
    PageMode pagemode,
    string header
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary SVG code to include before chart.
return value
Report as SVG.

See also ...

SharpLeaf Members | SharpLeaf.RenderSvg Method


SharpPlot 3.71 User Manual: RenderXaml Method

SharpLeaf.RenderXaml Method

Return report rendered as a XAML Canvas.

Overloads

  • public string RenderXaml();
  • public string RenderXaml(double dpi);
  • public string RenderXaml(double dpi,PageMode pagemode);
  • public string RenderXaml(double dpi,PageMode pagemode,string header);
  • public string RenderXaml(double dpi,PageMode pagemode,string header,bool html);

Result

To make use of this format on the internet you can wrap the XAML content in HTML by setting the html flag to true. The page will reference the silverlight.js file supplied with the plugin, and also the silverplot.js file supplied with SharpPlot. This is very convenient for initial testing, but you will probably want to make your own wrapper page for production use. In any case, the web browser will need a SilverLight plugin.

Example

  // Render at 96 DPI, displaying pages horizontally side-by-side
   xaml = lf.RenderXaml(96,PageMode.Horizontal);

See also ...

SharpLeaf Members | SharpLeaf.SaveXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method

SharpLeaf.RenderXaml Method

Return report as XAML at 96 dpi.

public string RenderXaml();

Result

Completed XAML Canvas containing report.

See also ...

SharpLeaf Members | SharpLeaf.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double)

SharpLeaf.RenderXaml Method (Double)

Return report as XAML with given resolution.

public string RenderXaml(
    double dpi
);
dpi
Resolution to use, in dots per inch (defaults to 96).
return value
Completed XAML Canvas containing report.

See also ...

SharpLeaf Members | SharpLeaf.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,PageMode)

SharpLeaf.RenderXaml Method (Double,PageMode)

Return report as XAML with given resolution and page mode.

public string RenderXaml(
    double dpi,
    PageMode pagemode
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
return value
Completed XAML Canvas containing report.

See also ...

SharpLeaf Members | SharpLeaf.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,PageMode,String)

SharpLeaf.RenderXaml Method (Double,PageMode,String)

Return report as XAML with given resolution, page mode, and extra header content.

public string RenderXaml(
    double dpi,
    PageMode pagemode,
    string header
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.
return value
Completed XAML Canvas containing report.

See also ...

SharpLeaf Members | SharpLeaf.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,PageMode,String,Boolean)

SharpLeaf.RenderXaml Method (Double,PageMode,String,Boolean)

Return report rendered as a XAML Canvas.

public string RenderXaml(
    double dpi,
    PageMode pagemode,
    string header,
    bool html
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.
html
Wrap XAML Canvas into an HTML page, using Silverlight.js and Silverplot.js (defaults to false).
return value
Completed XAML Canvas containing report.

See also ...

SharpLeaf Members | SharpLeaf.RenderXaml Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method

SharpLeaf.SaveAnimatedGif Method

Save report rendered through raster engine as an animated GIF file, one frame per page.

Animated GIF cannot be rendered as an in-memory C# object because .Net does not support animated GIF format.

Overloads

  • public void SaveAnimatedGif(string filename);
  • public void SaveAnimatedGif(string filename,double delay);
  • public void SaveAnimatedGif(string filename,double delay,double dpi);
  • public void SaveAnimatedGif(string filename,double delay,double dpi,TextRenderingHint textmode);

Example

   lf.SaveAnimatedGif("report.gif",1,72);
            // Save report as animated gif at 72 DPI, 1 second per page;

See also ...

SharpLeaf Members


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String)

SharpLeaf.SaveAnimatedGif Method (String)

Save animated GIF at 96 dpi, 1 frame per second.

public void SaveAnimatedGif(
    string filename
);
filename
Name of output file.

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double)

SharpLeaf.SaveAnimatedGif Method (String,Double)

Save animated GIF at given resolution, 1 frame per second.

public void SaveAnimatedGif(
    string filename,
    double delay
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double,Double)

SharpLeaf.SaveAnimatedGif Method (String,Double,Double)

Save animated GIF at given resolution and animation delay.

public void SaveAnimatedGif(
    string filename,
    double delay,
    double dpi
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double,Double,TextRenderingHint)

SharpLeaf.SaveAnimatedGif Method (String,Double,Double,TextRenderingHint)

Save report rendered through raster engine as an animated GIF file, one frame per page.

public void SaveAnimatedGif(
    string filename,
    double delay,
    double dpi,
    TextRenderingHint textmode
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).
dpi
Resolution to use, in dots per inch (defaults to 96).
textmode
Text rendering mode to use (defaults to TextRenderingHint.AntiAlias).

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method

SharpLeaf.SaveAnimatedSvg Method

Save report to named file as animated SVG, with one frame per page.

If the delay is 0, then the user can flick through pages with keyboard arrows or mouse wheel.

Overloads

  • public void SaveAnimatedSvg(string filename);
  • public void SaveAnimatedSvg(string filename,double delay);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode,double dpi);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode,double dpi,string header);

Example

   lf.SaveAnimatedSvg("report.svg",1); // Save report as animated SVG, 1 second per page;

See also ...

SharpLeaf Members | SharpLeaf.RenderAnimatedSvg Method | SharpLeaf.SaveSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String)

SharpLeaf.SaveAnimatedSvg Method (String)

Save report as animated SVG at 1 page per second, with fixed size at 96dpi.

public void SaveAnimatedSvg(
    string filename
);
filename
Name of output file.

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double)

SharpLeaf.SaveAnimatedSvg Method (String,Double)

Save report as animated SVG with fixed size at 96dpi.

public void SaveAnimatedSvg(
    string filename,
    double delay
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode)

SharpLeaf.SaveAnimatedSvg Method (String,Double,SvgMode)

Save report as animated SVG with given aspect ratio setting.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode,Double)

SharpLeaf.SaveAnimatedSvg Method (String,Double,SvgMode,Double)

Save report as animated SVG with given aspect setting and resolution.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode,
    double dpi
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode,Double,String)

SharpLeaf.SaveAnimatedSvg Method (String,Double,SvgMode,Double,String)

Save report to named file as animated SVG, with one frame per page.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode,
    double dpi,
    string header
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).
header
Arbitrary SVG code to include before report.

See also ...

SharpLeaf Members | SharpLeaf.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveLog Method

SharpLeaf.SaveLog Method

Save completed report as a readable log file.

The optional prescan flag will parse any HTML tagged text into simple settings of font and associated text fragments. It will also ensure 7-bit ASCII output by HTML-encoding any hi-bit or Unicode characters.

The standard log only records drawing instructions – this makes it ideal for text comparison tools to check for changes to graphics output. The optional detail flag will add logging of internal settings (used for animations and JavaScript handlers) if you need to debug these.

Overloads

  • public void SaveLog(string filename);
  • public void SaveLog(string filename,bool prescan);
  • public void SaveLog(string filename,bool prescan,bool detail);

Example

   lf.SaveLog("myreport.log");

See also ...

SharpLeaf Members | SharpLeaf.RenderLog Method


SharpPlot 3.71 User Manual: SaveLog Method (String)

SharpLeaf.SaveLog Method (String)

Save unprocessed, undetailed log.

public void SaveLog(
    string filename
);
filename
Name of output text file.

See also ...

SharpLeaf Members | SharpLeaf.SaveLog Method


SharpPlot 3.71 User Manual: SaveLog Method (String,Boolean)

SharpLeaf.SaveLog Method (String,Boolean)

Save undetailed log, specifying pre-scan flag.

public void SaveLog(
    string filename,
    bool prescan
);
filename
Name of output text file.
prescan
Flag to allow the prescan code to run on the intermediate page format.

See also ...

SharpLeaf Members | SharpLeaf.SaveLog Method


SharpPlot 3.71 User Manual: SaveLog Method (String,Boolean,Boolean)

SharpLeaf.SaveLog Method (String,Boolean,Boolean)

Save completed report as a readable log file.

public void SaveLog(
    string filename,
    bool prescan,
    bool detail
);
filename
Name of output text file.
prescan
Flag to allow the prescan code to run on the intermediate page format.
detail
Flag to allow ids and other detail to be shown in addition to basic logging.

See also ...

SharpLeaf Members | SharpLeaf.SaveLog Method


SharpPlot 3.71 User Manual: SavePdf Method

SharpLeaf.SavePdf Method

Save report to named file as PDF. See the RenderPdf method for more information.

Overloads

  • public void SavePdf(string filename);
  • public void SavePdf(string filename,PdfMode mode);
  • public void SavePdf(string filename,PdfMode mode,bool deflate);
  • public void SavePdf(string filename,PdfMode mode,bool deflate,string noembed);

Example

  // Show bookmarks and compress
   lf.SavePdf("myreport.pdf",PdfMode.ShowOutlines,true);

See also ...

SharpLeaf Members | SharpLeaf.RenderPdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String)

SharpLeaf.SavePdf Method (String)

PDF will be opened in user’s default view with all fonts embedded and will be compressed.

public void SavePdf(
    string filename
);
filename
Name of output file.

See also ...

SharpLeaf Members | SharpLeaf.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode)

SharpLeaf.SavePdf Method (String,PdfMode)

PDF will have all non-native fonts embedded and is compressed.

public void SavePdf(
    string filename,
    PdfMode mode
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.

See also ...

SharpLeaf Members | SharpLeaf.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode,Boolean)

SharpLeaf.SavePdf Method (String,PdfMode,Boolean)

PDF optionally compressed and will open in chosen mode with all fonts embedded.

public void SavePdf(
    string filename,
    PdfMode mode,
    bool deflate
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).

See also ...

SharpLeaf Members | SharpLeaf.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode,Boolean,String)

SharpLeaf.SavePdf Method (String,PdfMode,Boolean,String)

Save report to named file as PDF.

public void SavePdf(
    string filename,
    PdfMode mode,
    bool deflate,
    string noembed
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
noembed
Allow selected fonts to be omitted (comma-separated list of names).

See also ...

SharpLeaf Members | SharpLeaf.SavePdf Method


SharpPlot 3.71 User Manual: SavePS Method

SharpLeaf.SavePS Method

Save report to named file as raw PostScript. See the RenderPS method for more information.

Overloads

  • public void SavePS(string filename);
  • public void SavePS(string filename,bool forceMonochrome);
  • public void SavePS(string filename,bool forceMonochrome,string prologue);

Example

   lf.SavePS("myreport.ps");

See also ...

SharpLeaf Members | SharpLeaf.RenderPS Method


SharpPlot 3.71 User Manual: SavePS Method (String)

SharpLeaf.SavePS Method (String)

Save PostScript with full colour.

public void SavePS(
    string filename
);
filename
Name of output file.

See also ...

SharpLeaf Members | SharpLeaf.SavePS Method


SharpPlot 3.71 User Manual: SavePS Method (String,Boolean)

SharpLeaf.SavePS Method (String,Boolean)

Save PostScript with monochrome flag.

public void SavePS(
    string filename,
    bool forceMonochrome
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).

See also ...

SharpLeaf Members | SharpLeaf.SavePS Method


SharpPlot 3.71 User Manual: SavePS Method (String,Boolean,String)

SharpLeaf.SavePS Method (String,Boolean,String)

Save report to named file as raw PostScript.

public void SavePS(
    string filename,
    bool forceMonochrome,
    string prologue
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before first page.

See also ...

SharpLeaf Members | SharpLeaf.SavePS Method


SharpPlot 3.71 User Manual: SaveSvg Method

SharpLeaf.SaveSvg Method

Save report to named file as Scalable Vector Graphic. See RenderSvg for more information.

Overloads

  • public void SaveSvg(string filename);
  • public void SaveSvg(string filename,SvgMode mode);
  • public void SaveSvg(string filename,SvgMode mode,double dpi);
  • public void SaveSvg(string filename,SvgMode mode,double dpi,PageMode pagemode);
  • public void SaveSvg(string filename,SvgMode mode,double dpi,PageMode pagemode,string header);

Example

  // Render SVG that fits to container's width
   lf.SaveSvg("myreport.svg",SvgMode.FitWidth);

See also ...

SharpLeaf Members | SharpLeaf.RenderSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String)

SharpLeaf.SaveSvg Method (String)

Save report as SVG with fixed size at 96dpi.

public void SaveSvg(
    string filename
);
filename
Name of output file.

See also ...

SharpLeaf Members | SharpLeaf.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode)

SharpLeaf.SaveSvg Method (String,SvgMode)

Save report as SVG with given aspect ratio setting.

public void SaveSvg(
    string filename,
    SvgMode mode
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).

See also ...

SharpLeaf Members | SharpLeaf.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double)

SharpLeaf.SaveSvg Method (String,SvgMode,Double)

Save report as SVG with given aspect setting and resolution.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).

See also ...

SharpLeaf Members | SharpLeaf.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double,PageMode)

SharpLeaf.SaveSvg Method (String,SvgMode,Double,PageMode)

Save report as SVG with given aspect setting, resolution and page mode.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi,
    PageMode pagemode
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).
pagemode
Page layout to use (defaults to PageMode.Vertical).

See also ...

SharpLeaf Members | SharpLeaf.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double,PageMode,String)

SharpLeaf.SaveSvg Method (String,SvgMode,Double,PageMode,String)

Save report to named file as SVG.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi,
    PageMode pagemode,
    string header
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary SVG code to include before chart.

See also ...

SharpLeaf Members | SharpLeaf.SaveSvg Method


SharpPlot 3.71 User Manual: SaveXaml Method

SharpLeaf.SaveXaml Method

Save report to named file as a XAML Canvas. See the RenderXaml method for more information.

Overloads

  • public void SaveXaml(string filename);
  • public void SaveXaml(string filename,double dpi);
  • public void SaveXaml(string filename,double dpi,PageMode pagemode);
  • public void SaveXaml(string filename,double dpi,PageMode pagemode,string header);
  • public void SaveXaml(string filename,double dpi,PageMode pagemode,string header,bool html);

Example

  // Render at 96 DPI, displaying pages horizontally side-by-side
   lf.SaveXaml("myreport.xaml",96,PageMode.Horizontal);

See also ...

SharpLeaf Members | SharpLeaf.RenderXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String)

SharpLeaf.SaveXaml Method (String)

Save report as XAML at 96 dpi.

public void SaveXaml(
    string filename
);
filename
Name of output file.

See also ...

SharpLeaf Members | SharpLeaf.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double)

SharpLeaf.SaveXaml Method (String,Double)

Save report as XAML with given resolution.

public void SaveXaml(
    string filename,
    double dpi
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

SharpLeaf Members | SharpLeaf.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,PageMode)

SharpLeaf.SaveXaml Method (String,Double,PageMode)

Save report as XAML with given resolution and page mode.

public void SaveXaml(
    string filename,
    double dpi,
    PageMode pagemode
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).

See also ...

SharpLeaf Members | SharpLeaf.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,PageMode,String)

SharpLeaf.SaveXaml Method (String,Double,PageMode,String)

Save report as XAML with given resolution, page mode, and extra header content.

public void SaveXaml(
    string filename,
    double dpi,
    PageMode pagemode,
    string header
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.

See also ...

SharpLeaf Members | SharpLeaf.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,PageMode,String,Boolean)

SharpLeaf.SaveXaml Method (String,Double,PageMode,String,Boolean)

Save report to named file as a XAML Canvas.

public void SaveXaml(
    string filename,
    double dpi,
    PageMode pagemode,
    string header,
    bool html
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.
html
Wrap XAML Canvas into an HTML page, using Silverlight.js and Silverplot.js (defaults to false).

See also ...

SharpLeaf Members | SharpLeaf.SaveXaml Method


SharpPlot 3.71 User Manual: SetArgument Method

SharpLeaf.SetArgument Method

Set a specific argument in the ArgumentList.

public void SetArgument(
    int tgt,
    string arg
);
tgt
index of the argument, starting at {1}.
arg
string to substitute.

Example

  // replace "{1}" with "(draft #7)" in TextBlock captions
   lf.SetArgument(1,"(draft #7)");

See also ...

TextBlock : PageElement Class | SharpLeaf Members | SharpLeaf.ArgumentList Property | TextBlock.Caption Property


SharpPlot 3.71 User Manual: SetBookmark Method

SharpLeaf.SetBookmark Method

Create a bookmark entry for upcoming element (paragraph, inclusion, etc.).

Overloads

  • public void SetBookmark(string title,int level,bool open);
  • public void SetBookmark(string title,int level);
  • public void SetBookmark(string title);
  • public void SetBookmark(string title,int level,bool open,string url);

Example

  // Set up a level-3 bookmark that is not opened by default in the PDF viewer
   bkmk357 = "3.5.7 - Pre-conclusions #14";
   lf.SetBookmark(bkmk357,3,false);
   lf.AddParagraphs("Research suggests that deep report structures may have soporific "+
            "effects on readers.");
  // [...]
   lf.AddText("As seen earlier ");
   lf.AddBookmarkReference(bkmk357,"(cf. p.{page} - {title})");  // will be clickable in PDF only

Description

The page number of any bookmark (even upcoming ones) can be printed with AddBookmarkReference.

Bookmarks can automatically be generated for paragraphs with ParagraphStyle.BookmarkLevel.

Only the PDF format supports bookmark browsing at view time (which can be forced with PdfMode.ShowOutlines).

See also ...

SharpLeaf Members | SharpLeaf.AddBookmarkReference Method | ParagraphStyle.BookmarkLevel Property


SharpPlot 3.71 User Manual: SetBookmark Method (String,Int32,Boolean)

SharpLeaf.SetBookmark Method (String,Int32,Boolean)

Create bookmark with title, level, opened flag.

public void SetBookmark(
    string title,
    int level,
    bool open
);
title
title and unique identifier of the bookmark.
level
level of the bookmark in the bookmark tree view, starting at 1 (PDF only).
open
is the bookmark opened in the bookmark tree view (PDF only).

See also ...

SharpLeaf Members | SharpLeaf.SetBookmark Method


SharpPlot 3.71 User Manual: SetBookmark Method (String,Int32)

SharpLeaf.SetBookmark Method (String,Int32)

Create bookmark with title, level.

public void SetBookmark(
    string title,
    int level
);
title
title and unique identifier of the bookmark.
level
level of the bookmark in the bookmark tree view, starting at 1 (PDF only).

See also ...

SharpLeaf Members | SharpLeaf.SetBookmark Method


SharpPlot 3.71 User Manual: SetBookmark Method (String)

SharpLeaf.SetBookmark Method (String)

Create bookmark with title only.

public void SetBookmark(
    string title
);
title
title and unique identifier of the bookmark.

See also ...

SharpLeaf Members | SharpLeaf.SetBookmark Method


SharpPlot 3.71 User Manual: SetBookmark Method (String,Int32,Boolean,String)

SharpLeaf.SetBookmark Method (String,Int32,Boolean,String)

Create a bookmark entry for upcoming element (paragraph, text, includes, etc.).

public void SetBookmark(
    string title,
    int level,
    bool open,
    string url
);
title
title and unique identifier of the bookmark.
level
level of the bookmark in the bookmark tree view, starting at 1 (PDF only).
open
is the bookmark opened in the bookmark tree view (PDF only).
url
external resource to link to – instead of internal jump to target paragraph (PDF only).

See also ...

SharpLeaf Members | SharpLeaf.SetBookmark Method


SharpPlot 3.71 User Manual: SetBox Method

SharpLeaf.SetBox Method

Start and stop boxing decorations around text.

The horizontal spacing between the text and the box is controlled by ParagraphStyle.HorizontalGap.

Overloads

  • public void SetBox();
  • public void SetBox(BoxStyle style);

Example

   lf.SetBox(new BoxStyle(new int[]{2,0,0,0},Color.Firebrick));  // Left edge only, 2-point thick
   lf.AddParagraphs("This paragraph has a change bar on the left");

Remarks

You will need to set and unset the box at paragraph boundaries (that is, right after NextParagraph or AddParagraphs) if you want the paragraph’s SpaceBefore and SpaceAfter to be included in the box.

See also ...

Advanced Text Control | SharpLeaf Members


SharpPlot 3.71 User Manual: SetBox Method

SharpLeaf.SetBox Method

End current boxing if any and disable boxing.

public void SetBox();

See also ...

SharpLeaf Members | SharpLeaf.SetBox Method


SharpPlot 3.71 User Manual: SetBox Method (BoxStyle)

SharpLeaf.SetBox Method (BoxStyle)

Set up boxing for upcoming text with default gutter.

public void SetBox(
    BoxStyle style
);
style
Boxing decorations around block – null to stop boxing, otherwise start a new one.

See also ...

SharpLeaf Members | SharpLeaf.SetBox Method


SharpPlot 3.71 User Manual: SetCap Method

SharpLeaf.SetCap Method

Set up a dropped capital on upcoming paragraph.

Overloads

  • public void SetCap();
  • public void SetCap(int lines);
  • public void SetCap(int lines,int size);
  • public void SetCap(int lines,int size,bool topalign);

Example

  // Three-line high, single-character, bottom-aligned capital.
   lf.SetCap(3,1,false);

See also ...

Advanced Text Control | SharpLeaf Members | ParagraphStyle.HorizontalGap Property


SharpPlot 3.71 User Manual: SetCap Method

SharpLeaf.SetCap Method

Disable dropped capital.

public void SetCap();

See also ...

SharpLeaf Members | SharpLeaf.SetCap Method


SharpPlot 3.71 User Manual: SetCap Method (Int32)

SharpLeaf.SetCap Method (Int32)

Set up a drop cap on a single character, specifying number of lines of height.

public void SetCap(
    int lines
);
lines
number of lines that the dropped capital will take vertically.

See also ...

SharpLeaf Members | SharpLeaf.SetCap Method


SharpPlot 3.71 User Manual: SetCap Method (Int32,Int32)

SharpLeaf.SetCap Method (Int32,Int32)

Set up a dropped capital on upcoming paragraph, specifiying the number of characters or words to take from first line.

public void SetCap(
    int lines,
    int size
);
lines
number of lines that the dropped capital will take vertically.
size
positive : number of characters to drop from first word ; negative : number of words to drop from first line.

See also ...

SharpLeaf Members | SharpLeaf.SetCap Method


SharpPlot 3.71 User Manual: SetCap Method (Int32,Int32,Boolean)

SharpLeaf.SetCap Method (Int32,Int32,Boolean)

Set up a dropped capital on upcoming paragraph.

public void SetCap(
    int lines,
    int size,
    bool topalign
);
lines
number of lines that the dropped capital will take vertically.
size
positive : number of characters to drop from first word ; negative : number of words to drop from first line.
topalign
align text to flow to top of capital (true – the default) rather than from its baseline (false).

See also ...

SharpLeaf Members | SharpLeaf.SetCap Method


SharpPlot 3.71 User Manual: SetLayout Method

SharpLeaf.SetLayout Method

Change master page layout, closing any started page.

Overloads

  • public void SetLayout();
  • public void SetLayout(DocumentLayout layout);
  • public void SetLayout(DocumentLayout layout,string[] arglist);

Example

   lf.SetLayout(layout);

See also ...

Document Layout Tutorials | DocumentLayout Classes | SharpLeaf Members


SharpPlot 3.71 User Manual: SetLayout Method

SharpLeaf.SetLayout Method

Revert to default layout.

public void SetLayout();

See also ...

SharpLeaf Members | SharpLeaf.SetLayout Method


SharpPlot 3.71 User Manual: SetLayout Method (DocumentLayout)

SharpLeaf.SetLayout Method (DocumentLayout)

Use master layout with no argument substitution.

public void SetLayout(
    DocumentLayout layout
);
layout
Master pages definition (null for default).

See also ...

SharpLeaf Members | SharpLeaf.SetLayout Method


SharpPlot 3.71 User Manual: SetLayout Method (DocumentLayout,String[])

SharpLeaf.SetLayout Method (DocumentLayout,String[])

Change master page layout, closing any started page.

public void SetLayout(
    DocumentLayout layout,
    string[] arglist
);
layout
Master pages definition (null for default).
arglist
Argument list for custom parameter substitution in TextBlock.

See also ...

SharpLeaf Members | SharpLeaf.SetLayout Method


SharpPlot 3.71 User Manual: Table Class

Table Class

Build a table of text data for SharpLeaf.

public class Table

Example

A Table is generally created in three phases:

  1. Set up table-wide settings
  2. Flow content into cells, possibly changing settings on the way
  3. Include table into SharpLeaf report with the IncludeTable method.
  // Set up table-wide settings
   tb = new Table();
   tb.SetTitles(1,1);  // 1 column and 1 row of titles
   tb.SetOffset(1,0);  // Offset table box to exclude 1 column and 0 row
   tb.SetCellMargins(10);  // More space around cell content
   tb.Box = new BoxStyle(3,Color.Navy,LineStyle.Solid,10,Color.Navy,FillStyle.Saturate10,true);
   tb.SetRowGrid(0);  // Disable row grid

  // Go through cells, possibly changing settings on the way
   tb.SetCellFont(new FontType("Times",24,FontStyle.Bold));
   tb.AddRows(new string[]{"","Column 1","Column 2","Column 3"});
   tb.AddColumns(new string[]{"Row 1","Row 2","Row 3","Row 4"});
   tb.SetCellFont(new FontType("Arial",20));
   tb.AddRows(new int[][]{new int[]{101,201,301},new int[]{102,202,302},new int[]{103,
            203,303},new int[]{104,204,304}});

  // Include table in SharpLeaf flow
   lf.IncludeTable(tb);

Have a look at the Table tutorials for more examples.

Constructors

Table Instance Properties

Box | BoxStyle for whole table (null for no box) (default is 1-pt black unfilled)
Caption | Text displayed at the top of table on every sub-page
CaptionAlignment | Horizontal Alignment of Caption (Left by default)
CaptionFont | FontType for Table Caption (default is null to use working ParagraphStyle)
Column | Column index of the current cell pointer
ColumnOverwrite | Overwrite column settings when re-visiting columns in future cells (default is false)
Columns | Number of columns in current table (ReadOnly)
Footnote | Text displayed once at the end of the Table
FootnoteAlignment | Horizontal Alignment of Footnote (Left by default)
FootnoteFont | FontType for Table Footnote (default is null to use working ParagraphStyle)
Heading | Text displayed once at the beginning the Table
HeadingAlignment | Horizontal Alignment of Heading (Left by default)
HeadingFont | FontType for Table Heading (default is null to use working ParagraphStyle)
MergeOrder | Set cell merging order when both columns and rows can be merged (default is true for columns first)
Row | Row index of the current cell pointer
RowOverwrite | Overwrite row settings when re-visiting rows in future cells (default is false)
Rows | Number of rows in current table (ReadOnly)
Subheading | Text displayed once at the beginning the Table, below heading
SubheadingFont | FontType for Table Subheading (default is null to use working ParagraphStyle)

Table Methods

AddCSV | Flow a CSV array into table
AddColumnCells | Append cells to current column
AddColumns | Flow an array of cells into table as columns, starting from current cell.
AddRowCells | Append cells to current row.
AddRows | Flow an array of cells into table as rows, starting from current cell.
NextCell | Move cell pointer to arbitrary cell
NextColumn | Move cell pointer to the next column on the right
NextEmptyColumn | Move cell pointer after next non-empty column.
NextEmptyRow | Move cell pointer after next non-empty row.
NextRow | Move cell pointer down one row.
SetCellAlignment | Set horizontal alignment of table cells (defaults to Alignment.Left)
SetCellBox | Set cell boxes to cycle through from current cell on
SetCellClip | Set column right-edge clipping as boolean flags (defaults to true)
SetCellFillChar | Set character used to fill cell text up to the column right edge (defaults to whitespace).
SetCellFont | Set cell fonts to cycle through from current cell on
SetCellMargins | Set margins above/below/left/right cell content within cell boundary for all table cells (default is 3)
SetCellText | Set a specific cell text, extending table size if necessary.
SetCellVerticalAlignment | Set the vertical alignment of table cells (default is Top)
SetCellWrap | Set text wrapping within columns as boolean flags (true by default)
SetColumnAfter | Set column right margins to cycle through from current column on (default is 3)
SetColumnBefore | Set column left margins to cycle through from current column on (default is 3)
SetColumnGrid | Set vertical grid decoration (Defaults to 0.1 black solid)
SetColumnMaxWidths | Set maximum column widths to cycle through from current column on (defaults to -1 for no limit)
SetColumnMerge | Set vertical cell merging flags to cycle through from current column on (defaults to false)
SetColumnMinWidths | Set minimum column widths to cycle through from current column on (defaults to 6 – twice the default cell gutter)
SetColumnRetain | Add indices of table columns that should be repeated on all subpages
SetColumnWidths | Set column widths to cycle through from current column on
SetOffset | Set column and row offset of table boxing and grid.
SetRowAfter | Set row bottom margins to cycle through from current row on (default is 3)
SetRowBefore | Set row top margins to cycle through from current row on (default is 3)
SetRowGrid | Set horizontal grid decoration (defaults to 0.1 black solid)
SetRowHeights | Set fixed row heights to cycle through from current row on
SetRowMaxHeights | Set maximum row heights to cycle through from current row on (defaults to -1 for no limit)
SetRowMerge | Set horizontal cell merging flags to cycle through from current row on (defaults to false)
SetRowMinHeights | Set minimum row heights to cycle through from current row on (defaults to 6 – twice the default cell gutter)
SetRowRetain | Add indices of table rows that should be repeated on all subpages
SetTitles | Set the number of leading columns and rows that are titles.

See also

Table Tutorials

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Table Members

Table Members

Constructors

Table Instance Properties

Box | BoxStyle for whole table (null for no box) (default is 1-pt black unfilled)
Caption | Text displayed at the top of table on every sub-page
CaptionAlignment | Horizontal Alignment of Caption (Left by default)
CaptionFont | FontType for Table Caption (default is null to use working ParagraphStyle)
Column | Column index of the current cell pointer
ColumnOverwrite | Overwrite column settings when re-visiting columns in future cells (default is false)
Columns | Number of columns in current table (ReadOnly)
Footnote | Text displayed once at the end of the Table
FootnoteAlignment | Horizontal Alignment of Footnote (Left by default)
FootnoteFont | FontType for Table Footnote (default is null to use working ParagraphStyle)
Heading | Text displayed once at the beginning the Table
HeadingAlignment | Horizontal Alignment of Heading (Left by default)
HeadingFont | FontType for Table Heading (default is null to use working ParagraphStyle)
MergeOrder | Set cell merging order when both columns and rows can be merged (default is true for columns first)
Row | Row index of the current cell pointer
RowOverwrite | Overwrite row settings when re-visiting rows in future cells (default is false)
Rows | Number of rows in current table (ReadOnly)
Subheading | Text displayed once at the beginning the Table, below heading
SubheadingFont | FontType for Table Subheading (default is null to use working ParagraphStyle)

Table Methods

AddCSV | Flow a CSV array into table
AddColumnCells | Append cells to current column
AddColumns | Flow an array of cells into table as columns, starting from current cell.
AddRowCells | Append cells to current row.
AddRows | Flow an array of cells into table as rows, starting from current cell.
NextCell | Move cell pointer to arbitrary cell
NextColumn | Move cell pointer to the next column on the right
NextEmptyColumn | Move cell pointer after next non-empty column.
NextEmptyRow | Move cell pointer after next non-empty row.
NextRow | Move cell pointer down one row.
SetCellAlignment | Set horizontal alignment of table cells (defaults to Alignment.Left)
SetCellBox | Set cell boxes to cycle through from current cell on
SetCellClip | Set column right-edge clipping as boolean flags (defaults to true)
SetCellFillChar | Set character used to fill cell text up to the column right edge (defaults to whitespace).
SetCellFont | Set cell fonts to cycle through from current cell on
SetCellMargins | Set margins above/below/left/right cell content within cell boundary for all table cells (default is 3)
SetCellText | Set a specific cell text, extending table size if necessary.
SetCellVerticalAlignment | Set the vertical alignment of table cells (default is Top)
SetCellWrap | Set text wrapping within columns as boolean flags (true by default)
SetColumnAfter | Set column right margins to cycle through from current column on (default is 3)
SetColumnBefore | Set column left margins to cycle through from current column on (default is 3)
SetColumnGrid | Set vertical grid decoration (Defaults to 0.1 black solid)
SetColumnMaxWidths | Set maximum column widths to cycle through from current column on (defaults to -1 for no limit)
SetColumnMerge | Set vertical cell merging flags to cycle through from current column on (defaults to false)
SetColumnMinWidths | Set minimum column widths to cycle through from current column on (defaults to 6 – twice the default cell gutter)
SetColumnRetain | Add indices of table columns that should be repeated on all subpages
SetColumnWidths | Set column widths to cycle through from current column on
SetOffset | Set column and row offset of table boxing and grid.
SetRowAfter | Set row bottom margins to cycle through from current row on (default is 3)
SetRowBefore | Set row top margins to cycle through from current row on (default is 3)
SetRowGrid | Set horizontal grid decoration (defaults to 0.1 black solid)
SetRowHeights | Set fixed row heights to cycle through from current row on
SetRowMaxHeights | Set maximum row heights to cycle through from current row on (defaults to -1 for no limit)
SetRowMerge | Set horizontal cell merging flags to cycle through from current row on (defaults to false)
SetRowMinHeights | Set minimum row heights to cycle through from current row on (defaults to 6 – twice the default cell gutter)
SetRowRetain | Add indices of table rows that should be repeated on all subpages
SetTitles | Set the number of leading columns and rows that are titles.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Table Constructor

Table Constructor

Create a new table for inclusion into a SharpLeaf report.

public Table();

See also ...

Table Members


SharpPlot 3.71 User Manual: Table Properties

Table Properties

Table Instance Properties

Box | BoxStyle for whole table (null for no box) (default is 1-pt black unfilled)
Caption | Text displayed at the top of table on every sub-page
CaptionAlignment | Horizontal Alignment of Caption (Left by default)
CaptionFont | FontType for Table Caption (default is null to use working ParagraphStyle)
Column | Column index of the current cell pointer
ColumnOverwrite | Overwrite column settings when re-visiting columns in future cells (default is false)
Columns | Number of columns in current table (ReadOnly)
Footnote | Text displayed once at the end of the Table
FootnoteAlignment | Horizontal Alignment of Footnote (Left by default)
FootnoteFont | FontType for Table Footnote (default is null to use working ParagraphStyle)
Heading | Text displayed once at the beginning the Table
HeadingAlignment | Horizontal Alignment of Heading (Left by default)
HeadingFont | FontType for Table Heading (default is null to use working ParagraphStyle)
MergeOrder | Set cell merging order when both columns and rows can be merged (default is true for columns first)
Row | Row index of the current cell pointer
RowOverwrite | Overwrite row settings when re-visiting rows in future cells (default is false)
Rows | Number of rows in current table (ReadOnly)
Subheading | Text displayed once at the beginning the Table, below heading
SubheadingFont | FontType for Table Subheading (default is null to use working ParagraphStyle)


SharpPlot 3.71 User Manual: Box Property

Table.Box Property

BoxStyle for whole table (null for no box) (default is 1-pt black unfilled).

public BoxStyle Box {get; set;}

Example

tb.Box = new BoxStyle(2,Color.Navy);

See also ...

Table Appearance | Table Glossary | Table Members | Table.SetOffset Method | Table.SetTitles Method


SharpPlot 3.71 User Manual: Caption Property

Table.Caption Property

Text displayed at the top of table, on every block if table is broken into several blocks.

public string Caption {get; set;}

Example

tb.Caption = "Table caption";

See also ...

Table Appearance | Table Glossary | Table Members | Table.CaptionAlignment Property | Table.CaptionFont Property | Table.Footnote Property | Table.Heading Property


SharpPlot 3.71 User Manual: CaptionAlignment Property

Table.CaptionAlignment Property

Horizontal Alignment of Caption (Left by default).

public Alignment CaptionAlignment {get; set;}

Example

tb.CaptionAlignment = Alignment.Left;

See also ...

Table Members | Table.Caption Property


SharpPlot 3.71 User Manual: CaptionFont Property

Table.CaptionFont Property

FontType for Table Caption (default is null to use working ParagraphStyle).

public FontType CaptionFont {get; set;}

Example

tb.CaptionFont = new FontType("Arial", 12);

See also ...

Table Members | Table.Caption Property


SharpPlot 3.71 User Manual: Column Property

Table.Column Property

Column index of the current cell pointer, starting at 1.

public int Column {get; set;}

Example

tb.Column = ¯1; // Go to current last column, remaining on current row

Description

Reported as a positive integer from left/top, but can be set as negative from right/bottom, or 0 for next non-existing.

See also ...

Table Members | Table.Columns Property (ReadOnly) | Table.Row Property | Table.NextCell Method


SharpPlot 3.71 User Manual: ColumnOverwrite Property

Table.ColumnOverwrite Property

Overwrite column settings when re-visiting columns in future cells (default is false).

public bool ColumnOverwrite {get; set;}

Example

tb.ColumnOverwrite = true;

Description

It only makes a difference if changing a column setting cycle in-flight while going through columns.

Settings affected : SetColumnWidths, SetColumnMinWidths, SetColumnMaxWidths, SetColumnBefore, SetColumnAfter, SetColumnGrid, SetColumnMerge.

The default (false) is to set the settings for a column only the first time we fill one of its cells, so that we have to be careful about the column cycle only the first time, and then go through other rows of the same columns without worrying about it.

When using true, every time we fill a cell, its corresponding column setting is updated with current cycle, possibly changing a previous setting.

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.RowOverwrite Property


SharpPlot 3.71 User Manual: Columns Property (ReadOnly)

Table.Columns Property (ReadOnly)

Number of columns in current table (ReadOnly).

public int Columns {get;}

Example

int columns = tb.Columns;

See also ...

Table Members | Table.Column Property | Table.Rows Property (ReadOnly)


SharpPlot 3.71 User Manual: Footnote Property

Table.Footnote Property

Text displayed once at the end of the Table.

public string Footnote {get; set;}

Example

tb.Footnote = "Table footnote";

See also ...

Table Appearance | Table Glossary | Table Members | Table.Caption Property | Table.FootnoteAlignment Property | Table.FootnoteFont Property | Table.Heading Property


SharpPlot 3.71 User Manual: FootnoteAlignment Property

Table.FootnoteAlignment Property

Horizontal Alignment of Footnote (Left by default).

public Alignment FootnoteAlignment {get; set;}

Example

tb.FootnoteAlignment = Alignment.Right;

See also ...

Table Members | Table.Footnote Property | Table.Heading Property


SharpPlot 3.71 User Manual: FootnoteFont Property

Table.FootnoteFont Property

FontType for Table Footnote (default is null to use working ParagraphStyle).

public FontType FootnoteFont {get; set;}

Example

tb.FootnoteFont = new FontType("Times",8);

See also ...

Table Members | Table.Footnote Property


SharpPlot 3.71 User Manual: Heading Property

Table.Heading Property

Text displayed once at the beginning the Table.

public string Heading {get; set;}

Example

tb.Heading = "Table Heading";

See also ...

Table Appearance | Table Glossary | Table Members | Table.Caption Property | Table.Footnote Property | Table.HeadingAlignment Property | Table.HeadingFont Property | Table.Subheading Property


SharpPlot 3.71 User Manual: HeadingAlignment Property

Table.HeadingAlignment Property

Horizontal Alignment of Heading (Left by default).

public Alignment HeadingAlignment {get; set;}

Example

tb.HeadingAlignment = Alignment.Center;

See also ...

Table Members | Table.Heading Property


SharpPlot 3.71 User Manual: HeadingFont Property

Table.HeadingFont Property

FontType for Table Heading (default is null to use working ParagraphStyle).

public FontType HeadingFont {get; set;}

Example

tb.HeadingFont = new FontType("Garamond",16,FontStyle.Bold,Color.Navy);

See also ...

Table Members | Table.Heading Property


SharpPlot 3.71 User Manual: MergeOrder Property

Table.MergeOrder Property

Set cell merging order when both columns and rows can be merged (default is true for columns first).

public bool MergeOrder {get; set;}

Example

tb.MergeOrder = false; // Merge rows first

See also ...

Table Members | Table.SetColumnMerge Method | Table.SetRowMerge Method


SharpPlot 3.71 User Manual: Row Property

Table.Row Property

Row index of the current cell pointer.

public int Row {get; set;}

Example

tb.Row = ¯1; // Go to current last row, remaining on current column

Description

Reported as a positive integer from left/top, but can be set as negative from right/bottom, or 0 for next non-existing.

See also ...

Table Members | Table.Column Property | Table.Rows Property (ReadOnly) | Table.NextCell Method


SharpPlot 3.71 User Manual: RowOverwrite Property

Table.RowOverwrite Property

Overwrite row settings when re-visiting rows in future cells (default is false).

public bool RowOverwrite {get; set;}

Example

tb.RowOverwrite = true;

Description

It only makes a difference if changing a row setting cycle in-flight while going through rows.

Settings affected : SetRowHeights, SetRowMinHeights, SetRowMaxHeights, SetRowBefore, SetRowAfter, SetRowGrid, SetRowMerge.

The default (false) is to set the settings for a row only the first time we fill one of its cells, so that we have to be careful about the row cycle only the first time, and then go through other columns of the same rows without worrying about it.

When using true, every time we fill a cell, its corresponding row setting is updated with current cycle, possibly changing a previous setting.

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.ColumnOverwrite Property


SharpPlot 3.71 User Manual: Rows Property (ReadOnly)

Table.Rows Property (ReadOnly)

Number of rows in current table (ReadOnly).

public int Rows {get;}

Example

int rows = tb.Rows;

See also ...

Table Members | Table.Columns Property (ReadOnly) | Table.Row Property


SharpPlot 3.71 User Manual: Subheading Property

Table.Subheading Property

Text displayed once at the beginning the Table, below heading.

Subheading uses HeadingAlignment.

public string Subheading {get; set;}

Example

tb.Subheading = "Table subheading";

See also ...

Table Appearance | Table Glossary | Table Members | Table.Caption Property | Table.Heading Property | Table.HeadingAlignment Property | Table.SubheadingFont Property


SharpPlot 3.71 User Manual: SubheadingFont Property

Table.SubheadingFont Property

FontType for Table Subheading (default is null to use working ParagraphStyle).

public FontType SubheadingFont {get; set;}

Example

tb.SubheadingFont = new FontType("Times", 12, FontStyle.Italic);

See also ...

Table Members | Table.Subheading Property


SharpPlot 3.71 User Manual: Table Methods

Table Methods

Table Methods

AddCSV | Flow a CSV array into table
AddColumnCells | Append cells to current column
AddColumns | Flow an array of cells into table as columns, starting from current cell.
AddRowCells | Append cells to current row.
AddRows | Flow an array of cells into table as rows, starting from current cell.
NextCell | Move cell pointer to arbitrary cell
NextColumn | Move cell pointer to the next column on the right
NextEmptyColumn | Move cell pointer after next non-empty column.
NextEmptyRow | Move cell pointer after next non-empty row.
NextRow | Move cell pointer down one row.
SetCellAlignment | Set horizontal alignment of table cells (defaults to Alignment.Left)
SetCellBox | Set cell boxes to cycle through from current cell on
SetCellClip | Set column right-edge clipping as boolean flags (defaults to true)
SetCellFillChar | Set character used to fill cell text up to the column right edge (defaults to whitespace).
SetCellFont | Set cell fonts to cycle through from current cell on
SetCellMargins | Set margins above/below/left/right cell content within cell boundary for all table cells (default is 3)
SetCellText | Set a specific cell text, extending table size if necessary.
SetCellVerticalAlignment | Set the vertical alignment of table cells (default is Top)
SetCellWrap | Set text wrapping within columns as boolean flags (true by default)
SetColumnAfter | Set column right margins to cycle through from current column on (default is 3)
SetColumnBefore | Set column left margins to cycle through from current column on (default is 3)
SetColumnGrid | Set vertical grid decoration (Defaults to 0.1 black solid)
SetColumnMaxWidths | Set maximum column widths to cycle through from current column on (defaults to -1 for no limit)
SetColumnMerge | Set vertical cell merging flags to cycle through from current column on (defaults to false)
SetColumnMinWidths | Set minimum column widths to cycle through from current column on (defaults to 6 – twice the default cell gutter)
SetColumnRetain | Add indices of table columns that should be repeated on all subpages
SetColumnWidths | Set column widths to cycle through from current column on
SetOffset | Set column and row offset of table boxing and grid.
SetRowAfter | Set row bottom margins to cycle through from current row on (default is 3)
SetRowBefore | Set row top margins to cycle through from current row on (default is 3)
SetRowGrid | Set horizontal grid decoration (defaults to 0.1 black solid)
SetRowHeights | Set fixed row heights to cycle through from current row on
SetRowMaxHeights | Set maximum row heights to cycle through from current row on (defaults to -1 for no limit)
SetRowMerge | Set horizontal cell merging flags to cycle through from current row on (defaults to false)
SetRowMinHeights | Set minimum row heights to cycle through from current row on (defaults to 6 – twice the default cell gutter)
SetRowRetain | Add indices of table rows that should be repeated on all subpages
SetTitles | Set the number of leading columns and rows that are titles.


SharpPlot 3.71 User Manual: AddCSV Method

Table.AddCSV Method

Flow a CSV array into table from current cell on. New rows will start from current column.

Overloads

  • public void AddCSV(string csv);
  • public void AddCSV(string csv,char tab);
  • public void AddCSV(string csv,char[] tabs);
  • public void AddCSV(string csv,char tab,char newline);
  • public void AddCSV(string csv,char[] tabs,char[] newlines);

Example

   tb = new Table();
  // comma separates row cells, semicolon separates rows
   csv = ",Col 1,Col 2,Col 3,Col 4;Row A,A1,A2,A3,A4;Row B,B1,B2,B3,B4";
   tb.AddCSV(csv,',',';');
   lf.IncludeTable(tb);

See also ...

Filling cells of a Table | Table Members | Table.AddColumns Method | Table.AddRows Method


SharpPlot 3.71 User Manual: AddCSV Method (String)

Table.AddCSV Method (String)

Using standard tab and newline characters.

public void AddCSV(
    string csv
);
csv
CSV string to be parsed.

See also ...

Table Members | Table.AddCSV Method


SharpPlot 3.71 User Manual: AddCSV Method (String,Char)

Table.AddCSV Method (String,Char)

Specify alternate tab separator (typically comma and/or semicolon).

public void AddCSV(
    string csv,
    char tab
);
csv
CSV string to be parsed.
tab
Alternate characters for cell separator.

See also ...

Table Members | Table.AddCSV Method


SharpPlot 3.71 User Manual: AddCSV Method (String,Char[])

Table.AddCSV Method (String,Char[])

Specify alternate tab separators (typically comma and/or semicolon).

public void AddCSV(
    string csv,
    char[] tabs
);
csv
CSV string to be parsed.
tabs
Alternate characters for cell separator.

See also ...

Table Members | Table.AddCSV Method


SharpPlot 3.71 User Manual: AddCSV Method (String,Char,Char)

Table.AddCSV Method (String,Char,Char)

Specify alternate tab and newline separator.

public void AddCSV(
    string csv,
    char tab,
    char newline
);
csv
CSV string to be parsed.
tab
Alternate characters for cell separator.
newline
Alternate character for row separator.

See also ...

Table Members | Table.AddCSV Method


SharpPlot 3.71 User Manual: AddCSV Method (String,Char[],Char[])

Table.AddCSV Method (String,Char[],Char[])

Flow a CSV array into table.

public void AddCSV(
    string csv,
    char[] tabs,
    char[] newlines
);
csv
CSV string to be parsed.
tabs
Alternate characters for cell separator.
newlines
Alternate characters for row separator.

See also ...

Table Members | Table.AddCSV Method


SharpPlot 3.71 User Manual: AddColumnCells Method

Table.AddColumnCells Method

Append cells to current column.

Overloads

  • public void AddColumnCells(int cell);
  • public void AddColumnCells(double cell);
  • public void AddColumnCells(string cell);
  • public void AddColumnCells(int[] cells);
  • public void AddColumnCells(double[] cells);
  • public void AddColumnCells(string[] cells);

Example

   tb.AddColumnCells(new string[]{"Row A","Row B"});

Description

Cell pointer will be moved to the right by number of cells.

See also ...

Filling cells of a Table | Table Members | Table.AddColumns Method | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddColumnCells Method (Int32)

Table.AddColumnCells Method (Int32)

Append cells to current column.

public void AddColumnCells(
    int cell
);

See also ...

Table Members | Table.AddColumnCells Method


SharpPlot 3.71 User Manual: AddColumnCells Method (Double)

Table.AddColumnCells Method (Double)

Append cells to current column.

public void AddColumnCells(
    double cell
);

See also ...

Table Members | Table.AddColumnCells Method


SharpPlot 3.71 User Manual: AddColumnCells Method (String)

Table.AddColumnCells Method (String)

Append cells to current column.

public void AddColumnCells(
    string cell
);

See also ...

Table Members | Table.AddColumnCells Method


SharpPlot 3.71 User Manual: AddColumnCells Method (Int32[])

Table.AddColumnCells Method (Int32[])

Append cells to current column.

public void AddColumnCells(
    int[] cells
);

See also ...

Table Members | Table.AddColumnCells Method


SharpPlot 3.71 User Manual: AddColumnCells Method (Double[])

Table.AddColumnCells Method (Double[])

Append cells to current column.

public void AddColumnCells(
    double[] cells
);

See also ...

Table Members | Table.AddColumnCells Method


SharpPlot 3.71 User Manual: AddColumnCells Method (String[])

Table.AddColumnCells Method (String[])

Append cells to current column.

public void AddColumnCells(
    string[] cells
);

See also ...

Table Members | Table.AddColumnCells Method


SharpPlot 3.71 User Manual: AddColumns Method

Table.AddColumns Method

Flow an array of cells into table as columns, starting from current cell.

Overloads

  • public void AddColumns(int[] cells);
  • public void AddColumns(double[] cells);
  • public void AddColumns(string[] cells);
  • public void AddColumns(int[][] cells);
  • public void AddColumns(double[][] cells);
  • public void AddColumns(string[][] cells);

Example

   columns = new string[][] {new string[]{"Row A","Row B"},new string[]{"A1","B1"},new
            string[]{"A2","B2"},new string[]{"A3","B3"},new string[]{"A4","B4"}};
   tb.AddColumns(columns);

Description

All columns will start from current row. Cell pointer will be moved to the right by number of columns.

See also ...

Filling cells of a Table | Table Members | Table.AddColumnCells Method | Table.AddRows Method


SharpPlot 3.71 User Manual: AddColumns Method (Int32[])

Table.AddColumns Method (Int32[])

Flow an array of cells into table as columns, starting from current cell.

public void AddColumns(
    int[] cells
);

See also ...

Table Members | Table.AddColumns Method


SharpPlot 3.71 User Manual: AddColumns Method (Double[])

Table.AddColumns Method (Double[])

Flow an array of cells into table as columns, starting from current cell.

public void AddColumns(
    double[] cells
);

See also ...

Table Members | Table.AddColumns Method


SharpPlot 3.71 User Manual: AddColumns Method (String[])

Table.AddColumns Method (String[])

Flow an array of cells into table as columns, starting from current cell.

public void AddColumns(
    string[] cells
);

See also ...

Table Members | Table.AddColumns Method


SharpPlot 3.71 User Manual: AddColumns Method (Int32[][])

Table.AddColumns Method (Int32[][])

Flow an array of cells into table as columns, starting from current cell.

public void AddColumns(
    int[][] cells
);

See also ...

Table Members | Table.AddColumns Method


SharpPlot 3.71 User Manual: AddColumns Method (Double[][])

Table.AddColumns Method (Double[][])

Flow an array of cells into table as columns, starting from current cell.

public void AddColumns(
    double[][] cells
);

See also ...

Table Members | Table.AddColumns Method


SharpPlot 3.71 User Manual: AddColumns Method (String[][])

Table.AddColumns Method (String[][])

Flow an array of cells into table as columns, starting from current cell.

public void AddColumns(
    string[][] cells
);

See also ...

Table Members | Table.AddColumns Method


SharpPlot 3.71 User Manual: AddRowCells Method

Table.AddRowCells Method

Append cells to current row.

Overloads

  • public void AddRowCells(int cell);
  • public void AddRowCells(double cell);
  • public void AddRowCells(string cell);
  • public void AddRowCells(int[] cells);
  • public void AddRowCells(double[] cells);
  • public void AddRowCells(string[] cells);

Example

   tb.AddRowCells(new string[]{"Col 1","Col 2","Col 3","Col 4"});

Description

Cell pointer will be moved down by number of cells.

See also ...

Filling cells of a Table | Table Members | Table.AddColumnCells Method | Table.AddRows Method


SharpPlot 3.71 User Manual: AddRowCells Method (Int32)

Table.AddRowCells Method (Int32)

Append cells to current row.

public void AddRowCells(
    int cell
);

See also ...

Table Members | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddRowCells Method (Double)

Table.AddRowCells Method (Double)

Append cells to current row.

public void AddRowCells(
    double cell
);

See also ...

Table Members | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddRowCells Method (String)

Table.AddRowCells Method (String)

Append cells to current row.

public void AddRowCells(
    string cell
);

See also ...

Table Members | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddRowCells Method (Int32[])

Table.AddRowCells Method (Int32[])

Append cells to current row.

public void AddRowCells(
    int[] cells
);

See also ...

Table Members | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddRowCells Method (Double[])

Table.AddRowCells Method (Double[])

Append cells to current row.

public void AddRowCells(
    double[] cells
);

See also ...

Table Members | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddRowCells Method (String[])

Table.AddRowCells Method (String[])

Append cells to current row.

public void AddRowCells(
    string[] cells
);

See also ...

Table Members | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddRows Method

Table.AddRows Method

Flow an array of cells into table as rows, starting from current cell.

Overloads

  • public void AddRows(int[] cells);
  • public void AddRows(double[] cells);
  • public void AddRows(string[] cells);
  • public void AddRows(int[][] cells);
  • public void AddRows(double[][] cells);
  • public void AddRows(string[][] cells);

Example

   rows = new string[][] {new string[]{"Col 1","Col 2","Col 3","Col 4"},new
            string[]{"A1","A2","A3","A4"},new string[]{"B1","B2","B3","B4"}};
   tb.AddRows(rows);

Description

All rows will start from current column. Cell pointer will be moved down by number of rows.

See also ...

Table Members | Table.AddColumns Method | Table.AddRowCells Method


SharpPlot 3.71 User Manual: AddRows Method (Int32[])

Table.AddRows Method (Int32[])

Flow an array of cells into table as rows, starting from current cell.

public void AddRows(
    int[] cells
);

See also ...

Table Members | Table.AddRows Method


SharpPlot 3.71 User Manual: AddRows Method (Double[])

Table.AddRows Method (Double[])

Flow an array of cells into table as rows, starting from current cell.

public void AddRows(
    double[] cells
);

See also ...

Table Members | Table.AddRows Method


SharpPlot 3.71 User Manual: AddRows Method (String[])

Table.AddRows Method (String[])

Flow an array of cells into table as rows, starting from current cell.

public void AddRows(
    string[] cells
);

See also ...

Table Members | Table.AddRows Method


SharpPlot 3.71 User Manual: AddRows Method (Int32[][])

Table.AddRows Method (Int32[][])

Flow an array of cells into table as rows, starting from current cell.

public void AddRows(
    int[][] cells
);

See also ...

Table Members | Table.AddRows Method


SharpPlot 3.71 User Manual: AddRows Method (Double[][])

Table.AddRows Method (Double[][])

Flow an array of cells into table as rows, starting from current cell.

public void AddRows(
    double[][] cells
);

See also ...

Table Members | Table.AddRows Method


SharpPlot 3.71 User Manual: AddRows Method (String[][])

Table.AddRows Method (String[][])

Flow an array of cells into table as rows, starting from current cell.

public void AddRows(
    string[][] cells
);

See also ...

Table Members | Table.AddRows Method


SharpPlot 3.71 User Manual: NextCell Method

Table.NextCell Method

Move cell pointer to arbitrary cell.

public void NextCell(
    int col,
    int row
);
col
column of target cell – positive from left, negative from right, 0 for next non-existing.
row
row of target cell – positive from top, negative from bottom, 0 for next non-existing.

Example

   tb.NextCell(1,-1);  // first column, last row

See also ...

Filling cells of a Table | Table Members | Table.Column Property | Table.Row Property


SharpPlot 3.71 User Manual: NextColumn Method

Table.NextColumn Method

Move cell pointer to the next column on the right.

Overloads

  • public void NextColumn();
  • public void NextColumn(int row);

Example

   tb.NextColumn(2);  // move to row 2 of next column

See also ...

Filling cells of a Table | Table Members | Table.Column Property | Table.NextEmptyColumn Method | Table.NextRow Method


SharpPlot 3.71 User Manual: NextColumn Method

Table.NextColumn Method

Move cell pointer to next column, staying on same row – equivalent to Table.NextCell(1+Table.Column,Table.Row).

public void NextColumn();

See also ...

Table Members | Table.NextColumn Method


SharpPlot 3.71 User Manual: NextColumn Method (Int32)

Table.NextColumn Method (Int32)

Move cell pointer to the next column on the right.

public void NextColumn(
    int row
);
row
row index to start from positive from top, negative from bottom, 0 for next non-existing.

See also ...

Table Members | Table.NextColumn Method


SharpPlot 3.71 User Manual: NextEmptyColumn Method

Table.NextEmptyColumn Method

Move cell pointer to the right, after next non-empty column.

Content of columns before current column is ignored.

If a row is specified, the cell pointer will be moved to that row too. Otherwise, the current row is used.

Content of rows above the argument row (current row by default) are ignored to decide whether a column is empty.

Overloads

  • public int NextEmptyColumn();
  • public int NextEmptyColumn(int row);

Result

New current column (starting at 1).

Example

   tb.NextEmptyColumn(2);  // move after next non-empty column, starting at row 2

Description

Returns new column index.

See also ...

Filling cells of a Table | Table Members | Table.NextColumn Method | Table.NextEmptyRow Method


SharpPlot 3.71 User Manual: NextEmptyColumn Method

Table.NextEmptyColumn Method

Move cell pointer after next non-empty column starting at current row.

public int NextEmptyColumn();

Result

New current column (starting at 1).

See also ...

Table Members | Table.NextEmptyColumn Method


SharpPlot 3.71 User Manual: NextEmptyColumn Method (Int32)

Table.NextEmptyColumn Method (Int32)

Move cell pointer after next non-empty column.

public int NextEmptyColumn(
    int row
);
row
New current row : positive from top, negative from bottom, 0 for next non-existing.
return value
New current column (starting at 1).

See also ...

Table Members | Table.NextEmptyColumn Method


SharpPlot 3.71 User Manual: NextEmptyRow Method

Table.NextEmptyRow Method

Move cell pointer after next non-empty row.

Content of rows before current row is ignored.

If a column is specified, the cell pointer will be moved to that column too. Otherwise, the current column is used.

Content of columns to the left of the argument column (current column by default) are ignored to decide whether a row is empty.

Overloads

  • public int NextEmptyRow();
  • public int NextEmptyRow(int col);

Result

New current row (starting at 1).

Example

   tb.NextEmptyRow(2);  // move after next non-empty row starting at colum 2

Description

Returns new row index.

See also ...

Filling cells of a Table | Table Members | Table.NextEmptyColumn Method | Table.NextRow Method


SharpPlot 3.71 User Manual: NextEmptyRow Method

Table.NextEmptyRow Method

Move cell pointer after next non-empty row starting at current column.

public int NextEmptyRow();

Result

New current row (starting at 1).

See also ...

Table Members | Table.NextEmptyRow Method


SharpPlot 3.71 User Manual: NextEmptyRow Method (Int32)

Table.NextEmptyRow Method (Int32)

Move cell pointer after next non-empty row.

public int NextEmptyRow(
    int col
);
col
New current column : positive from left, negative from right, 0 for next non-existing.
return value
New current row (starting at 1).

See also ...

Table Members | Table.NextEmptyRow Method


SharpPlot 3.71 User Manual: NextRow Method

Table.NextRow Method

Move cell pointer down one row.

Overloads

  • public void NextRow();
  • public void NextRow(int column);

Example

   tb.NextRow(2);  // move to column 2 of next row

See also ...

Table Members | Table.Column Property | Table.NextColumn Method | Table.NextEmptyRow Method


SharpPlot 3.71 User Manual: NextRow Method

Table.NextRow Method

Move cell pointer to next row, staying on same column – equivalent to TableNextCell(Table.Column,1+Table.Row).

public void NextRow();

See also ...

Table Members | Table.NextRow Method


SharpPlot 3.71 User Manual: NextRow Method (Int32)

Table.NextRow Method (Int32)

Move cell pointer down one row.

public void NextRow(
    int column
);
column
column index to start from : positive from left, negative from right, 0 for next non-existing.

See also ...

Table Members | Table.NextRow Method


SharpPlot 3.71 User Manual: SetCellAlignment Method

Table.SetCellAlignment Method

Set horizontal alignment of table cells (defaults to Alignment.Left).

Overloads

  • public void SetCellAlignment(Alignment value);
  • public void SetCellAlignment(Alignment[] values,bool colwise);
  • public void SetCellAlignment(Alignment[,] values);

Example

  // Alternate left and decimal alignment along columns from now on
   tb.SetCellAlignment(new Alignment[]{Alignment.Left,Alignment.Decimal},true);

Description

The setting will be cycled through, starting at current cell, for all future cells.

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.SetCellVerticalAlignment Method


SharpPlot 3.71 User Manual: SetCellAlignment Method (Alignment)

Table.SetCellAlignment Method (Alignment)

Set alignment for all next cells.

public void SetCellAlignment(
    Alignment value
);

See also ...

Table Members | Table.SetCellAlignment Method


SharpPlot 3.71 User Manual: SetCellAlignment Method (Alignment[],Boolean)

Table.SetCellAlignment Method (Alignment[],Boolean)

Set alignment for next rows or columns, depending on flag.

public void SetCellAlignment(
    Alignment[] values,
    bool colwise
);

See also ...

Table Members | Table.SetCellAlignment Method


SharpPlot 3.71 User Manual: SetCellAlignment Method (Alignment[0:,0:])

Table.SetCellAlignment Method (Alignment[0:,0:])

Set horizontal alignment of table cells (defaults to Alignment.Left).

public void SetCellAlignment(
    Alignment[,] values
);

See also ...

Table Members | Table.SetCellAlignment Method


SharpPlot 3.71 User Manual: SetCellBox Method

Table.SetCellBox Method

Set cell boxes to cycle through from current cell on.

Overloads

  • public void SetCellBox(BoxStyle box,int col,int row);
  • public void SetCellBox(BoxStyle box);
  • public void SetCellBox(BoxStyle[] boxes,bool colwise);
  • public void SetCellBox(BoxStyle[,] boxes);

Example

  // Use pale blue cell background from now on
   tb.SetCellBox(new BoxStyle(0,Color.Transparent,LineStyle.Invisible,0,Color.Navy,
            FillStyle.Saturate20,false));

Description

Default is null which is no box.

See also ...

Table Appearance | Table Cyclic Settings | Table Glossary | Table Members | Table.Box Property | Table.SetColumnGrid Method | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetCellBox Method (BoxStyle,Int32,Int32)

Table.SetCellBox Method (BoxStyle,Int32,Int32)

Set a specific cell box without changing the cycle.

public void SetCellBox(
    BoxStyle box,
    int col,
    int row
);
box
cell box to use.
col
target column : 0 for “all”, positive from left/top, negative from right/bottom.
row
target row : 0 for “all”, positive from left/top, negative from right/bottom.

See also ...

Table Members | Table.SetCellBox Method


SharpPlot 3.71 User Manual: SetCellBox Method (BoxStyle)

Table.SetCellBox Method (BoxStyle)

Set the box for all table cells.

public void SetCellBox(
    BoxStyle box
);
box
cell box to use.

See also ...

Table Members | Table.SetCellBox Method


SharpPlot 3.71 User Manual: SetCellBox Method (BoxStyle[],Boolean)

Table.SetCellBox Method (BoxStyle[],Boolean)

Set column or row boxing, depending on provided flag.

public void SetCellBox(
    BoxStyle[] boxes,
    bool colwise
);
boxes
array of boxes to tile table with.
colwise
true for col-wise vector, false for row-wise vector.

See also ...

Table Members | Table.SetCellBox Method


SharpPlot 3.71 User Manual: SetCellBox Method (BoxStyle[0:,0:])

Table.SetCellBox Method (BoxStyle[0:,0:])

Set cell boxes to cycle through from current cell on.

public void SetCellBox(
    BoxStyle[,] boxes
);
boxes
array of boxes to tile table with.

See also ...

Table Members | Table.SetCellBox Method


SharpPlot 3.71 User Manual: SetCellClip Method

Table.SetCellClip Method

Set column right-edge clipping as boolean flags (defaults to true).

Overloads

  • public void SetCellClip(bool value);
  • public void SetCellClip(bool[] values,bool colwise);
  • public void SetCellClip(bool[,] values);

Example

   tb.SetCellClip(false);  // Disable clipping from now on

Description

The setting will be cycled through, starting at current cell, for all future cells. Clipping is meaningful only for cells where wrapping is disabled.

See also ...

Table Cyclic Settings | Table Glossary | SharpLeaf.Ellipsis Property | Table Members | Table.SetCellWrap Method | Frame.XClip Property


SharpPlot 3.71 User Manual: SetCellClip Method (Boolean)

Table.SetCellClip Method (Boolean)

Set clipping for all next cells.

public void SetCellClip(
    bool value
);

See also ...

Table Members | Table.SetCellClip Method


SharpPlot 3.71 User Manual: SetCellClip Method (Boolean[],Boolean)

Table.SetCellClip Method (Boolean[],Boolean)

Set clipping for next rows or columns, depending on flag.

public void SetCellClip(
    bool[] values,
    bool colwise
);

See also ...

Table Members | Table.SetCellClip Method


SharpPlot 3.71 User Manual: SetCellClip Method (Boolean[0:,0:])

Table.SetCellClip Method (Boolean[0:,0:])

Set column right-edge clipping as boolean flags (defaults to true).

public void SetCellClip(
    bool[,] values
);

See also ...

Table Members | Table.SetCellClip Method


SharpPlot 3.71 User Manual: SetCellFillChar Method

Table.SetCellFillChar Method

Set character used to fill cell text up to the column right edge (defaults to whitespace).

Overloads

  • public void SetCellFillChar(char value);
  • public void SetCellFillChar(char[] values,bool colwise);
  • public void SetCellFillChar(char[,] values);

Example

   tb.SetCellFillChar('.');  // Fill with dots from now on

Description

The setting will be cycled through, starting at current cell, for all future cells.

See also ...

Table Cyclic Settings | Table Glossary | Table Members


SharpPlot 3.71 User Manual: SetCellFillChar Method (Char)

Table.SetCellFillChar Method (Char)

Set fill character for all next cells.

public void SetCellFillChar(
    char value
);

See also ...

Table Members | Table.SetCellFillChar Method


SharpPlot 3.71 User Manual: SetCellFillChar Method (Char[],Boolean)

Table.SetCellFillChar Method (Char[],Boolean)

Set fill character for next rows or columns, depending on flag.

public void SetCellFillChar(
    char[] values,
    bool colwise
);

See also ...

Table Members | Table.SetCellFillChar Method


SharpPlot 3.71 User Manual: SetCellFillChar Method (Char[0:,0:])

Table.SetCellFillChar Method (Char[0:,0:])

Set character used to fill cell text up to the column right edge (defaults to whitespace).

public void SetCellFillChar(
    char[,] values
);

See also ...

Table Members | Table.SetCellFillChar Method


SharpPlot 3.71 User Manual: SetCellFont Method

Table.SetCellFont Method

Set cell fonts to cycle through from current cell on.

Overloads

  • public void SetCellFont(FontType font,int col,int row);
  • public void SetCellFont(FontType font);
  • public void SetCellFont(FontType[] fonts,bool colwise);
  • public void SetCellFont(FontType[,] fonts);

Example

   font=lf.Style.Font.Clone(); // Clone current paragraph font;
   font.Name = "Arial";  // Use Arial, keeping size, style and color
   tb.SetCellFont(font);  // Use that font from now on

Description

Default is null which is working SharpLeaf.Style.Font.

See also ...

Table Cyclic Settings | Table Glossary | Table Members


SharpPlot 3.71 User Manual: SetCellFont Method (FontType,Int32,Int32)

Table.SetCellFont Method (FontType,Int32,Int32)

Set a specific cell font without changing the cycle.

public void SetCellFont(
    FontType font,
    int col,
    int row
);
font
cell font to use.
col
target column : 0 for “all”, positive from left, negative from right.
row
target row : 0 for “all”, positive from top, negative from bottom.

See also ...

Table Members | Table.SetCellFont Method


SharpPlot 3.71 User Manual: SetCellFont Method (FontType)

Table.SetCellFont Method (FontType)

Set the font for all table cells.

public void SetCellFont(
    FontType font
);
font
cell font to use.

See also ...

Table Members | Table.SetCellFont Method


SharpPlot 3.71 User Manual: SetCellFont Method (FontType[],Boolean)

Table.SetCellFont Method (FontType[],Boolean)

Set column or row font, depending on provided flag.

public void SetCellFont(
    FontType[] fonts,
    bool colwise
);
fonts
array of fonts to tile table with.
colwise
true for col-wise vector, false for row-wise vector.

See also ...

Table Members | Table.SetCellFont Method


SharpPlot 3.71 User Manual: SetCellFont Method (FontType[0:,0:])

Table.SetCellFont Method (FontType[0:,0:])

Set cell fonts to cycle through from current cell on.

public void SetCellFont(
    FontType[,] fonts
);
fonts
array of fonts to tile table with.

See also ...

Table Members | Table.SetCellFont Method


SharpPlot 3.71 User Manual: SetCellMargins Method

Table.SetCellMargins Method

Set margins above/below/left/right cell content within cell boundary for all table cells (default is 3).

Overloads

  • public void SetCellMargins(double value);
  • public void SetCellMargins(int[] values);
  • public void SetCellMargins(double[] values);

Example

   tb.SetCellMargins(8);  // Force table spacing to be 8-point around all cells

Description

This will set the margins for all cells of the table, including the ones that already have been filled.

For finer control over cell margins, see SetColumnBefore, SetColumnAfter, SetRowBefore, SetRowAfter, and the Table cycles tutorial.

See also ...

Table Appearance | Table Glossary | Table Members


SharpPlot 3.71 User Manual: SetCellMargins Method (Double)

Table.SetCellMargins Method (Double)

Set margins around cell content as a single value for all four sides.

public void SetCellMargins(
    double value
);

See also ...

Table Members | Table.SetCellMargins Method


SharpPlot 3.71 User Manual: SetCellMargins Method (Int32[])

Table.SetCellMargins Method (Int32[])

Set margins around cell content as four values for left,top,right,bottom.

public void SetCellMargins(
    int[] values
);
values
Margins around cell content as four numbers (left, above, right, below).

See also ...

Table Members | Table.SetCellMargins Method


SharpPlot 3.71 User Manual: SetCellMargins Method (Double[])

Table.SetCellMargins Method (Double[])

Set margins above/below/left/right cell content within cell boundary for all table cells (default is 3).

public void SetCellMargins(
    double[] values
);
values
Margins around cell content as four numbers (left, above, right, below).

See also ...

Table Members | Table.SetCellMargins Method


SharpPlot 3.71 User Manual: SetCellText Method

Table.SetCellText Method

Set a specific cell text, extending table size if necessary.

Overloads

  • public void SetCellText(double value,int col,int row);
  • public void SetCellText(string text,int col,int row);

Example

   tb.SetCellText("N/A",3,4);  // Change cell text at column 3, row 4

Description

SetCellText doesn’t move the cell pointer.

See also ...

Filling cells of a Table | Table Members | Table.NextCell Method


SharpPlot 3.71 User Manual: SetCellText Method (Double,Int32,Int32)

Table.SetCellText Method (Double,Int32,Int32)

Set a specific cell text, extending table size if necessary.

public void SetCellText(
    double value,
    int col,
    int row
);
value
Number to replace cell text with.
col
Column index: positive from left, negative from right, 0 for next non-existing.
row
Row index : positive from top, negative from bottom, 0 for next non-existing.

See also ...

Table Members | Table.SetCellText Method


SharpPlot 3.71 User Manual: SetCellText Method (String,Int32,Int32)

Table.SetCellText Method (String,Int32,Int32)

Set a specific cell text, extending table size if necessary.

public void SetCellText(
    string text,
    int col,
    int row
);
text
Text to replace cell with.
col
Column index: positive from left, negative from right, 0 for next non-existing.
row
Row index : positive from top, negative from bottom, 0 for next non-existing.

See also ...

Table Members | Table.SetCellText Method


SharpPlot 3.71 User Manual: SetCellVerticalAlignment Method

Table.SetCellVerticalAlignment Method

Set the vertical alignment of table cells (default is Top).

Overloads

  • public void SetCellVerticalAlignment(VerticalAlignment value);
  • public void SetCellVerticalAlignment(VerticalAlignment[] values,bool colwise);
  • public void SetCellVerticalAlignment(VerticalAlignment[,] values);

Example

  // Alternate top and bottom vertical alignments along rows from now on
   tb.SetCellVerticalAlignment(new VerticalAlignment[]{VerticalAlignment.Top,
            VerticalAlignment.Bottom},false);

Description

The setting will be cycled through, starting at current cell, for all future cells.

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.SetCellAlignment Method


SharpPlot 3.71 User Manual: SetCellVerticalAlignment Method (VerticalAlignment)

Table.SetCellVerticalAlignment Method (VerticalAlignment)

Set vertical alignment for all next cells.

public void SetCellVerticalAlignment(
    VerticalAlignment value
);

See also ...

Table Members | Table.SetCellVerticalAlignment Method


SharpPlot 3.71 User Manual: SetCellVerticalAlignment Method (VerticalAlignment[],Boolean)

Table.SetCellVerticalAlignment Method (VerticalAlignment[],Boolean)

Set vertical alignment for next rows or columns, depending on flag.

public void SetCellVerticalAlignment(
    VerticalAlignment[] values,
    bool colwise
);

See also ...

Table Members | Table.SetCellVerticalAlignment Method


SharpPlot 3.71 User Manual: SetCellVerticalAlignment Method (VerticalAlignment[0:,0:])

Table.SetCellVerticalAlignment Method (VerticalAlignment[0:,0:])

Set the vertical alignment of table cells (default is Top).

public void SetCellVerticalAlignment(
    VerticalAlignment[,] values
);

See also ...

Table Members | Table.SetCellVerticalAlignment Method


SharpPlot 3.71 User Manual: SetCellWrap Method

Table.SetCellWrap Method

Set text wrapping within columns as boolean flags (true by default).

Overloads

  • public void SetCellWrap(bool value);
  • public void SetCellWrap(bool[] values,bool colwise);
  • public void SetCellWrap(bool[,] values);

Example

   tb.SetCellWrap(false);  // Disable cell wrapping from now on

Description

The setting will be cycled through, starting at current cell, for all future cells.

See also ...

Table Cyclic Settings | Table Glossary | SharpLeaf.SoftHyphen Property | Table Members | Table.SetCellClip Method


SharpPlot 3.71 User Manual: SetCellWrap Method (Boolean)

Table.SetCellWrap Method (Boolean)

Set wrapping for all next cells.

public void SetCellWrap(
    bool value
);

See also ...

Table Members | Table.SetCellWrap Method


SharpPlot 3.71 User Manual: SetCellWrap Method (Boolean[],Boolean)

Table.SetCellWrap Method (Boolean[],Boolean)

Set wrapping for next rows or columns, depending on flag.

public void SetCellWrap(
    bool[] values,
    bool colwise
);

See also ...

Table Members | Table.SetCellWrap Method


SharpPlot 3.71 User Manual: SetCellWrap Method (Boolean[0:,0:])

Table.SetCellWrap Method (Boolean[0:,0:])

Set text wrapping within columns as boolean flags (true by default).

public void SetCellWrap(
    bool[,] values
);

See also ...

Table Members | Table.SetCellWrap Method


SharpPlot 3.71 User Manual: SetColumnAfter Method

Table.SetColumnAfter Method

Set column right margins to cycle through from current column on (default is 3).

Overloads

  • public void SetColumnAfter(double width);
  • public void SetColumnAfter(int[] widths);
  • public void SetColumnAfter(double[] widths);

Example

   tb.SetColumnAfter(new int[] {3,3,3,3,10});  // every fifth column has more space after

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.SetColumnBefore Method


SharpPlot 3.71 User Manual: SetColumnAfter Method (Double)

Table.SetColumnAfter Method (Double)

Set column right margin for all next columns.

public void SetColumnAfter(
    double width
);

See also ...

Table Members | Table.SetColumnAfter Method


SharpPlot 3.71 User Manual: SetColumnAfter Method (Int32[])

Table.SetColumnAfter Method (Int32[])

Set column right margins to cycle through from current column on.

public void SetColumnAfter(
    int[] widths
);

See also ...

Table Members | Table.SetColumnAfter Method


SharpPlot 3.71 User Manual: SetColumnAfter Method (Double[])

Table.SetColumnAfter Method (Double[])

Set column right margins to cycle through from current column on (default is 3).

public void SetColumnAfter(
    double[] widths
);

See also ...

Table Members | Table.SetColumnAfter Method


SharpPlot 3.71 User Manual: SetColumnBefore Method

Table.SetColumnBefore Method

Set column left margins to cycle through from current column on (default is 3).

Overloads

  • public void SetColumnBefore(double width);
  • public void SetColumnBefore(int[] widths);
  • public void SetColumnBefore(double[] widths);

Example

   tb.SetColumnBefore(new int[] {3,3,3,3,10});  // every fifth column has more space before

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.SetColumnAfter Method


SharpPlot 3.71 User Manual: SetColumnBefore Method (Double)

Table.SetColumnBefore Method (Double)

Set column left margin for all next columns.

public void SetColumnBefore(
    double width
);

See also ...

Table Members | Table.SetColumnBefore Method


SharpPlot 3.71 User Manual: SetColumnBefore Method (Int32[])

Table.SetColumnBefore Method (Int32[])

Set column left margins to cycle through from current column on.

public void SetColumnBefore(
    int[] widths
);

See also ...

Table Members | Table.SetColumnBefore Method


SharpPlot 3.71 User Manual: SetColumnBefore Method (Double[])

Table.SetColumnBefore Method (Double[])

Set column left margins to cycle through from current column on (default is 3).

public void SetColumnBefore(
    double[] widths
);

See also ...

Table Members | Table.SetColumnBefore Method


SharpPlot 3.71 User Manual: SetColumnGrid Method

Table.SetColumnGrid Method

Set vertical grid decoration (Defaults to 0.1 black solid).

Overloads

  • public void SetColumnGrid();
  • public void SetColumnGrid(double weight);
  • public void SetColumnGrid(int[] weights);
  • public void SetColumnGrid(double[] weights);
  • public void SetColumnGrid(double weight,Color color);
  • public void SetColumnGrid(int[] weights,Color[] colors);
  • public void SetColumnGrid(double[] weights,Color[] colors);
  • public void SetColumnGrid(double weight,Color color,LineStyle style);
  • public void SetColumnGrid(int[] weights,Color[] colors,LineStyle[] styles);
  • public void SetColumnGrid(double[] weights,Color[] colors,LineStyle[] styles);

Example

  // 2-pt thick grid every other column - without changing color or style
   tb.SetColumnGrid(new int[] {0,2});

Description

Each grid setting will be cycled through independently, from current column on. They apply to the gridline to the right of the column, unless it is the last column (which uses Table.Box). Using an empty vector or omitting an argument doesn’t change the corresponding cycle.

See also ...

Table Appearance | Table Cyclic Settings | Table Glossary | Table Members | Table.SetCellBox Method | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method

Table.SetColumnGrid Method

Set to default 0.1 black solid for all columns.

public void SetColumnGrid();

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Double[],Color[],LineStyle[])

Table.SetColumnGrid Method (Double[],Color[],LineStyle[])

Set vertical grid decoration (Defaults to 0.1 black solid).

public void SetColumnGrid(
    double[] weights,
    Color[] colors,
    LineStyle[] styles
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.
styles
Grid line styles.

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Double)

Table.SetColumnGrid Method (Double)

Set black solid line for all columns.

public void SetColumnGrid(
    double weight
);

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Int32[])

Table.SetColumnGrid Method (Int32[])

Set black solid lines to cycle through.

public void SetColumnGrid(
    int[] weights
);
weights
Grid line widths – 0 to disable grid.

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Double[])

Table.SetColumnGrid Method (Double[])

Set black solid lines to cycle through.

public void SetColumnGrid(
    double[] weights
);
weights
Grid line widths – 0 to disable grid.

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Double,Color)

Table.SetColumnGrid Method (Double,Color)

Set solid line for all columns.

public void SetColumnGrid(
    double weight,
    Color color
);

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Int32[],Color[])

Table.SetColumnGrid Method (Int32[],Color[])

Set solid lines to cycle through.

public void SetColumnGrid(
    int[] weights,
    Color[] colors
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Double[],Color[])

Table.SetColumnGrid Method (Double[],Color[])

Set solid lines to cycle through.

public void SetColumnGrid(
    double[] weights,
    Color[] colors
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Double,Color,LineStyle)

Table.SetColumnGrid Method (Double,Color,LineStyle)

Set grid line for all columns.

public void SetColumnGrid(
    double weight,
    Color color,
    LineStyle style
);

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnGrid Method (Int32[],Color[],LineStyle[])

Table.SetColumnGrid Method (Int32[],Color[],LineStyle[])

Set grid lines to cycle through.

public void SetColumnGrid(
    int[] weights,
    Color[] colors,
    LineStyle[] styles
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.
styles
Grid line styles.

See also ...

Table Members | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetColumnMaxWidths Method

Table.SetColumnMaxWidths Method

Set maximum column widths to cycle through from current column on (defaults to -1 for no limit).

Overloads

  • public void SetColumnMaxWidths(double width);
  • public void SetColumnMaxWidths(int[] widths);
  • public void SetColumnMaxWidths(double[] widths);

Example

   tb.SetColumnMaxWidths(144);  // floating-size columns should never be wider than two inches

See also ...

Sizing Columns and Rows | Table Cyclic Settings | Table Glossary | Table Members | Table.SetColumnMinWidths Method | Table.SetColumnWidths Method


SharpPlot 3.71 User Manual: SetColumnMaxWidths Method (Double)

Table.SetColumnMaxWidths Method (Double)

Set maximum column width for all next columns.

public void SetColumnMaxWidths(
    double width
);

See also ...

Table Members | Table.SetColumnMaxWidths Method


SharpPlot 3.71 User Manual: SetColumnMaxWidths Method (Int32[])

Table.SetColumnMaxWidths Method (Int32[])

Set maximum column widths to cycle through from current column on.

public void SetColumnMaxWidths(
    int[] widths
);
widths
maximum column width in points (negative means no limit).

See also ...

Table Members | Table.SetColumnMaxWidths Method


SharpPlot 3.71 User Manual: SetColumnMaxWidths Method (Double[])

Table.SetColumnMaxWidths Method (Double[])

Set maximum column widths to cycle through from current column on (defaults to ¯1 for no limit).

public void SetColumnMaxWidths(
    double[] widths
);
widths
maximum column width in points (negative means no limit).

See also ...

Table Members | Table.SetColumnMaxWidths Method


SharpPlot 3.71 User Manual: SetColumnMerge Method

Table.SetColumnMerge Method

Set vertical cell merging flags to cycle through from current column on (defaults to false).

Overloads

  • public void SetColumnMerge(bool value);
  • public void SetColumnMerge(bool[] values);

Example

   tb.SetColumnMerge(true);  // Enable cell merging along columns

Description

See MergeOrder if merging rows too.

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.MergeOrder Property | Table.SetRowMerge Method


SharpPlot 3.71 User Manual: SetColumnMerge Method (Boolean)

Table.SetColumnMerge Method (Boolean)

Set cell merging flag for all next columns.

public void SetColumnMerge(
    bool value
);

See also ...

Table Members | Table.SetColumnMerge Method


SharpPlot 3.71 User Manual: SetColumnMerge Method (Boolean[])

Table.SetColumnMerge Method (Boolean[])

Set vertical cell merging flags to cycle through from current column on (defaults to false).

public void SetColumnMerge(
    bool[] values
);

See also ...

Table Members | Table.SetColumnMerge Method


SharpPlot 3.71 User Manual: SetColumnMinWidths Method

Table.SetColumnMinWidths Method

Set minimum column widths to cycle through from current column on (defaults to 6 – twice the default cell gutter).

Overloads

  • public void SetColumnMinWidths(double width);
  • public void SetColumnMinWidths(int[] widths);
  • public void SetColumnMinWidths(double[] widths);

Example

   tb.SetColumnMinWidths(0);  // do not display empty columns at all

See also ...

Sizing Columns and Rows | Table Cyclic Settings | Table Glossary | Table Members | Table.SetColumnMaxWidths Method | Table.SetColumnWidths Method


SharpPlot 3.71 User Manual: SetColumnMinWidths Method (Double)

Table.SetColumnMinWidths Method (Double)

Set minimum column width for all next columns.

public void SetColumnMinWidths(
    double width
);

See also ...

Table Members | Table.SetColumnMinWidths Method


SharpPlot 3.71 User Manual: SetColumnMinWidths Method (Int32[])

Table.SetColumnMinWidths Method (Int32[])

Set minimum column widths to cycle through from current column on.

public void SetColumnMinWidths(
    int[] widths
);

See also ...

Table Members | Table.SetColumnMinWidths Method


SharpPlot 3.71 User Manual: SetColumnMinWidths Method (Double[])

Table.SetColumnMinWidths Method (Double[])

Set minimum column widths to cycle through from current column on (defaults to 6 – twice the default cell gutter).

public void SetColumnMinWidths(
    double[] widths
);

See also ...

Table Members | Table.SetColumnMinWidths Method


SharpPlot 3.71 User Manual: SetColumnRetain Method

Table.SetColumnRetain Method

Add indices of table columns that should be repeated on all subpages.

Overloads

  • public void SetColumnRetain();
  • public void SetColumnRetain(int col);
  • public void SetColumnRetain(int[] cols);

Example

   tb.SetColumnRetain(-1);  // Retain current last column on all blocks

Description

Use positive values from left and negative values from right (numbers start at 1). Column keys accumulate. Insert a 0 to reset all previous settings.

See also ...

Splitting Blocks of Columns | Table Members | Table.SetRowRetain Method | Table.SetTitles Method


SharpPlot 3.71 User Manual: SetColumnRetain Method

Table.SetColumnRetain Method

Retain current column.

public void SetColumnRetain();

See also ...

Table Members | Table.SetColumnRetain Method


SharpPlot 3.71 User Manual: SetColumnRetain Method (Int32)

Table.SetColumnRetain Method (Int32)

Retain a single column.

public void SetColumnRetain(
    int col
);

See also ...

Table Members | Table.SetColumnRetain Method


SharpPlot 3.71 User Manual: SetColumnRetain Method (Int32[])

Table.SetColumnRetain Method (Int32[])

Add indices of table columns that should be repeated on all subpages.

public void SetColumnRetain(
    int[] cols
);

See also ...

Table Members | Table.SetColumnRetain Method


SharpPlot 3.71 User Manual: SetColumnWidths Method

Table.SetColumnWidths Method

Set column widths to cycle through from current column on.

Overloads

  • public void SetColumnWidths(double width);
  • public void SetColumnWidths(int[] widths);
  • public void SetColumnWidths(double[] widths);

Example

  // Auto-fit first column, then share available width evenly amongst column 2-5
   tb.SetColumnWidths(new int[] {0,-1,-1,-1,-1});

Description

Positive values are absolute size in points. Negative values are proportions. 0 is auto-fit to content. Default is -1. See SharpLeaf.IncludeTable for a decription of column width computation.

To prevent a column from displaying, pass 0 to SetColumnMaxWidths.

When using auto-fit, SetColumnMaxWidths to a fixed positive value might be useful to prevent columns from taking too much width.

When using proportions, SetColumnMinWidths to a fixed positive value might be useful to prevent columns from being sized to zero.

See also ...

Sizing Columns and Rows | Table Cyclic Settings | Table Glossary | Table Members | Table.SetColumnMaxWidths Method | Table.SetColumnMinWidths Method


SharpPlot 3.71 User Manual: SetColumnWidths Method (Double)

Table.SetColumnWidths Method (Double)

Set column width for all next columns.

public void SetColumnWidths(
    double width
);

See also ...

Table Members | Table.SetColumnWidths Method


SharpPlot 3.71 User Manual: SetColumnWidths Method (Int32[])

Table.SetColumnWidths Method (Int32[])

Set column widths to cycle through from current column on.

public void SetColumnWidths(
    int[] widths
);

See also ...

Table Members | Table.SetColumnWidths Method


SharpPlot 3.71 User Manual: SetColumnWidths Method (Double[])

Table.SetColumnWidths Method (Double[])

Set column widths to cycle through from current column on.

public void SetColumnWidths(
    double[] widths
);

See also ...

Table Members | Table.SetColumnWidths Method


SharpPlot 3.71 User Manual: SetOffset Method

Table.SetOffset Method

Leave some columns and rows outside the table box and grid.

public void SetOffset(
    int columns,
    int rows
);
columns
Number of leading columns to leave outside the table box.
rows
Number of leading rows to leave outside the table box.

Example

   tb.SetOffset(1,0);  // Offset table box and grid by 1 column and 0 row

Description

Generally used in conjunction with SetTitles. Affects which gridlines are not drawn – but not their span. For more advanced control on grid, disable them with SetColumnGrid(0) and SetRowGrid(0) and use SetCellBox for each cell.

See also ...

Table Members | Table.Box Property | Table.SetTitles Method


SharpPlot 3.71 User Manual: SetRowAfter Method

Table.SetRowAfter Method

Set row bottom margins to cycle through from current row on (default is 3).

Overloads

  • public void SetRowAfter(double height);
  • public void SetRowAfter(int[] heights);
  • public void SetRowAfter(double[] heights);

Example

   tb.SetRowAfter(new int[] {3,3,3,3,10});  // every fifth row has more space after

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.SetRowBefore Method


SharpPlot 3.71 User Manual: SetRowAfter Method (Double)

Table.SetRowAfter Method (Double)

Set row bottom margin for all next rows.

public void SetRowAfter(
    double height
);

See also ...

Table Members | Table.SetRowAfter Method


SharpPlot 3.71 User Manual: SetRowAfter Method (Int32[])

Table.SetRowAfter Method (Int32[])

Set row bottom margins to cycle through from current row on.

public void SetRowAfter(
    int[] heights
);

See also ...

Table Members | Table.SetRowAfter Method


SharpPlot 3.71 User Manual: SetRowAfter Method (Double[])

Table.SetRowAfter Method (Double[])

Set row bottom margins to cycle through from current row on (default is 3).

public void SetRowAfter(
    double[] heights
);

See also ...

Table Members | Table.SetRowAfter Method


SharpPlot 3.71 User Manual: SetRowBefore Method

Table.SetRowBefore Method

Set row top margins to cycle through from current row on (default is 3).

Overloads

  • public void SetRowBefore(double height);
  • public void SetRowBefore(int[] heights);
  • public void SetRowBefore(double[] heights);

Example

   tb.SetRowBefore(new int[] {3,3,3,3,10});  // every fifth row has more space before

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.SetRowAfter Method


SharpPlot 3.71 User Manual: SetRowBefore Method (Double)

Table.SetRowBefore Method (Double)

Set row top margin for all next rows.

public void SetRowBefore(
    double height
);

See also ...

Table Members | Table.SetRowBefore Method


SharpPlot 3.71 User Manual: SetRowBefore Method (Int32[])

Table.SetRowBefore Method (Int32[])

Set row top margins to cycle through from current row on.

public void SetRowBefore(
    int[] heights
);

See also ...

Table Members | Table.SetRowBefore Method


SharpPlot 3.71 User Manual: SetRowBefore Method (Double[])

Table.SetRowBefore Method (Double[])

Set row top margins to cycle through from current row on (default is 3).

public void SetRowBefore(
    double[] heights
);

See also ...

Table Members | Table.SetRowBefore Method


SharpPlot 3.71 User Manual: SetRowGrid Method

Table.SetRowGrid Method

Set horizontal grid decoration (defaults to 0.1 black solid).

Overloads

  • public void SetRowGrid();
  • public void SetRowGrid(double weight);
  • public void SetRowGrid(int[] weights);
  • public void SetRowGrid(double[] weights);
  • public void SetRowGrid(double weight,Color color);
  • public void SetRowGrid(int[] weights,Color[] colors);
  • public void SetRowGrid(double[] weights,Color[] colors);
  • public void SetRowGrid(double weight,Color color,LineStyle style);
  • public void SetRowGrid(int[] weights,Color[] colors,LineStyle[] styles);
  • public void SetRowGrid(double[] weights,Color[] colors,LineStyle[] styles);

Example

  // 2-pt thick grid every other row - without changing color or style
   tb.SetColumnGrid(new int[] {0,2});

Description

Each grid setting will be cycled through independently, from current row on. They apply to the gridline below the row, unless it is the last row (which uses Table.Box). Using an empty vector or omitting an argument doesn’t change the corresponding cycle.

See also ...

Table Appearance | Table Cyclic Settings | Table Glossary | Table Members | Table.SetCellBox Method | Table.SetColumnGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method

Table.SetRowGrid Method

Set to default 0.1 black solid for all columns.

public void SetRowGrid();

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Double[],Color[],LineStyle[])

Table.SetRowGrid Method (Double[],Color[],LineStyle[])

Set horizontal grid decoration (defaults to 0.1 black solid).

public void SetRowGrid(
    double[] weights,
    Color[] colors,
    LineStyle[] styles
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.
styles
Grid line styles.

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Double)

Table.SetRowGrid Method (Double)

Set black solid line for all columns.

public void SetRowGrid(
    double weight
);

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Int32[])

Table.SetRowGrid Method (Int32[])

Set black solid lines to cycle through.

public void SetRowGrid(
    int[] weights
);
weights
Grid line widths – 0 to disable grid.

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Double[])

Table.SetRowGrid Method (Double[])

Set black solid lines to cycle through.

public void SetRowGrid(
    double[] weights
);
weights
Grid line widths – 0 to disable grid.

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Double,Color)

Table.SetRowGrid Method (Double,Color)

Set solid line for all columns.

public void SetRowGrid(
    double weight,
    Color color
);

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Int32[],Color[])

Table.SetRowGrid Method (Int32[],Color[])

Set solid lines to cycle through.

public void SetRowGrid(
    int[] weights,
    Color[] colors
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Double[],Color[])

Table.SetRowGrid Method (Double[],Color[])

Set solid lines to cycle through.

public void SetRowGrid(
    double[] weights,
    Color[] colors
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Double,Color,LineStyle)

Table.SetRowGrid Method (Double,Color,LineStyle)

Set grid line for all columns.

public void SetRowGrid(
    double weight,
    Color color,
    LineStyle style
);

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowGrid Method (Int32[],Color[],LineStyle[])

Table.SetRowGrid Method (Int32[],Color[],LineStyle[])

Set grid lines to cycle through.

public void SetRowGrid(
    int[] weights,
    Color[] colors,
    LineStyle[] styles
);
weights
Grid line widths – 0 to disable grid.
colors
Grid line colors.
styles
Grid line styles.

See also ...

Table Members | Table.SetRowGrid Method


SharpPlot 3.71 User Manual: SetRowHeights Method

Table.SetRowHeights Method

Set fixed row heights to cycle through from current row on.

Overloads

  • public void SetRowHeights(double height);
  • public void SetRowHeights(int[] heights);
  • public void SetRowHeights(double[] heights);

Example

   tb.SetRowHeights(36);  // All rows take exactly half an inch

Description

Really is a shortcut to calling SetRowMinHeights and SetRowMaxHeights with the same argument.

See also ...

Sizing Columns and Rows | Table Cyclic Settings | Table Glossary | Table Members | Table.SetColumnWidths Method | Table.SetRowMaxHeights Method | Table.SetRowMinHeights Method


SharpPlot 3.71 User Manual: SetRowHeights Method (Double)

Table.SetRowHeights Method (Double)

Set fixed row height for all next rows.

public void SetRowHeights(
    double height
);

See also ...

Table Members | Table.SetRowHeights Method


SharpPlot 3.71 User Manual: SetRowHeights Method (Int32[])

Table.SetRowHeights Method (Int32[])

Set fixed row heights to cycle through from current row on.

public void SetRowHeights(
    int[] heights
);

See also ...

Table Members | Table.SetRowHeights Method


SharpPlot 3.71 User Manual: SetRowHeights Method (Double[])

Table.SetRowHeights Method (Double[])

Set fixed row heights to cycle through from current row on.

public void SetRowHeights(
    double[] heights
);

See also ...

Table Members | Table.SetRowHeights Method


SharpPlot 3.71 User Manual: SetRowMaxHeights Method

Table.SetRowMaxHeights Method

Set maximum row heights to cycle through from current row on (defaults to -1 for no limit).

Overloads

  • public void SetRowMaxHeights(double height);
  • public void SetRowMaxHeights(int[] heights);
  • public void SetRowMaxHeights(double[] heights);

Example

  // First row has no limit, rows 2-5 are limited to one inch
   tb.SetRowMaxHeights(new int[] {-1,72,72,72,72});

See also ...

Sizing Columns and Rows | Table Glossary | Table Members | Table.SetRowMinHeights Method


SharpPlot 3.71 User Manual: SetRowMaxHeights Method (Double)

Table.SetRowMaxHeights Method (Double)

Set maximum row height for all next rows.

public void SetRowMaxHeights(
    double height
);

See also ...

Table Members | Table.SetRowMaxHeights Method


SharpPlot 3.71 User Manual: SetRowMaxHeights Method (Int32[])

Table.SetRowMaxHeights Method (Int32[])

Set maximum row heights to cycle through from current row on.

public void SetRowMaxHeights(
    int[] heights
);
heights
Maximum row heights in points (positive is absolute size in point, negative is no limit).

See also ...

Table Members | Table.SetRowMaxHeights Method


SharpPlot 3.71 User Manual: SetRowMaxHeights Method (Double[])

Table.SetRowMaxHeights Method (Double[])

Set maximum row heights to cycle through from current row on (defaults to ¯1 for no limit).

public void SetRowMaxHeights(
    double[] heights
);
heights
Maximum row heights in points (positive is absolute size in point, negative is no limit).

See also ...

Table Members | Table.SetRowMaxHeights Method


SharpPlot 3.71 User Manual: SetRowMerge Method

Table.SetRowMerge Method

Set horizontal cell merging flags to cycle through from current row on (defaults to false).

Overloads

  • public void SetRowMerge(bool value);
  • public void SetRowMerge(bool[] values);

Example

   tb.SetRowMerge(true);  // Allow cell merging along rows from now on

Description

See MergeOrder if merging colums too.

See also ...

Table Cyclic Settings | Table Glossary | Table Members | Table.MergeOrder Property | Table.SetColumnMerge Method


SharpPlot 3.71 User Manual: SetRowMerge Method (Boolean)

Table.SetRowMerge Method (Boolean)

Set cell merging flag for all next rows (defaults to false).

public void SetRowMerge(
    bool value
);

See also ...

Table Members | Table.SetRowMerge Method


SharpPlot 3.71 User Manual: SetRowMerge Method (Boolean[])

Table.SetRowMerge Method (Boolean[])

Set horizontal cell merging flags to cycle through from current row on (defaults to false).

public void SetRowMerge(
    bool[] values
);

See also ...

Table Members | Table.SetRowMerge Method


SharpPlot 3.71 User Manual: SetRowMinHeights Method

Table.SetRowMinHeights Method

Set minimum row heights to cycle through from current row on (defaults to 6 – twice the default cell gutter).

Overloads

  • public void SetRowMinHeights(double height);
  • public void SetRowMinHeights(int[] heights);
  • public void SetRowMinHeights(double[] heights);

Example

   tb.SetRowMinHeights(0);  // Do not display empty rows at all

See also ...

Sizing Columns and Rows | Table Cyclic Settings | Table Glossary | Table Members | Table.SetRowMaxHeights Method


SharpPlot 3.71 User Manual: SetRowMinHeights Method (Double)

Table.SetRowMinHeights Method (Double)

Set minimum row height for all next rows.

public void SetRowMinHeights(
    double height
);

See also ...

Table Members | Table.SetRowMinHeights Method


SharpPlot 3.71 User Manual: SetRowMinHeights Method (Int32[])

Table.SetRowMinHeights Method (Int32[])

Set minimum row heights to cycle through from current row on.

public void SetRowMinHeights(
    int[] heights
);

See also ...

Table Members | Table.SetRowMinHeights Method


SharpPlot 3.71 User Manual: SetRowMinHeights Method (Double[])

Table.SetRowMinHeights Method (Double[])

Set minimum row heights to cycle through from current row on (defaults to 6 – twice the default cell gutter).

public void SetRowMinHeights(
    double[] heights
);

See also ...

Table Members | Table.SetRowMinHeights Method


SharpPlot 3.71 User Manual: SetRowRetain Method

Table.SetRowRetain Method

Add indices of table rows that should be repeated on all subpages.

Overloads

  • public void SetRowRetain();
  • public void SetRowRetain(int row);
  • public void SetRowRetain(int[] rows);

Example

   tb.SetRowRetain(-1);  // Retain current last row on all blocks

Description

Use positive values from top and negative values from bottom (numbers start at 1). Retained rows accumulate. Insert a 0 to reset all previous settings.

See also ...

Splitting Blocks of Columns | Table Members | Table.SetColumnRetain Method | Table.SetTitles Method


SharpPlot 3.71 User Manual: SetRowRetain Method

Table.SetRowRetain Method

Retain current row.

public void SetRowRetain();

See also ...

Table Members | Table.SetRowRetain Method


SharpPlot 3.71 User Manual: SetRowRetain Method (Int32)

Table.SetRowRetain Method (Int32)

Retain a single column.

public void SetRowRetain(
    int row
);

See also ...

Table Members | Table.SetRowRetain Method


SharpPlot 3.71 User Manual: SetRowRetain Method (Int32[])

Table.SetRowRetain Method (Int32[])

Add indices of table rows that should be repeated on all subpages.

public void SetRowRetain(
    int[] rows
);

See also ...

Table Members | Table.SetRowRetain Method


SharpPlot 3.71 User Manual: SetTitles Method

Table.SetTitles Method

Set the number of leading columns and rows that are titles.

public void SetTitles(
    int columns,
    int rows
);
columns
Number of leading columns that are titles.
rows
Number of leading rows that are titles.

Example

   tb.SetTitles(0,1);  // 0 column of row titles, 1 row of column titles

Description

Titles will be boxed with the table box, unless matching argument of SetOffset is larger or equal, in which case they will stand outside the box.

Titles cells may be merged together, but not with non-title cells (see SetColumnMerge/SetRowMerge).

Titles will be repeated on all table sub-pages (the general way to do this is SetColumnRetain/SetRowRetain).

See also ...

Table Appearance | Table Glossary | Table Members | Table.Box Property | Table.SetColumnGrid Method | Table.SetColumnRetain Method | Table.SetOffset Method | Table.SetRowGrid Method | Table.SetRowRetain Method


SharpPlot 3.71 User Manual: SharpLeaf Structures

SharpLeaf Structures

FontType Structure
Font attributes (name, size, style, color, interline).
ParagraphStyle Structure
Text and paragraph settings for basic typesetting.
BoxStyle Structure
Boxing decoration attributes (edge, fill, etc.).


SharpPlot 3.71 User Manual: FontType Structure

FontType Structure

Font attributes (name, size, style, color, interline).

public class FontType

Constructors

  • public FontType();
  • public FontType(string fontName, double fontSize);
  • public FontType(string fontName, double fontSize, FontStyle fontStyle) ;
  • public FontType(string fontName, double fontSize, FontStyle fontStyle, Color fontColor) ;
  • public FontType(string fontName, double fontSize, FontStyle fontStyle, Color fontColor, double fontInter) ;
  • public FontType(string fontName,double fontSize,FontStyle fontStyle,Color fontColor,double fontInter,string fontPS);

FontType Instance Properties

Color | Font color
Interline | Height of blank space in-between lines : absolute in points if positive, relative to font size if negative
Name | Font face name
Pitch | Height between lines of text (font size + absolute interline) (ReadOnly)
PostscriptName | PostScript-specific font name
Size | Font size in points
Style | Font style (Regular, Bold, Italic, Underline, Strikethrough)

FontType Methods

Clone | Take a deep copy of a Font definition
ToString | Readable summary of FontType detail

See also

Font Glossary | ParagraphStyle.Font | Table.SetCellFont | TextBlock.Font

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

FontType.Members

Constructors

  • public FontType();
  • public FontType(string fontName, double fontSize);
  • public FontType(string fontName, double fontSize, FontStyle fontStyle) ;
  • public FontType(string fontName, double fontSize, FontStyle fontStyle, Color fontColor) ;
  • public FontType(string fontName, double fontSize, FontStyle fontStyle, Color fontColor, double fontInter) ;
  • public FontType(string fontName,double fontSize,FontStyle fontStyle,Color fontColor,double fontInter,string fontPS);

FontType Instance Properties

Color | Font color
Interline | Height of blank space in-between lines : absolute in points if positive, relative to font size if negative
Name | Font face name
Pitch | Height between lines of text (font size + absolute interline) (ReadOnly)
PostscriptName | PostScript-specific font name
Size | Font size in points
Style | Font style (Regular, Bold, Italic, Underline, Strikethrough)

FontType Methods

Clone | Take a deep copy of a Font definition
ToString | Readable summary of FontType detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: FontType Constructor

FontType Constructor

Create a font descriptor, giving font name, size, and optional FontStyle, Color, and interline space.

Overloads

  • public FontType();
  • public FontType(string fontName, double fontSize);
  • public FontType(string fontName, double fontSize, FontStyle fontStyle) ;
  • public FontType(string fontName, double fontSize, FontStyle fontStyle, Color fontColor) ;
  • public FontType(string fontName, double fontSize, FontStyle fontStyle, Color fontColor, double fontInter) ;
  • public FontType(string fontName,double fontSize,FontStyle fontStyle,Color fontColor,double fontInter,string fontPS);

Example

  // Grey bold Arial, with 18-point font size, and interline of half the size
   font = new FontType("Arial",18,FontStyle.Bold,Color.Gray,-0.5);

See also ...

FontType.Members


SharpPlot 3.71 User Manual: FontType Constructor

FontType Constructor

Default font definition – Times 12 Regular Black with 20% interline.

public FontType();

See also ...

FontType.Members | FontType.FontType Constructor


SharpPlot 3.71 User Manual: FontType Constructor (String,Double)

FontType Constructor (String,Double)

Define a regular black font with default interline.

public FontType(
    string fontName,
    double fontSize
);
fontName
Font face identifier (see Name property).
fontSize
Font size, in points.

See also ...

FontType.Members | FontType.FontType Constructor


SharpPlot 3.71 User Manual: FontType Constructor (String,Double,FontStyle)

FontType Constructor (String,Double,FontStyle)

Define a black font with decoration and default interline.

public FontType(
    string fontName,
    double fontSize,
    FontStyle fontStyle
);
fontName
Font face identifier (see Name property).
fontSize
Font size, in points.
fontStyle
FontStyle decoration : Regular (default), or combinations of Bold, Italic, Underline and Strikeout.

See also ...

FontType.Members | FontType.FontType Constructor


SharpPlot 3.71 User Manual: FontType Constructor (String,Double,FontStyle,Color)

FontType Constructor (String,Double,FontStyle,Color)

Define a font with default interline.

public FontType(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor
);
fontName
Font face identifier (see Name property).
fontSize
Font size, in points.
fontStyle
FontStyle decoration : Regular (default), or combinations of Bold, Italic, Underline and Strikeout.
fontColor
Font color – default to black.

See also ...

FontType.Members | FontType.FontType Constructor


SharpPlot 3.71 User Manual: FontType Constructor (String,Double,FontStyle,Color,Double)

FontType Constructor (String,Double,FontStyle,Color,Double)

Define a font with specific interline.

public FontType(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor,
    double fontInter
);
fontName
Font face identifier (see Name property).
fontSize
Font size, in points.
fontStyle
FontStyle decoration : Regular (default), or combinations of Bold, Italic, Underline and Strikeout.
fontColor
Font color – default to black.
fontInter
Font interline – defaults to -0.2, that is a relative interline of 20% of the font size.

See also ...

FontType.Members | FontType.FontType Constructor


SharpPlot 3.71 User Manual: FontType Constructor (String,Double,FontStyle,Color,Double,String)

FontType Constructor (String,Double,FontStyle,Color,Double,String)

Create a font descriptor, giving font name, size, and optional FontStyle, Color, and interline space.

public FontType(
    string fontName,
    double fontSize,
    FontStyle fontStyle,
    Color fontColor,
    double fontInter,
    string fontPS
);
fontName
Font face identifier (see Name property).
fontSize
Font size, in points.
fontStyle
FontStyle decoration : Regular (default), or combinations of Bold, Italic, Underline and Strikeout.
fontColor
Font color – default to black.
fontInter
Font interline – defaults to -0.2, that is a relative interline of 20% of the font size.
fontPS
PostScript font name (see PostScriptName property).

See also ...

FontType.Members | FontType.FontType Constructor


SharpPlot 3.71 User Manual: Clone Method

FontType.Clone Method

Take a deep copy of a Font definition.

public FontType Clone();

See also ...

FontType.Members


SharpPlot 3.71 User Manual: Color Property

FontType.Color Property

Font color.

public Color Color {get; set;}

Example

font.Color = Color.Navy;

See also ...

FontType.Members


SharpPlot 3.71 User Manual: Interline Property

FontType.Interline Property

Height of blank space in-between lines : absolute in points if positive, relative to font size if negative.

public double Interline {get; set;}

Example

font.Interline = ¯0.5; // Interline of half the font size

See also ...

Font Glossary | FontType.Members


SharpPlot 3.71 User Manual: Name Property

FontType.Name Property

Font face name.

public string Name {get; set;}

Example

font.Name = "Verdana";

Adding fallback fonts

A list of fallback fonts can be specified with comma-separated names. This is particularly useful for web formats, when the fonts available to the display system are unknown.

font.Name = "Verdana,Arial,Sans"; // Try Verdana, then Arial, then fallback to any font of the "sans" family.

Adding CSS effects

CSS effects can be attached to the font, after a semicolon ‘;’.

font.Name = "Verdana,Arial,Sans;opacity:0.8"; // use opacity on drivers that support it

See also ...

FontType.Members


SharpPlot 3.71 User Manual: Pitch Property (ReadOnly)

FontType.Pitch Property (ReadOnly)

Height between lines of text (font size + absolute interline) (ReadOnly).

public double Pitch {get;}

Example

double pitch = font.Pitch;

See also ...

Font Glossary | FontType.Members


SharpPlot 3.71 User Manual: Size Property

FontType.Size Property

Font size in points.

public double Size {get; set;}

Example

font.Size = 12;

See also ...

Font Glossary | FontType.Members


SharpPlot 3.71 User Manual: Style Property

FontType.Style Property

Font style (Regular, Bold, Italic, Underline, Strikethrough).

public FontStyle Style {get; set;}

Example

font.Style = FontStyle.Italic|FontStyle.Underline; // Italic and bold

See also ...

FontType.Members


SharpPlot 3.71 User Manual: ToString Method

FontType.ToString Method

Readable summary of FontType detail.

public override string ToString();

See also ...

FontType.Members


SharpPlot 3.71 User Manual: PostscriptName Property

FontType.PostscriptName Property

PostScript-specific font name, which may be different from the system’s TrueType font name.

public string PostscriptName {get; set;}

Example

font.PostscriptName = "Univers";

Description

4 variants (regular, bold, italic, bold+italic) may be provided here, separated by ‘,’ Otherwise, the standard ‘-Bold’ ‘-Italic’ ‘-BoldItalic’ suffixes are used. So the example above is equivalent to :

font.PostscriptName = "Univers,Univers-Bold,Univers-Italic,Univers-BoldItalic";

Embedding PFA font files

A PFA font file can be embedded if a fontname is followed by ‘@’ and then the path to the font file. That allows the Postscript file to be independent of the presence of the font by the displaying device.

font.PostscriptName = "Univers@C:\\fonts\\universe.pfa"; // specify the font file to embed that has the font as described by the name.

A PFA font file can be generated from a TTF file with “ttd2pt1 -e”.

See also ...

FontType.Members


SharpPlot 3.71 User Manual: ParagraphStyle Structure

ParagraphStyle Structure

Text and paragraph settings for basic typesetting.

Because ParagraphStyles are passed by reference, they can be modified in-flight after being assigned. See the advanced text tutorial for examples.

ParagraphStyles can often be amended with a string description as provided by the ToString method.

public class ParagraphStyle

Constructors

  • public ParagraphStyle();
  • public ParagraphStyle(ParagraphStyle parent);
  • public ParagraphStyle(string extras);
  • public ParagraphStyle(ParagraphStyle parent,string extras);

ParagraphStyle Instance Properties

Alignment | Text horizontal alignment within frame (default is Alignment.Left)
BookmarkLevel | Level of automatic bookmarking at each new paragraph (defaults to 0 for disabled)
BookmarkOpened | Flag for automatic bookmarks to be opened in the viewer (defaults to false)
BulletFont | Bullet Font (default to null for working paragraph font)
BulletIndent | Extra indenting in points for bulletted paragraphs (defaults to 0)
ClearLeft | This paragraph type will skip all inclusions on the left margin before starting (default is false)
ClearRight | This paragraph type will skip all inclusions on the right margin before starting (default is false)
Font | Working font (name, size, style, color and interline)
FrameBreak | This paragraph type will always begin in a new frame (default is false)
HorizontalGap | Horizontal space around inclusions, bullets and boxes (positive is absolute size in points, negative is multiple of line pitch)
IndentFirst | First line indent in points (default is 0)
IndentFirstAfterChange | Flag to control first indent after a change of style (true by default)
IndentLeft | Left indent in points from edge of frame (default is 0)
IndentRight | Right indent in points from edge of frame (default is 0)
Keep | Number of lines to keep together at the start or end of a paragraph – also known as widows and orphans (default is 1 for disabled)
PageBreak | This paragraph type will always begin on a new page (default is false)
SpaceAfter | Trailing paragraph space (positive is absolute size in points, negative is multiple of line pitch) (default is 0)
SpaceBefore | Leading paragraph space (positive is absolute size in points, negative is multiple of line pitch) (default is 0)
SpaceBetween | Flag to enable SpaceBefore and SpaceAfter between paragraphs using the same style (defaults to true)
SpaceFollowing | Available space to bottom of frame which must follow this paragraph (positive is absolute size in points, negative is multiple of line pitch) (defaults to 0)
SpaceStarting | Available space to bottom of frame required to start this paragraph (positive is absolute size in points, negative is multiple of line pitch) (defaults to 0)
Wrap | Wrap text between margin (defaults to true)

ParagraphStyle Methods

AddTab | Define a new tab with position and optional alignment – clearing default tabs if unset so far
Clone | Take a deep copy of a ParagraphStyle, so that properties can be changed without changing the original style
ResetTabs | Set tab-bar back to system default of twelve 72pt tabs
Set | Update current style with a set of properties and values as a string
SetBullet | Set string to use for bulletted lists (defaults to empty string to disable bullets)
SetTabAlignments | Set Alignment for each existing tab stop (defaults to Alignment.Left)
SetTabs | Set the full list of tab stops positions in points from left edge of frame
ToString | Parsable summary of style settings

See also

Paragraph Tutorial | Paragraph Glossary | SharpLeaf.Style

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

ParagraphStyle.Members

Constructors

  • public ParagraphStyle();
  • public ParagraphStyle(ParagraphStyle parent);
  • public ParagraphStyle(string extras);
  • public ParagraphStyle(ParagraphStyle parent,string extras);

ParagraphStyle Instance Properties

Alignment | Text horizontal alignment within frame (default is Alignment.Left)
BookmarkLevel | Level of automatic bookmarking at each new paragraph (defaults to 0 for disabled)
BookmarkOpened | Flag for automatic bookmarks to be opened in the viewer (defaults to false)
BulletFont | Bullet Font (default to null for working paragraph font)
BulletIndent | Extra indenting in points for bulletted paragraphs (defaults to 0)
ClearLeft | This paragraph type will skip all inclusions on the left margin before starting (default is false)
ClearRight | This paragraph type will skip all inclusions on the right margin before starting (default is false)
Font | Working font (name, size, style, color and interline)
FrameBreak | This paragraph type will always begin in a new frame (default is false)
HorizontalGap | Horizontal space around inclusions, bullets and boxes (positive is absolute size in points, negative is multiple of line pitch)
IndentFirst | First line indent in points (default is 0)
IndentFirstAfterChange | Flag to control first indent after a change of style (true by default)
IndentLeft | Left indent in points from edge of frame (default is 0)
IndentRight | Right indent in points from edge of frame (default is 0)
Keep | Number of lines to keep together at the start or end of a paragraph – also known as widows and orphans (default is 1 for disabled)
PageBreak | This paragraph type will always begin on a new page (default is false)
SpaceAfter | Trailing paragraph space (positive is absolute size in points, negative is multiple of line pitch) (default is 0)
SpaceBefore | Leading paragraph space (positive is absolute size in points, negative is multiple of line pitch) (default is 0)
SpaceBetween | Flag to enable SpaceBefore and SpaceAfter between paragraphs using the same style (defaults to true)
SpaceFollowing | Available space to bottom of frame which must follow this paragraph (positive is absolute size in points, negative is multiple of line pitch) (defaults to 0)
SpaceStarting | Available space to bottom of frame required to start this paragraph (positive is absolute size in points, negative is multiple of line pitch) (defaults to 0)
Wrap | Wrap text between margin (defaults to true)

ParagraphStyle Methods

AddTab | Define a new tab with position and optional alignment – clearing default tabs if unset so far
Clone | Take a deep copy of a ParagraphStyle, so that properties can be changed without changing the original style
ResetTabs | Set tab-bar back to system default of twelve 72pt tabs
Set | Update current style with a set of properties and values as a string
SetBullet | Set string to use for bulletted lists (defaults to empty string to disable bullets)
SetTabAlignments | Set Alignment for each existing tab stop (defaults to Alignment.Left)
SetTabs | Set the full list of tab stops positions in points from left edge of frame
ToString | Parsable summary of style settings

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: ParagraphStyle Constructor

ParagraphStyle Constructor

Create a paragraph style for SharpLeaf.

Overloads

  • public ParagraphStyle();
  • public ParagraphStyle(ParagraphStyle parent);
  • public ParagraphStyle(string extras);
  • public ParagraphStyle(ParagraphStyle parent,string extras);

Example

  // Take a copy of current style, changing alignment to center
   style = new ParagraphStyle(lf.Style,"Alignment=Center");

See also ...

ParagraphStyle.Members


SharpPlot 3.71 User Manual: ParagraphStyle Constructor

ParagraphStyle Constructor

Create a default paragraph style.

public ParagraphStyle();

See also ...

ParagraphStyle.Members | ParagraphStyle.ParagraphStyle Constructor


SharpPlot 3.71 User Manual: ParagraphStyle Constructor (ParagraphStyle)

ParagraphStyle Constructor (ParagraphStyle)

Clone a paragraph Style.

public ParagraphStyle(
    ParagraphStyle parent
);
parent
Parent style to copy settings from.

See also ...

ParagraphStyle.Members | ParagraphStyle.ParagraphStyle Constructor


SharpPlot 3.71 User Manual: ParagraphStyle Constructor (String)

ParagraphStyle Constructor (String)

Create a paragraph style based on a list of properties.

public ParagraphStyle(
    string extras
);
extras
Extra settings as produced by the ToString method.

See also ...

ParagraphStyle.Members | ParagraphStyle.ParagraphStyle Constructor


SharpPlot 3.71 User Manual: ParagraphStyle Constructor (ParagraphStyle,String)

ParagraphStyle Constructor (ParagraphStyle,String)

Create a paragraph style for SharpLeaf.

public ParagraphStyle(
    ParagraphStyle parent,
    string extras
);
parent
Parent style to copy settings from.
extras
Extra settings as produced by the ToString method.

See also ...

ParagraphStyle.Members | ParagraphStyle.ParagraphStyle Constructor


SharpPlot 3.71 User Manual: Clone Method

ParagraphStyle.Clone Method

Take a deep copy of a ParagraphStyle, so that properties can be changed without changing the original style.

public ParagraphStyle Clone();

See also ...

ParagraphStyle.Members


SharpPlot 3.71 User Manual: Alignment Property

ParagraphStyle.Alignment Property

Text horizontal alignment within frame (default is Alignment.Left).

public Alignment Alignment {get; set;}

Example

style.Alignment = Alignment.Center;

Description

Ignored for lines of text that use tab stops. Alignment.Decimal cannot be used.

See also ...

ParagraphStyle.Members


SharpPlot 3.71 User Manual: BookmarkLevel Property

ParagraphStyle.BookmarkLevel Property

Level of automatic bookmarking at each new paragraph (defaults to 0 for disabled).

public int BookmarkLevel {get; set;}

Example

style.BookmarkLevel = 1; // Top-level bookmark

Description

Currently supported only by PDF. Use PdfMode.ShowOutlines to force the viewer to show them.

The bookmark title used is the first line of the paragraph, which makes it hard for retrieval with SharpLeaf.AddBookmarkReference. In references are required, SharpLeaf.SetBookmark should be used instead.

See also ...

SharpLeaf.SetBookmark Method | ParagraphStyle.Members | ParagraphStyle.BookmarkOpened Property


SharpPlot 3.71 User Manual: BookmarkOpened Property

ParagraphStyle.BookmarkOpened Property

Flag for automatic bookmarks to be opened in the viewer (defaults to false).

public bool BookmarkOpened {get; set;}

Example

style.BookmarkOpened = true;

Description

Currently supported only by PDF. Use PdfMode.ShowOutlines to force the viewer to show them.

See also ...

ParagraphStyle.Members | ParagraphStyle.BookmarkLevel Property


SharpPlot 3.71 User Manual: BulletFont Property

ParagraphStyle.BulletFont Property

Bullet Font (default to null for working paragraph font).

public FontType BulletFont {get; set;}

Example

style.BulletFont = new FontType("Arial",12);

See also ...

ParagraphStyle.Members | ParagraphStyle.SetBullet Method


SharpPlot 3.71 User Manual: BulletIndent Property

ParagraphStyle.BulletIndent Property

Extra indenting in points for bulletted paragraphs (defaults to 0).

To control the space between the bullet and the text, use ParagraphStyle.HorizontalGap.

public double BulletIndent {get; set;}

Example

style.BulletIndent = -36; // Half an inch "hanging" indent

See also ...

Paragraph Glossary | ParagraphStyle.Members | ParagraphStyle.SetBullet Method | ParagraphStyle.HorizontalGap Property


SharpPlot 3.71 User Manual: ClearLeft Property

ParagraphStyle.ClearLeft Property

This paragraph type will skip all inclusions on the left margin before starting (default is false).

public bool ClearLeft {get; set;}

Example

style.ClearLeft = true;

See also ...

Text Inclusions | SharpLeaf.NextClear Method | ParagraphStyle.Members


SharpPlot 3.71 User Manual: ClearRight Property

ParagraphStyle.ClearRight Property

This paragraph type will skip all inclusions on the right margin before starting (default is false).

public bool ClearRight {get; set;}

Example

style.ClearRight = true;

See also ...

Text Inclusions | SharpLeaf.NextClear Method | ParagraphStyle.Members


SharpPlot 3.71 User Manual: Font Property

ParagraphStyle.Font Property

Working font (name, size, style, color and interline).

public FontType Font {get; set;}

Example

style.Font = new FontType("Times", 12);

See also ...

ParagraphStyle.Members


SharpPlot 3.71 User Manual: FrameBreak Property

ParagraphStyle.FrameBreak Property

This paragraph type will always begin in a new frame (default is false).

public bool FrameBreak {get; set;}

Example

style.FrameBreak = true;

See also ...

SharpLeaf.NextFrame Method | ParagraphStyle.Members | ParagraphStyle.PageBreak Property | Frame.Skip Property


SharpPlot 3.71 User Manual: IndentFirst Property

ParagraphStyle.IndentFirst Property

First line indent in points (default is 0).

public double IndentFirst {get; set;}

Example

style.IndentFirst = 2*style.Font.Size; // Indent first line by twice the font size

Description

See IndentFirstAfterChange to disable first indent of first paragraph, as typographic etiquette suggests.

See also ...

Paragraph Glossary | ParagraphStyle.Members | ParagraphStyle.IndentFirstAfterChange Property


SharpPlot 3.71 User Manual: IndentFirstAfterChange Property

ParagraphStyle.IndentFirstAfterChange Property

Flag to control first indent after a change of style (true by default).

public bool IndentFirstAfterChange {get; set;}

Example

style.IndentFirstAfterChange = false;

Description

Disabling first indent after a style change is common typographical practice, but might be surprising to non-typographers.

See also ...

ParagraphStyle.Members | ParagraphStyle.IndentFirst Property


SharpPlot 3.71 User Manual: IndentLeft Property

ParagraphStyle.IndentLeft Property

Left indent in points from edge of frame (default is 0).

public double IndentLeft {get; set;}

Example

style.IndentLeft = 36; // Half an inch

See also ...

Paragraph Glossary | ParagraphStyle.Members | ParagraphStyle.IndentRight Property


SharpPlot 3.71 User Manual: IndentRight Property

ParagraphStyle.IndentRight Property

Right indent in points from edge of frame (default is 0).

public double IndentRight {get; set;}

Example

style.IndentRight = 36; // Half an inch

See also ...

ParagraphStyle.Members


SharpPlot 3.71 User Manual: Keep Property

ParagraphStyle.Keep Property

Number of lines to keep together at the start or end of a paragraph – also known as widows and orphans (default is 1 for disabled).

public int Keep {get; set;}

Example

style.Keep = 3;

Description

The default value is 1, the minimum value, which disables widow/orphan control. A Keep value higher than 1 may have significant resource consumption. So a paragraph can be split only if it has more than (2*Keep) lines, below that it is impossible to respect both conditions, and the whole paragraph will be started on the next frame, leaving a “hole” of up to (2*Keep)-1 lines.

Meaningful only when using Frame.Skip is on.

See also ...

Widow and Orphan Control | ParagraphStyle.Members


SharpPlot 3.71 User Manual: PageBreak Property

ParagraphStyle.PageBreak Property

This paragraph type will always begin on a new page (default is false).

public bool PageBreak {get; set;}

Example

style.PageBreak = true;

See also ...

SharpLeaf.NextPage Method | ParagraphStyle.Members | ParagraphStyle.FrameBreak Property


SharpPlot 3.71 User Manual: SpaceAfter Property

ParagraphStyle.SpaceAfter Property

Trailing paragraph space (positive is absolute size in points, negative is multiple of line pitch) (default is 0).

public double SpaceAfter {get; set;}

Example

style.SpaceAfter = -1; // Equivalent of one empty line after each paragraph

Description

Not observed between paragraphs of the same style if SpaceBetween is false.

See also ...

Paragraph Glossary | ParagraphStyle.Members | ParagraphStyle.SpaceBefore Property | ParagraphStyle.SpaceBetween Property


SharpPlot 3.71 User Manual: SpaceBefore Property

ParagraphStyle.SpaceBefore Property

Leading paragraph space (positive is absolute size in points, negative is multiple of line pitch) (default is 0).

public double SpaceBefore {get; set;}

Example

style.SpaceBefore = 36; // Half an inch before paragraph

Description

SpaceBefore is not observed for paragraphs that start at top of frame, and between paragraphs of the same style when SpaceBetween is false.

See also ...

Paragraph Glossary | ParagraphStyle.Members | ParagraphStyle.SpaceAfter Property | ParagraphStyle.SpaceBetween Property


SharpPlot 3.71 User Manual: SpaceBetween Property

ParagraphStyle.SpaceBetween Property

Flag to enable SpaceBefore and SpaceAfter between paragraphs using the same style (defaults to true).

public bool SpaceBetween {get; set;}

Example

style.SpaceBetween = false;

See also ...

Paragraph Glossary | ParagraphStyle.Members | ParagraphStyle.SpaceAfter Property | ParagraphStyle.SpaceBefore Property


SharpPlot 3.71 User Manual: SpaceFollowing Property

ParagraphStyle.SpaceFollowing Property

Available space to bottom of frame which must follow this paragraph (positive is absolute size in points, negative is multiple of line pitch) (defaults to 0).

public double SpaceFollowing {get; set;}

Example

style.SpaceFollowing = -5; // Ensure at least five lines of style.Font after end of paragraph

Description

Available space is counted from the bottom of paragraph, so after the current paragraph’s SpaceAfter, but before the next paragraph’s SpaceBefore. When there is not enough room, the paragraph is split Keep lines before its end.

Meaningful only when using Frame.Skip is on.

Note that SpaceStarting is less computation-intensive than SpaceFollowing.

See also ...

Widow and Orphan Control | Paragraph Glossary | ParagraphStyle.Members | ParagraphStyle.Keep Property | ParagraphStyle.SpaceStarting Property


SharpPlot 3.71 User Manual: SpaceStarting Property

ParagraphStyle.SpaceStarting Property

Available space to bottom of frame required to start this paragraph (positive is absolute size in points, negative is multiple of line pitch) (defaults to 0).

public double SpaceStarting {get; set;}

Example

style.SpaceStarting = 144; // At least two inches to bottom of frame before starting

Description

The paragraph will skip to next frame before start if there is not that much space available in current frame. The available space is counted after SpaceBefore, and is independent of SpaceAfter and SpaceFollowing.

Meaningful only when using Frame.Skip is on.

Note that SpaceStarting is less computation-intensive than SpaceFollowing.

See also ...

Widow and Orphan Control | Paragraph Glossary | ParagraphStyle.Members


SharpPlot 3.71 User Manual: Wrap Property

ParagraphStyle.Wrap Property

Wrap text between margin (defaults to true).

public bool Wrap {get; set;}

Example

style.Wrap = false; // Only explicit newlines will move the flow down

See also ...

Advanced Text Control | SharpLeaf.SoftHyphen Property | Table.SetCellWrap Method | ParagraphStyle.Members


SharpPlot 3.71 User Manual: AddTab Method

ParagraphStyle.AddTab Method

Define a new tab with position and optional alignment – clearing default tabs if unset so far. Alignment will default to Left.

Overloads

  • public void AddTab(double tab);
  • public void AddTab(double tab,Alignment align);

Example

   style.AddTab(5 * 72);  // Add a new tab 5 inches from left edge of frame

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabs Method


SharpPlot 3.71 User Manual: AddTab Method (Double)

ParagraphStyle.AddTab Method (Double)

Add a left-aligned tab.

public void AddTab(
    double tab
);
tab
Tab position in points from edge of frame.

See also ...

ParagraphStyle.Members | ParagraphStyle.AddTab Method


SharpPlot 3.71 User Manual: AddTab Method (Double,Alignment)

ParagraphStyle.AddTab Method (Double,Alignment)

Define a new tab with position and optional alignment – clearing default tabs if unset so far.

public void AddTab(
    double tab,
    Alignment align
);
tab
Tab position in points from edge of frame.
align
Tab alignment.

See also ...

ParagraphStyle.Members | ParagraphStyle.AddTab Method


SharpPlot 3.71 User Manual: ResetTabs Method

ParagraphStyle.ResetTabs Method

Set tab-bar back to system default of twelve 72pt tabs.

public void ResetTabs();

See also ...

ParagraphStyle.Members | ParagraphStyle.AddTab Method | ParagraphStyle.SetTabs Method


SharpPlot 3.71 User Manual: Set Method

ParagraphStyle.Set Method

Update current style with a set of properties and values as a string, as produced by the ToString method.

public void Set(
    string proplist
);
proplist
New settings in text format.

Example

   style.Set("Alignment=Center");  // change alignment to center

See also ...

ParagraphStyle.Members | ParagraphStyle.ToString Method


SharpPlot 3.71 User Manual: SetBullet Method

ParagraphStyle.SetBullet Method

Set string to use for bulletted lists (defaults to empty string to disable bullets).

The horizontal spacing around the bullet is controlled by ParagraphStyle.HorizontalGap.

Overloads

  • public void SetBullet();
  • public void SetBullet(char value);
  • public void SetBullet(string value);

Example

   style.SetBullet("{1}.");  // Numbered bullet with a dot

Description

You can insert special strings to display the bullet counter (see SharpLeaf.BulletCount)

{1}
Decimal number
{A}
Upper-case alphabet
{a}
Lower-case alphabet
{I}
Upper-case roman numerals
{i}
Lower-case roman numerals

If these keywords need to be used as text, the closing braces can be escaped with a backslash, so that “\}” renders as “}”.

See also ...

SharpLeaf.BulletCount Property | ParagraphStyle.Members | ParagraphStyle.HorizontalGap Property


SharpPlot 3.71 User Manual: SetBullet Method

ParagraphStyle.SetBullet Method

Disable bullets.

public void SetBullet();

See also ...

ParagraphStyle.Members | ParagraphStyle.SetBullet Method


SharpPlot 3.71 User Manual: SetBullet Method (Char)

ParagraphStyle.SetBullet Method (Char)

Set character to use for bulleted list.

public void SetBullet(
    char value
);

See also ...

ParagraphStyle.Members | ParagraphStyle.SetBullet Method


SharpPlot 3.71 User Manual: SetBullet Method (String)

ParagraphStyle.SetBullet Method (String)

Set string to use for bulletted lists (defaults to empty string to disable bullets).

public void SetBullet(
    string value
);

See also ...

ParagraphStyle.Members | ParagraphStyle.SetBullet Method


SharpPlot 3.71 User Manual: SetTabAlignments Method

ParagraphStyle.SetTabAlignments Method

Set Alignment for each existing tab stop (defaults to Alignment.Left).

Overloads

  • public void SetTabAlignments();
  • public void SetTabAlignments(Alignment tabs);
  • public void SetTabAlignments(Alignment[] tabs);

Example

  // Only the fourth tab is right-aligned
   style.SetTabAlignments(new Alignment[]{Alignment.Left,Alignment.Left,Alignment.Left,
            Alignment.Right});

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabs Method


SharpPlot 3.71 User Manual: SetTabAlignments Method

ParagraphStyle.SetTabAlignments Method

Reset tab alignments to Alignment.Left.

public void SetTabAlignments();

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabAlignments Method


SharpPlot 3.71 User Manual: SetTabAlignments Method (Alignment)

ParagraphStyle.SetTabAlignments Method (Alignment)

Set tab stops Alignment.

public void SetTabAlignments(
    Alignment tabs
);

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabAlignments Method


SharpPlot 3.71 User Manual: SetTabAlignments Method (Alignment[])

ParagraphStyle.SetTabAlignments Method (Alignment[])

Set Alignment for each existing tab stop (defaults to Alignment.Left).

public void SetTabAlignments(
    Alignment[] tabs
);

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabAlignments Method


SharpPlot 3.71 User Manual: SetTabs Method

ParagraphStyle.SetTabs Method

Set the full list of tab stops positions in points from left edge of frame.

Tabs can be skipped by

  • Inserting tab characters into SharpLeaf.AddText
  • Using RTF tabs or tab characters in SharpLeaf.AddRichText.
  • Calling SharpLeaf.NextTab

Overloads

  • public void SetTabs();
  • public void SetTabs(int[] tabs);
  • public void SetTabs(double[] tabs);

Example

  // Set eight tabs, one-inch apart from each other
   style.SetTabs(new int[] {72,144,216,288,360,432,504,576});

Description

Use empty argument to reset to default, which is twelve tab stops 72 points apart. Alignment will default to Left for new tabs (if any).

See also ...

SharpLeaf.NextTab Method | ParagraphStyle.Members | ParagraphStyle.AddTab Method | ParagraphStyle.ResetTabs Method | ParagraphStyle.SetTabAlignments Method


SharpPlot 3.71 User Manual: SetTabs Method

ParagraphStyle.SetTabs Method

Reset tabs to default.

public void SetTabs();

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabs Method


SharpPlot 3.71 User Manual: SetTabs Method (Int32[])

ParagraphStyle.SetTabs Method (Int32[])

Set tab stops positions.

public void SetTabs(
    int[] tabs
);

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabs Method


SharpPlot 3.71 User Manual: SetTabs Method (Double[])

ParagraphStyle.SetTabs Method (Double[])

Set the full list of tab stops positions in points from left edge of frame.

public void SetTabs(
    double[] tabs
);

See also ...

ParagraphStyle.Members | ParagraphStyle.SetTabs Method


SharpPlot 3.71 User Manual: ToString Method

ParagraphStyle.ToString Method

Parsable summary of style settings.

public override string ToString();

Description

Can be parsed by ParagraphStyle constructor, Set, SharpLeaf.AddParagraphs, SharpLeaf.PushStyle.

Here’s the list of fields and their value types

Fields | Type | Examples
FontSize FontInterline IndentLeft IndentRight IndentFirst SpaceBefore SpaceAfter SpaceStarting SpaceFollowing Keep BookmarkLevel | Single number | FontSize=12 SpaceAfter=-1.5
FontName Bullet BulletFont | String (quoted to protect spaces, HTML entities to protect quotes) | FontName=”Times New Roman” Bullet=”&amp;”
FontStyle BulletStyle | FontStyle (comma-separated list) | FontStyle=Bold,Underline
FontColor BulletColor | Color (named or #numbered) | FontColor=Navy BulletColor=#FF0000
Alignment | Alignment | Alignment=Right
Wrap IndentFirstAfterChange PageBreak FrameBreak SpaceBetween BookmarkOpened | Boolean | Wrap=false FrameBreak=true
Tabs | Comma-separated list of numbers | Tabs=72,144,216,288
TabAlignments | Comma-separated list of Alignment | TabAlignments=Left,Center,Decimal,Right

See also ...

ParagraphStyle.Members


SharpPlot 3.71 User Manual: HorizontalGap Property

ParagraphStyle.HorizontalGap Property

Horizontal space around text for inclusions, bullets and boxes (positive is absolute size in points, negative is multiple of line pitch).

Default (special value -32768) is to use the greater of the current font size and interline.

public double HorizontalGap {get; set;}

Example

style.HorizontalGap = ¯0.5; // half a line pitch around text

See also ...

Text Inclusions | SharpLeaf.SetBox Method | ParagraphStyle.Members | ParagraphStyle.SetBullet Method


SharpPlot 3.71 User Manual: BoxStyle Structure

BoxStyle Structure

Boxing decoration attributes (edge, fill, etc.).

public class BoxStyle

Constructors

  • public BoxStyle();
  • public BoxStyle(double edgeWidth);
  • public BoxStyle(int[] edgeWidths);
  • public BoxStyle(double[] edgeWidths);
  • public BoxStyle(double edgeWidth, Color edgeColor);
  • public BoxStyle(int[] edgeWidths, Color edgeColor);
  • public BoxStyle(double[] edgeWidths, Color edgeColor);
  • public BoxStyle(double edgeWidth, Color edgeColor, LineStyle edgeStyle, double radius);
  • public BoxStyle(int[] edgeWidths, Color edgeColor, LineStyle edgeStyle);
  • public BoxStyle(double[] edgeWidths, Color edgeColor, LineStyle edgeStyle);
  • public BoxStyle(double edgeWidth, Color edgeColor, LineStyle edgeStyle, double radius, Color fillColor, FillStyle fillStyle, bool shadow);
  • public BoxStyle(int[] edgeWidths, Color edgeColor, LineStyle edgeStyle, double radius, Color fillColor, FillStyle fillStyle, bool shadow);
  • public BoxStyle(double[] edgeWidths,Color edgeColor,LineStyle edgeStyle,double radius,Color fillColor,FillStyle fillStyle,bool shadow);

BoxStyle Instance Properties

EdgeColor | Color of edges
EdgeStyle | Line style of edges
EdgeWidths | Line-weight in points for the four edges : left, top, right, bottom (a single value will be repeated)
FillColor | Color used to shade the box
FillStyle | Shading used to apply color to box area
Radius | Corner rounding in points – default is 0 for a square box
Shadow | Draw a shadow below box

BoxStyle Methods

Clone | Take a deep copy of a box decoration definition
ToString | Readable summary of Rule detail

See also

SharpLeaf.SetBox | Table.Box | Table.SetCellBox | Frame.Box | Box.Style

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

BoxStyle.Members

Constructors

  • public BoxStyle();
  • public BoxStyle(double edgeWidth);
  • public BoxStyle(int[] edgeWidths);
  • public BoxStyle(double[] edgeWidths);
  • public BoxStyle(double edgeWidth, Color edgeColor);
  • public BoxStyle(int[] edgeWidths, Color edgeColor);
  • public BoxStyle(double[] edgeWidths, Color edgeColor);
  • public BoxStyle(double edgeWidth, Color edgeColor, LineStyle edgeStyle, double radius);
  • public BoxStyle(int[] edgeWidths, Color edgeColor, LineStyle edgeStyle);
  • public BoxStyle(double[] edgeWidths, Color edgeColor, LineStyle edgeStyle);
  • public BoxStyle(double edgeWidth, Color edgeColor, LineStyle edgeStyle, double radius, Color fillColor, FillStyle fillStyle, bool shadow);
  • public BoxStyle(int[] edgeWidths, Color edgeColor, LineStyle edgeStyle, double radius, Color fillColor, FillStyle fillStyle, bool shadow);
  • public BoxStyle(double[] edgeWidths,Color edgeColor,LineStyle edgeStyle,double radius,Color fillColor,FillStyle fillStyle,bool shadow);

BoxStyle Instance Properties

EdgeColor | Color of edges
EdgeStyle | Line style of edges
EdgeWidths | Line-weight in points for the four edges : left, top, right, bottom (a single value will be repeated)
FillColor | Color used to shade the box
FillStyle | Shading used to apply color to box area
Radius | Corner rounding in points – default is 0 for a square box
Shadow | Draw a shadow below box

BoxStyle Methods

Clone | Take a deep copy of a box decoration definition
ToString | Readable summary of Rule detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: BoxStyle Constructor

BoxStyle Constructor

Define boxing decorations.

Overloads

  • public BoxStyle();
  • public BoxStyle(double edgeWidth);
  • public BoxStyle(int[] edgeWidths);
  • public BoxStyle(double[] edgeWidths);
  • public BoxStyle(double edgeWidth, Color edgeColor);
  • public BoxStyle(int[] edgeWidths, Color edgeColor);
  • public BoxStyle(double[] edgeWidths, Color edgeColor);
  • public BoxStyle(double edgeWidth, Color edgeColor, LineStyle edgeStyle, double radius);
  • public BoxStyle(int[] edgeWidths, Color edgeColor, LineStyle edgeStyle);
  • public BoxStyle(double[] edgeWidths, Color edgeColor, LineStyle edgeStyle);
  • public BoxStyle(double edgeWidth, Color edgeColor, LineStyle edgeStyle, double radius, Color fillColor, FillStyle fillStyle, bool shadow);
  • public BoxStyle(int[] edgeWidths, Color edgeColor, LineStyle edgeStyle, double radius, Color fillColor, FillStyle fillStyle, bool shadow);
  • public BoxStyle(double[] edgeWidths,Color edgeColor,LineStyle edgeStyle,double radius,Color fillColor,FillStyle fillStyle,bool shadow);

Example

  // 1-pt thick rounded black box, shadowed and filled with light red
   boxstyle = new BoxStyle(1,Color.Black,LineStyle.Solid,10,Color.Red,FillStyle.Saturate20,true);

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: BoxStyle Constructor

BoxStyle Constructor

Unfilled 1pt solid black square.

public BoxStyle();

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double)

BoxStyle Constructor (Double)

Unfilled solid black square.

public BoxStyle(
    double edgeWidth
);
edgeWidth
Edge line weight in points (default is 1).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Int32[])

BoxStyle Constructor (Int32[])

Unfilled solid black edges.

public BoxStyle(
    int[] edgeWidths
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double[])

BoxStyle Constructor (Double[])

Unfilled solid black edges.

public BoxStyle(
    double[] edgeWidths
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double,Color)

BoxStyle Constructor (Double,Color)

Unfilled solid colored square.

public BoxStyle(
    double edgeWidth,
    Color edgeColor
);
edgeWidth
Edge line weight in points (default is 1).
edgeColor
Edge color (default is Black).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Int32[],Color)

BoxStyle Constructor (Int32[],Color)

Unfilled solid colored edges.

public BoxStyle(
    int[] edgeWidths,
    Color edgeColor
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).
edgeColor
Edge color (default is Black).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double[],Color)

BoxStyle Constructor (Double[],Color)

Unfilled solid colored edges.

public BoxStyle(
    double[] edgeWidths,
    Color edgeColor
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).
edgeColor
Edge color (default is Black).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double,Color,LineStyle,Double)

BoxStyle Constructor (Double,Color,LineStyle,Double)

Unfilled decorated box.

public BoxStyle(
    double edgeWidth,
    Color edgeColor,
    LineStyle edgeStyle,
    double radius
);
edgeWidth
Edge line weight in points (default is 1).
edgeColor
Edge color (default is Black).
edgeStyle
Edge LineStyle (default is Solid).
radius
Radius of rounded corners (default is 0 for square) – unsupported if edgeWidths have different values.

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Int32[],Color,LineStyle)

BoxStyle Constructor (Int32[],Color,LineStyle)

Unfilled edges.

public BoxStyle(
    int[] edgeWidths,
    Color edgeColor,
    LineStyle edgeStyle
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).
edgeColor
Edge color (default is Black).
edgeStyle
Edge LineStyle (default is Solid).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double[],Color,LineStyle)

BoxStyle Constructor (Double[],Color,LineStyle)

Unfilled edges.

public BoxStyle(
    double[] edgeWidths,
    Color edgeColor,
    LineStyle edgeStyle
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).
edgeColor
Edge color (default is Black).
edgeStyle
Edge LineStyle (default is Solid).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double,Color,LineStyle,Double,Color,FillStyle,Boolean)

BoxStyle Constructor (Double,Color,LineStyle,Double,Color,FillStyle,Boolean)

Fully decorated box.

public BoxStyle(
    double edgeWidth,
    Color edgeColor,
    LineStyle edgeStyle,
    double radius,
    Color fillColor,
    FillStyle fillStyle,
    bool shadow
);
edgeWidth
Edge line weight in points (default is 1).
edgeColor
Edge color (default is Black).
edgeStyle
Edge LineStyle (default is Solid).
radius
Radius of rounded corners (default is 0 for square) – unsupported if edgeWidths have different values.
fillColor
Background color (default is Transparent).
fillStyle
Background FillStyle (default is Unfilled).
shadow
Flag to enable shadow decoration (default is false).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Int32[],Color,LineStyle,Double,Color,FillStyle,Boolean)

BoxStyle Constructor (Int32[],Color,LineStyle,Double,Color,FillStyle,Boolean)

Fully decorated edges – rounding not supported if edges are not all of the same nib.

public BoxStyle(
    int[] edgeWidths,
    Color edgeColor,
    LineStyle edgeStyle,
    double radius,
    Color fillColor,
    FillStyle fillStyle,
    bool shadow
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).
edgeColor
Edge color (default is Black).
edgeStyle
Edge LineStyle (default is Solid).
radius
Radius of rounded corners (default is 0 for square) – unsupported if edgeWidths have different values.
fillColor
Background color (default is Transparent).
fillStyle
Background FillStyle (default is Unfilled).
shadow
Flag to enable shadow decoration (default is f.

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: BoxStyle Constructor (Double[],Color,LineStyle,Double,Color,FillStyle,Boolean)

BoxStyle Constructor (Double[],Color,LineStyle,Double,Color,FillStyle,Boolean)

Define boxing decorations.

public BoxStyle(
    double[] edgeWidths,
    Color edgeColor,
    LineStyle edgeStyle,
    double radius,
    Color fillColor,
    FillStyle fillStyle,
    bool shadow
);
edgeWidths
Edge line weights in points for all four sides {left,top,right,bottom} (a single value will be repeated) (default is 1).
edgeColor
Edge color (default is Black).
edgeStyle
Edge LineStyle (default is Solid).
radius
Radius of rounded corners (default is 0 for square) – unsupported if edgeWidths have different values.
fillColor
Background color (default is Transparent).
fillStyle
Background FillStyle (default is Unfilled).

See also ...

BoxStyle.Members | BoxStyle.BoxStyle Constructor


SharpPlot 3.71 User Manual: Clone Method

BoxStyle.Clone Method

Take a deep copy of a box decoration definition.

public BoxStyle Clone();

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: EdgeColor Property

BoxStyle.EdgeColor Property

Color of edges.

public Color EdgeColor {get; set;}

Example

box.EdgeColor = Color.Firebrick;

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: EdgeStyle Property

BoxStyle.EdgeStyle Property

Line style of edges.

public LineStyle EdgeStyle {get; set;}

Example

box.EdgeStyle = LineStyle.Dash;

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: EdgeWidths Property

BoxStyle.EdgeWidths Property

Line-weight in points for the four edges : left, top, right, bottom (a single value will be repeated).

public double[] EdgeWidths {get; set;}

Example

box.EdgeWidths = new double[] {2,0,0,0}; // Left edge only (2-point thick)

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: FillColor Property

BoxStyle.FillColor Property

Color used to shade the box.

public Color FillColor {get; set;}

Example

box.FillColor = Color.PaleGreen;

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: FillStyle Property

BoxStyle.FillStyle Property

Shading used to apply color to the box.

public FillStyle FillStyle {get; set;}

Example

box.FillStyle = FillStyle.Saturate20;

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: Radius Property

BoxStyle.Radius Property

Corner rounding radius in points – default is 0 for a square box.

public double Radius {get; set;}

Example

box.Radius = 10;

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: Shadow Property

BoxStyle.Shadow Property

Draw a shadow below box.

public bool Shadow {get; set;}

Example

box.Shadow = true;

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: ToString Method

BoxStyle.ToString Method

Readable summary of Rule detail.

public override string ToString();

See also ...

BoxStyle.Members


SharpPlot 3.71 User Manual: SharpLeaf Enumerations

SharpLeaf Enumerations

Alignment Enumeration
Horizontal placement of text in current cell.
VerticalAlignment Enumeration
Vertical placement of text.
BoxFlow Enumeration
Method to flow an object into a SharpLeaf report.


SharpPlot 3.71 User Manual: Alignment Enumeration

Alignment Enumeration

Horizontal placement of text in current cell.

public enum Alignment

Members

Center | Text is centered in the frame or cell
Decimal | Text aligns on the decimal point, as far right as possible
Left | Text aligns left
Right | Text aligns right

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Table.SetCellAlignment Method | ParagraphStyle.Alignment Property | ParagraphStyle.SetTabAlignments Method | TextBlock.Alignment Property


SharpPlot 3.71 User Manual: VerticalAlignment Enumeration

VerticalAlignment Enumeration

Vertical placement of text.

public enum VerticalAlignment

Members

Baseline | First text baseline is aligned to the top
Bottom | Text is aligned to the bottom
Middle | Text is midlined around center
Top | Text is aligned to the top

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Table.SetCellVerticalAlignment Method | TextBlock.VerticalAlignment Property


SharpPlot 3.71 User Manual: BoxFlow Enumeration

BoxFlow Enumeration

Method to flow an object into a SharpLeaf report.

public enum BoxFlow

Members

Center | Center box between margins, and do not flow text around it
Left | Draw box on the left margin, and flow text to the right if there is room
Paragraph | Flow box as a paragraph, and do not flow text around it
Right | Draw box on the right margin, and flow text to the left if there is room

Remarks

BoxFlow.Paragraph applies all ParagraphStyle settings that are meaningful to inclusions, excepted SharpLeaf.IncludeSpace which treats it as BoxFlow.Center :

  • Alignment
  • IndentLeft
  • IndentRight
  • SpaceBefore
  • SpaceAfter
  • SpaceStarting
  • SpaceFollowing
  • PageBreak
  • FrameBreak

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Text Inclusions | SharpLeaf.IncludeChart Method | SharpLeaf.IncludeImage Method | SharpLeaf.IncludeSpace Method | SharpLeaf.IncludeTable Method


SharpPlot 3.71 User Manual: DocumentLayout Classes

DocumentLayout Classes

This sections covers classes that allow the creation of master pages for SharpLeaf reports.

Example

   page = new PageLayout(PaperSize.A4);
  // Invisible frame with one-inch margin all around
   page.Add(new Frame("MyFrameId",72,72,-72,-72));
   layout = new DocumentLayout(page);
   lf = new SharpLeaf(layout);
DocumentLayout Class
Define report master pages as an list of PageLayouts.
PageLayout Class
Defines the structure of a single DocumentLayout page as a list of PageElements.
PageElement Abstract Class
The abstract class for elements that can belong to a PageLayout.
Frame : PageElement Class
Defines a region on the page into which text can flow. The frame can be invisible, or have a BoxStyle and a gutter. It also controls whether content should be clipped or not, and whether flow should automatically skip to next Frame.
TextBlock : PageElement Class
Arbitrary text to add to a page layout, with optional parameters substitution. Text can optionally be wrapped, and angled if the two points are different, in which case it is drawn along the given line.
ImageBlock : PageElement Class
Picture to add to a page layout. Image can optionally be scaled or stretched to fit a bounding box.
Box : PageElement Class
Rectangle to add to a page layout, possibly filled and shadowed.
Rule : PageElement Class
Simpe line to add to a page layout.

See also

PageLayout Glossary | DocumentLayout Tutorials


SharpPlot 3.71 User Manual: DocumentLayout Class

DocumentLayout Class

Define report master pages as an list of PageLayouts.

The DocumentLayout class can be passed to the SharpLeaf constructor, or to the SharpLeaf.SetLayout method for in-flight change of layout.

The Repeat property will define how many of the last page layouts will be repeated, therefore how many of the first page layouts will be title pages.

See some tutorials on the creation of document layouts.

public class DocumentLayout

Constructors

  • public DocumentLayout();
  • public DocumentLayout(string xml);
  • public DocumentLayout(PageLayout page);
  • public DocumentLayout(PageLayout[] pages);

DocumentLayout Instance Properties

Item[Int32] | Default indexer into the DocumentLayout’s list of PageLayout items
Count | Number of PageLayout items in the DocumentLayout (ReadOnly)
Pages | List of PageLayout that form the DocumentLayout
Repeat | Number of last page layouts to repeat (default to 0 for all)
Title | Document title

DocumentLayout Methods

Add | Append page layouts to document layout
Clone | Take a deep copy of this instance
Contains | Check if the given PageLayout is present in the DocumentLayout
RenderXml | Get XML form of a DocumentLayout item, that can be used in the constructor.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

DocumentLayout.Members

Constructors

  • public DocumentLayout();
  • public DocumentLayout(string xml);
  • public DocumentLayout(PageLayout page);
  • public DocumentLayout(PageLayout[] pages);

DocumentLayout Instance Properties

Item[Int32] | Default indexer into the DocumentLayout’s list of PageLayout items
Count | Number of PageLayout items in the DocumentLayout (ReadOnly)
Pages | List of PageLayout that form the DocumentLayout
Repeat | Number of last page layouts to repeat (default to 0 for all)
Title | Document title

DocumentLayout Methods

Add | Append page layouts to document layout
Clone | Take a deep copy of this instance
Contains | Check if the given PageLayout is present in the DocumentLayout
RenderXml | Get XML form of a DocumentLayout item, that can be used in the constructor.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: DocumentLayout Constructor

DocumentLayout Constructor

Create a new document layout to use as master pages for SharpLeaf.

Overloads

  • public DocumentLayout();
  • public DocumentLayout(string xml);
  • public DocumentLayout(PageLayout page);
  • public DocumentLayout(PageLayout[] pages);

Example

   page = new PageLayout(PaperSize.A4);
  // Invisible frame with one-inch margin all around
   page.Add(new Frame("MyFrameId",72,72,-72,-72));
   layout = new DocumentLayout(page);
   lf = new SharpLeaf(layout);

See also ...

DocumentLayout.Members


SharpPlot 3.71 User Manual: DocumentLayout Constructor

DocumentLayout Constructor

Create a default document layout (US Letter with 1-inch margin).

public DocumentLayout();

See also ...

DocumentLayout.Members | DocumentLayout.DocumentLayout Constructor


SharpPlot 3.71 User Manual: DocumentLayout Constructor (String)

DocumentLayout Constructor (String)

Create a document layout passed as XML specification (see RenderXml).

public DocumentLayout(
    string xml
);
xml
XML representation of document layout as produced by RenderXml.

See also ...

DocumentLayout.Members | DocumentLayout.DocumentLayout Constructor


SharpPlot 3.71 User Manual: DocumentLayout Constructor (PageLayout)

DocumentLayout Constructor (PageLayout)

Create a document layout from a page layout.

public DocumentLayout(
    PageLayout page
);

See also ...

DocumentLayout.Members | DocumentLayout.DocumentLayout Constructor


SharpPlot 3.71 User Manual: DocumentLayout Constructor (PageLayout[])

DocumentLayout Constructor (PageLayout[])

Create a document layout from a list of page layouts.

public DocumentLayout(
    PageLayout[] pages
);
pages
Single page layout definition to use.

See also ...

DocumentLayout.Members | DocumentLayout.DocumentLayout Constructor


SharpPlot 3.71 User Manual: Clone Method

DocumentLayout.Clone Method

Take a deep copy of this instance. Recursively clones contained PageLayouts.

public DocumentLayout Clone();

See also ...

DocumentLayout.Members


SharpPlot 3.71 User Manual: Item[Int32] Property

DocumentLayout.Item[Int32] Property

Default indexer into the DocumentLayout‘s list of PageLayout items.

public  Item[Int32] {get; set;}

Example

layout.Item[0] = mytitlepage;

See also ...

DocumentLayout.Members


SharpPlot 3.71 User Manual: Count Property (ReadOnly)

DocumentLayout.Count Property (ReadOnly)

Number of PageLayout items in the DocumentLayout (ReadOnly).

public int Count {get;}

Example

int pages = layout.Count;

See also ...

DocumentLayout.Members


SharpPlot 3.71 User Manual: Repeat Property

DocumentLayout.Repeat Property

Number of last page layouts to repeat (default to 0 for all).

If zero or greater than the number of page layouts, all page layouts will be cycled through. A typical value is 2 so that the last two pages are taken as alternating left/right, while the previous pages (if any) would be used only once as title pages.

public int Repeat {get; set;}

Example

layout.Repeat = 2; // Alternate last two page layouts

See also ...

Advanced DocumentLayouts | DocumentLayout.Members


SharpPlot 3.71 User Manual: Title Property

DocumentLayout.Title Property

Document title.

Will set the report title only when passing the DocumentLayout to the SharpLeaf constructor. SharpLeaf.SetLayout will ignore it.

public string Title {get; set;}

Example

layout.Title = "My Report Title";

See also ...

SharpLeaf.Title Property | DocumentLayout.Members


SharpPlot 3.71 User Manual: Add Method

DocumentLayout.Add Method

Append page layouts to current document layout.

Overloads

  • public void Add(PageLayout page);
  • public void Add(PageLayout[] pages);

Example

   layout.Add(new PageLayout(PaperSize.A4));

See also ...

Document Layout Tutorials | DocumentLayout.Members


SharpPlot 3.71 User Manual: Add Method (PageLayout)

DocumentLayout.Add Method (PageLayout)

Append a page layout to document layout.

public void Add(
    PageLayout page
);

Example

   layout.Add(new PageLayout(PaperSize.A4));

See also ...

DocumentLayout.Members | DocumentLayout.Add Method


SharpPlot 3.71 User Manual: Add Method (PageLayout[])

DocumentLayout.Add Method (PageLayout[])

Append page layouts to document layout.

public void Add(
    PageLayout[] pages
);
pages
Page to append.

Example

   layout.Add(new PageLayout(PaperSize.A4));

See also ...

DocumentLayout.Members | DocumentLayout.Add Method


SharpPlot 3.71 User Manual: Contains Method

DocumentLayout.Contains Method

Check if the given page layout is present.

public bool Contains(
    PageLayout item
);

Example

   if ((layout.Contains(page))) {
     page.Color = Color.Beige;
   }

See also ...

DocumentLayout.Members


SharpPlot 3.71 User Manual: RenderXml Method

DocumentLayout.RenderXml Method

Get XML form of a DocumentLayout item, that can be used in the constructor.

public string RenderXml();

See also ...

DocumentLayout.Members


SharpPlot 3.71 User Manual: PageLayout Class

PageLayout Class

Defines the structure of a single DocumentLayout page as a list of PageElements.

Elements will be drawn in the order in which they were appended to the page layout. Frames will be used in that order too unless specified with FrameList.

See some tutorials and a visual glossary on the creation of page layouts.

public class PageLayout

Constructors

  • public PageLayout();
  • public PageLayout(double width, double height);
  • public PageLayout(double[] size);
  • public PageLayout(double width, double height, Color color);
  • public PageLayout(double[] size, Color color);
  • public PageLayout(double[] size, Color color, FillStyle fill);
  • public PageLayout(double width,double height,Color color,FillStyle fill);

PageLayout Instance Properties

Item[Int32] | Default indexer into the PageLayout’s list of PageElement items
Color | Color of paper
Count | Number of PageElement items in the PageLayout (ReadOnly)
Elements | List of PageElement that constitute the PageLayout
FillStyle | FillStyle of paper
FrameList | List of Frames to flow through (defaults to empty vector for all frames in order of creation)
Size | Size of paper in points as a vector of two doubles

PageLayout Methods

Add | Append page elements (Frame, Rule etc) to a page layout
Clone | Take a deep copy of this instance
Contains | Check if the given PageElement is present in the PageLayout
ToString | Readable summary of page layout

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

PageLayout.Members

Defines the structure of a single master page.

public class PageLayout

Constructors

  • public PageLayout();
  • public PageLayout(double width, double height);
  • public PageLayout(double[] size);
  • public PageLayout(double width, double height, Color color);
  • public PageLayout(double[] size, Color color);
  • public PageLayout(double[] size, Color color, FillStyle fill);
  • public PageLayout(double width,double height,Color color,FillStyle fill);

PageLayout Instance Properties

Item[Int32] | Default indexer into the PageLayout’s list of PageElement items
Color | Color of paper
Count | Number of PageElement items in the PageLayout (ReadOnly)
Elements | List of PageElement that constitute the PageLayout
FillStyle | FillStyle of paper
FrameList | List of Frames to flow through (defaults to empty vector for all frames in order of creation)
Size | Size of paper in points as a vector of two doubles

PageLayout Methods

Add | Append page elements (Frame, Rule etc) to a page layout
Clone | Take a deep copy of this instance
Contains | Check if the given PageElement is present in the PageLayout
ToString | Readable summary of page layout

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: PageLayout Constructor

PageLayout Constructor

Create an new PageLayout for inclusion in a DocumentLayout.

Overloads

  • public PageLayout();
  • public PageLayout(double width, double height);
  • public PageLayout(double[] size);
  • public PageLayout(double width, double height, Color color);
  • public PageLayout(double[] size, Color color);
  • public PageLayout(double[] size, Color color, FillStyle fill);
  • public PageLayout(double width,double height,Color color,FillStyle fill);

Example

   page = new PageLayout(PaperSize.A4);
  // Invisible frame with one-inch margin all around
   page.Add(new Frame("MyFrameId",72,72,-72,-72));
   layout = new DocumentLayout(page);
   lf = new SharpLeaf(layout);

Description

See PaperSize structure for pre-defined, standard sizes.

See also ...

PageLayout.Members


SharpPlot 3.71 User Manual: PageLayout Constructor

PageLayout Constructor

Uncolored portrait US letter paper.

public PageLayout();

See also ...

PageLayout.Members | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: PageLayout Constructor (Double,Double)

PageLayout Constructor (Double,Double)

Uncolored paper at given size.

public PageLayout(
    double width,
    double height
);
width
Paper width in points – defaults to Portrait US Letter.
height
Paper height in points – defaults to Portrait US Letter.

See also ...

PageLayout.Members | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: PageLayout Constructor (Double[])

PageLayout Constructor (Double[])

Uncolored paper at given size.

public PageLayout(
    double[] size
);
size
Paper size in points as double[] {width,height} – defaults to Portrait US Letter.

See also ...

PageLayout.Members | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: PageLayout Constructor (Double,Double,Color)

PageLayout Constructor (Double,Double,Color)

Solid-colored paper at given size.

public PageLayout(
    double width,
    double height,
    Color color
);
width
Paper width in points – defaults to Portrait US Letter.
height
Paper height in points – defaults to Portrait US Letter.
color
Paper color – defaults to Transparent.

See also ...

PageLayout.Members | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: PageLayout Constructor (Double[],Color)

PageLayout Constructor (Double[],Color)

Solid-colored paper at given size.

public PageLayout(
    double[] size,
    Color color
);
size
Paper size in points as double[] {width,height} – defaults to Portrait US Letter.
color
Paper color – defaults to Transparent.

See also ...

PageLayout.Members | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: PageLayout Constructor (Double[],Color,FillStyle)

PageLayout Constructor (Double[],Color,FillStyle)

Use given size and paper color and fill.

public PageLayout(
    double[] size,
    Color color,
    FillStyle fill
);
size
Paper size in points as double[] {width,height} – defaults to Portrait US Letter.
color
Paper color – defaults to Transparent.
fill
Paper fill – defaults to Unfilled.

See also ...

PageLayout.Members | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: PageLayout Constructor (Double,Double,Color,FillStyle)

PageLayout Constructor (Double,Double,Color,FillStyle)

Create an new PageLayout for inclusion in a DocumentLayout.

public PageLayout(
    double width,
    double height,
    Color color,
    FillStyle fill
);
width
Paper width in points – defaults to Portrait US Letter.
height
Paper height in points – defaults to Portrait US Letter.
color
Paper color – defaults to Transparent.
fill
Paper fill – defaults to Unfilled.

See also ...

PageLayout.Members | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: Clone Method

PageLayout.Clone Method

Take a deep copy of this instance. Recursively clones contained PageElements.

public PageLayout Clone();

See also ...

PageLayout.Members


SharpPlot 3.71 User Manual: Item[Int32] Property

PageLayout.Item[Int32] Property

Default indexer into the PageLayout‘s list of PageElement items.

public Item[Int32] {get; set;}

Example

page.Item[0] = myframe;

See also ...

PageLayout.Members


SharpPlot 3.71 User Manual: Color Property

PageLayout.Color Property

Color of paper.

public Color Color {get; set;}

Example

page.Color = Color.Beige;

See also ...

PageLayout.Members | PageLayout.FillStyle Property


SharpPlot 3.71 User Manual: FillStyle Property

PageLayout.FillStyle Property

FillStyle of paper.

public FillStyle FillStyle {get; set;}

Example

page.FillStyle = FillStyle.Saturate20;

See also ...

PageLayout.Members | PageLayout.Color Property


SharpPlot 3.71 User Manual: FrameList Property

PageLayout.FrameList Property

List of Frames to flow through (defaults to empty vector for all frames in order of creation).

public string[] FrameList {get; set;}

Example

page.FrameList = new string[] {"LeftFrame", "RightFrame"};

See also ...

Advanced DocumentLayouts | SharpLeaf.NextFrame Method | ParagraphStyle.FrameBreak Property | PageLayout.Members | Frame.Skip Property


SharpPlot 3.71 User Manual: Size Property

PageLayout.Size Property

Size of paper in points as a vector of two doubles, suitable for PaperSize members.

public double[] Size {get; set;}

Example

page.Size = PaperSize.A4;

See also ...

PageLayout.Members | PaperSize Struct


SharpPlot 3.71 User Manual: Add Method

PageLayout.Add Method

Append page elements (Frame, Rule etc) to a page layout.

Overloads

  • public void Add(PageElement element);
  • public void Add(PageElement[] elements);

Example

  // Add an invisible frame with an inch margin all round
   page.Add(new Frame("FrameId",72,72,-72,-72));

Description

Elements are drawn and Frames are flowed in the order they were added (unless using FrameList).

See also ...

Document Layout Tutorials | PageElement Abstract Class | PageLayout.Members


SharpPlot 3.71 User Manual: Add Method (PageElement)

PageLayout.Add Method (PageElement)

Add a page element to a page layout.

public void Add(
    PageElement element
);

See also ...

PageLayout.Members | PageLayout.Add Method


SharpPlot 3.71 User Manual: Add Method (PageElement[])

PageLayout.Add Method (PageElement[])

Append page elements (Frame, Rule etc) to a page layout.

public void Add(
    PageElement[] elements
);
elements
Element to add.

See also ...

PageLayout.Members | PageLayout.Add Method


SharpPlot 3.71 User Manual: Contains Method

PageLayout.Contains Method

Check if the given PageElement is present in the PageLayout.

public bool Contains(
    PageElement item
);
item
Element to check.
return value
Whether element was found or not.

Example

   if ((!page.Contains(footer))) {
     page.Add(footer);
   }

See also ...

PageLayout.Members


SharpPlot 3.71 User Manual: Count Property (ReadOnly)

PageLayout.Count Property (ReadOnly)

Number of PageElement items in the PageLayout (ReadOnly).

public int Count {get;}

Example

int val = page.Count;

See also ...

PageLayout.Members


SharpPlot 3.71 User Manual: ToString Method

PageLayout.ToString Method

Readable summary of page layout.

public override string ToString();

See also ...

PageLayout.Members


SharpPlot 3.71 User Manual: PageElement Abstract Class

PageElement Abstract Class

The abstract class for elements that can belong to a PageLayout.

PageElement objects may also be drawn directly onto a SharpLeaf page with the SharpLeaf.DrawElement method.

Page Element derived classes

Frame : PageElement Class
Defines a region on the page into which text can flow. The frame can be invisible, or have a BoxStyle and a gutter. It also controls whether content should be clipped or not, and whether flow should automatically skip to next Frame.
TextBlock : PageElement Class
Arbitrary text to add to a page layout, with optional parameters substitution. Text can optionally be wrapped, and angled if the two points are different, in which case it is drawn along the given line.
ImageBlock : PageElement Class
Picture to add to a page layout. Image can optionally be scaled or stretched to fit a bounding box.
Box : PageElement Class
Rectangle to add to a page layout, possibly filled and shadowed.
Rule : PageElement Class
Simpe line to add to a page layout.


SharpPlot 3.71 User Manual: Frame : PageElement Class

Frame : PageElement Class

Defines a region on the page into which text can flow. The frame can be invisible, or have a BoxStyle and a gutter. It also controls whether content should be clipped or not, and whether flow should automatically skip to next Frame.

public class Frame : PageElement

Constructors

  • public Frame(string id,double xfrom, double yfrom, double xto, double yto);
  • public Frame(string id,double xfrom, double yfrom, double xto, double yto, bool skip, bool xclip, bool yclip);
  • public Frame(string id,double xfrom,double yfrom,double xto,double yto,bool skip,bool xclip,bool yclip,BoxStyle box,double gutter);

Frame Instance Properties

Box | BoxStyle used for frame decoration (default is null for none)
Gutter | Size of the inner margin in points (default is 0)
Id | String identifier of the frame
Skip | Automatic skipping to next frame when hitting the bottom (defaults to true)
XClip | Eliminate any content that extends beyond the left or right edges of the frame (defaults to false)
YClip | Eliminate any content that extends beyond the top or bottom edges of the frame (defaults to false)

Frame Methods

Clone | Take a deep copy of a Frame instance
GetCoordinates | Get the bounding box of the frame as an array
RenderXml | XML description of the Frame
SetCoordinates | Set the bounding box of the Frame
ToString | Readable summary of Frame detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

Frame.Members

Constructors

  • public Frame(string id,double xfrom, double yfrom, double xto, double yto);
  • public Frame(string id,double xfrom, double yfrom, double xto, double yto, bool skip, bool xclip, bool yclip);
  • public Frame(string id,double xfrom,double yfrom,double xto,double yto,bool skip,bool xclip,bool yclip,BoxStyle box,double gutter);

Frame Instance Properties

Box | BoxStyle used for frame decoration (default is null for none)
Gutter | Size of the inner margin in points (default is 0)
Id | String identifier of the frame
Skip | Automatic skipping to next frame when hitting the bottom (defaults to true)
XClip | Eliminate any content that extends beyond the left or right edges of the frame (defaults to false)
YClip | Eliminate any content that extends beyond the top or bottom edges of the frame (defaults to false)

Frame Methods

Clone | Take a deep copy of a Frame instance
GetCoordinates | Get the bounding box of the frame as an array
RenderXml | XML description of the Frame
SetCoordinates | Set the bounding box of the Frame
ToString | Readable summary of Frame detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Frame Constructor

Frame Constructor

Create a frame for SharpLeaf to flow content into.

Overloads

  • public Frame(string id,double xfrom, double yfrom, double xto, double yto);
  • public Frame(string id,double xfrom, double yfrom, double xto, double yto, bool skip, bool xclip, bool yclip);
  • public Frame(string id,double xfrom,double yfrom,double xto,double yto,bool skip,bool xclip,bool yclip,BoxStyle box,double gutter);

Example

  // Create an invisible frame with an inch margin all round
   frame = new Frame("FrameId",72,72,-72,-72);
   page.Add(frame);

See also ...

Frame.Members


SharpPlot 3.71 User Manual: Frame Constructor (String,Double,Double,Double,Double)

Frame Constructor (String,Double,Double,Double,Double)

Create a simple invisible frame.

public Frame(
    string id,
    double xfrom,
    double yfrom,
    double xto,
    double yto
);
id
Frame identifier (should be unique).
xfrom
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
yfrom
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
xto
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
yto
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).

See also ...

Frame.Members | Frame.Frame Constructor


SharpPlot 3.71 User Manual: Frame Constructor (String,Double,Double,Double,Double,Boolean,Boolean,Boolean)

Frame Constructor (String,Double,Double,Double,Double,Boolean,Boolean,Boolean)

Create a simple invisible frame, specifying edge behaviour.

public Frame(
    string id,
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    bool skip,
    bool xclip,
    bool yclip
);
id
Frame identifier (should be unique).
xfrom
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
yfrom
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
xto
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
yto
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
skip
Automatic skip to next frame when hitting bottom (defaults to true).
xclip
Clip whatever spills.

See also ...

Frame.Members | Frame.Frame Constructor


SharpPlot 3.71 User Manual: Frame Constructor (String,Double,Double,Double,Double,Boolean,Boolean,Boolean,BoxStyle,Double)

Frame Constructor (String,Double,Double,Double,Double,Boolean,Boolean,Boolean,BoxStyle,Double)

Create a frame for SharpLeaf to flow content into.

public Frame(
    string id,
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    bool skip,
    bool xclip,
    bool yclip,
    BoxStyle box,
    double gutter
);
id
Frame identifier (should be unique).
xfrom
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
yfrom
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
xto
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
yto
Frame coordinates in points (positive from top/left of paper, negative from bottom/right).
skip
Automatic.

See also ...

Frame.Members | Frame.Frame Constructor


SharpPlot 3.71 User Manual: Clone Method

Frame.Clone Method

Take a deep copy of a Frame instance.

public override PageElement Clone();

See also ...

Frame.Members


SharpPlot 3.71 User Manual: Skip Property

Frame.Skip Property

Automatic skipping to next frame when hitting the bottom (defaults to true).

public bool Skip {get; set;}

Example

frame.Skip = false;

See also ...

Paragraph Glossary | SharpLeaf.NextFrame Method | ParagraphStyle.FrameBreak Property | Frame.Members | Frame.YClip Property


SharpPlot 3.71 User Manual: Box Property

Frame.Box Property

BoxStyle used for frame decoration (default is null for none).

When using a BoxStyle, the Gutter property also probably needs to be set to a positive value.

public BoxStyle Box {get; set;}

Example

frame.Box = new BoxStyle(1,Color.Gray); // 1-point grey box

See also ...

PageLayout Glossary | Frame.Members | Frame.Gutter Property


SharpPlot 3.71 User Manual: Gutter Property

Frame.Gutter Property

Size of the inner margin in points (default is 0).

public double Gutter {get; set;}

Example

frame.Gutter = 36; // Half an inch

See also ...

PageLayout Glossary | Paragraph Glossary | Frame.Members


SharpPlot 3.71 User Manual: Id Property

Frame.Id Property

String identifier of the frame, that ought to be unique.

Useful only when not using the frame in the order in which they were added to the PageLayout, that is, setting a special PageLayout.FrameList, or calling SharpLeaf.NextFrame with an identifier string.

public string Id {get; set;}

Example

frame.Id = "MyFrame";

See also ...

Advanced DocumentLayouts | SharpLeaf.NextFrame Method | PageLayout.FrameList Property | Frame.Members


SharpPlot 3.71 User Manual: XClip Property

Frame.XClip Property

Eliminate any content that extends beyond the left or right edges of the frame (defaults to false).

public bool XClip {get; set;}

Example

frame.XClip = true;

See also ...

Paragraph Glossary | SharpLeaf.Ellipsis Property | ParagraphStyle.Wrap Property | Frame.Members


SharpPlot 3.71 User Manual: YClip Property

Frame.YClip Property

Eliminate any content that extends beyond the top or bottom edges of the frame (defaults to false).

public bool YClip {get; set;}

Example

frame.YClip = true;

See also ...

Paragraph Glossary | Frame.Members | Frame.Skip Property | Frame.XClip Property


SharpPlot 3.71 User Manual: SetCoordinates Method

Frame.SetCoordinates Method

Set the bounding box of the Frame.

public void SetCoordinates(
    double xfrom,
    double yfrom,
    double xto,
    double yto
);

Example

  // One inch margin from paper edge
   frame.SetCoordinates(72,72,-72,-72);

See also ...

PageLayout Glossary | Frame.Members


SharpPlot 3.71 User Manual: GetCoordinates Method

Frame.GetCoordinates Method

Get the bounding box of the frame as an array.

public double[] GetCoordinates();

Result

coordinates as {xfrom, yfrom, xto, yto}.

See also ...

Frame.Members


SharpPlot 3.71 User Manual: RenderXml Method

Frame.RenderXml Method

XML description of the Frame.

public override string RenderXml();

See also ...

Frame.Members


SharpPlot 3.71 User Manual: ToString Method

Frame.ToString Method

Readable summary of Frame detail.

public override string ToString();

See also ...

Frame.Members


SharpPlot 3.71 User Manual: TextBlock : PageElement Class

TextBlock : PageElement Class

Arbitrary text to add to a page layout, with optional parameters substitution. Text can optionally be wrapped, and angled if the two points are different, in which case it is drawn along the given line.

public class TextBlock : PageElement

Constructors

  • public TextBlock(string caption, FontType font, double xfrom, double yfrom);
  • public TextBlock(string caption, FontType font, double xfrom, double yfrom, double xto, double yto);
  • public TextBlock(string caption,FontType font,double xfrom,double yfrom,double xto,double yto,Alignment align,VerticalAlignment valign,bool wrap);

TextBlock Instance Properties

Alignment | Horizontal positioning of text along target line (default is Left)
Caption | Text to draw
Font | Font properties for text (name, size, pitch, style, color)
VerticalAlignment | Vertical positioning of text against target line (default is Baseline)
Wrap | Enable text wrapping around baseline (default is true)

TextBlock Methods

Clone | Take a deep copy of a TextBlock instance
GetCoordinates | Get the coordinates of the rule
RenderXml | XML description of the TextBlock
SetCoordinates | Set the coordinates of the text baseline
ToString | Readable summary of TextBlock detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

TextBlock.Members

public class TextBlock : PageElement

Constructors

  • public TextBlock(string caption, FontType font, double xfrom, double yfrom);
  • public TextBlock(string caption, FontType font, double xfrom, double yfrom, double xto, double yto);
  • public TextBlock(string caption,FontType font,double xfrom,double yfrom,double xto,double yto,Alignment align,VerticalAlignment valign,bool wrap);

TextBlock Instance Properties

Alignment | Horizontal positioning of text along target line (default is Left)
Caption | Text to draw
Font | Font properties for text (name, size, pitch, style, color)
VerticalAlignment | Vertical positioning of text against target line (default is Baseline)
Wrap | Enable text wrapping around baseline (default is true)

TextBlock Methods

Clone | Take a deep copy of a TextBlock instance
GetCoordinates | Get the coordinates of the rule
RenderXml | XML description of the TextBlock
SetCoordinates | Set the coordinates of the text baseline
ToString | Readable summary of TextBlock detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: TextBlock Constructor

TextBlock Constructor

Create a text to be drawn fixed-size along the specified line, with optional wrapping and alignment.

Overloads

  • public TextBlock(string caption, FontType font, double xfrom, double yfrom);
  • public TextBlock(string caption, FontType font, double xfrom, double yfrom, double xto, double yto);
  • public TextBlock(string caption,FontType font,double xfrom,double yfrom,double xto,double yto,Alignment align,VerticalAlignment valign,bool wrap);

Example

  // Create a footer note with page counter, one inch from page bottom
   font = new FontType("Arial",10,FontStyle.Bold,Color.Gray);
   text = new TextBlock("Footer note - page {page}/{pages}",font,72,-72,-72,-72,
            Alignment.Center,VerticalAlignment.Bottom,true);
   page.Add(text);

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: TextBlock Constructor (String,FontType,Double,Double)

TextBlock Constructor (String,FontType,Double,Double)

Draw left-aligned, flat, unwrapped text at target point.

public TextBlock(
    string caption,
    FontType font,
    double xfrom,
    double yfrom
);
caption
Text to be displayed.
font
Font to use.
xfrom
Start of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).
yfrom
Start of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).

See also ...

TextBlock.Members | TextBlock.TextBlock Constructor


SharpPlot 3.71 User Manual: TextBlock Constructor (String,FontType,Double,Double,Double,Double)

TextBlock Constructor (String,FontType,Double,Double,Double,Double)

Draw left-aligned wrapped text along target line.

public TextBlock(
    string caption,
    FontType font,
    double xfrom,
    double yfrom,
    double xto,
    double yto
);
caption
Text to be displayed.
font
Font to use.
xfrom
Start of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).
yfrom
Start of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).
xto
End of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).
yto
End of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).

See also ...

TextBlock.Members | TextBlock.TextBlock Constructor


SharpPlot 3.71 User Manual: TextBlock Constructor (String,FontType,Double,Double,Double,Double,Alignment,VerticalAlignment,Boolean)

TextBlock Constructor (String,FontType,Double,Double,Double,Double,Alignment,VerticalAlignment,Boolean)

Create a text to be drawn fixed-size along the specified line, with optional wrapping and alignment.

public TextBlock(
    string caption,
    FontType font,
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    Alignment align,
    VerticalAlignment valign,
    bool wrap
);
caption
Text to be displayed.
font
Font to use.
xfrom
Start of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).
yfrom
Start of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).
xto
End of line to draw text along (in points – positive from top/left of paper, negative from bottom/right).

See also ...

TextBlock.Members | TextBlock.TextBlock Constructor


SharpPlot 3.71 User Manual: Clone Method

TextBlock.Clone Method

Take a deep copy of a TextBlock instance.

public override PageElement Clone();

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: Alignment Property

TextBlock.Alignment Property

Horizontal positioning of text along target line.

public Alignment Alignment {get; set;}

Example

text.Alignment = Alignment.Center;

See also ...

TextBlock.Members | TextBlock.Wrap Property


SharpPlot 3.71 User Manual: Caption Property

TextBlock.Caption Property

Text to draw.

public string Caption {get; set;}

Example

text.Caption = "Some Text";

Substitution Parameters

{page}
Current page number (starting at 1)
{roman}
Current page number in lower-case roman numerals
{ROMAN}
Current page number in upper-case roman numerals
{pages}
Total number of pages
{time} {time,FMT}
Current time, with optional format (e.g. HH:mm)
{date} {date,FMT}
Current date, with optional format (e.g. yyyy-MM-dd)
{1}..{99}
Custom arguments as set by SharpLeaf.ArgumentList

If these keywords need to be used as text, the closing braces can be escaped with a backslash, so that “\}” renders as “}”.

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: Font Property

TextBlock.Font Property

Font properties for text (name, size, pitch, style, color).

public FontType Font {get; set;}

Example

text.Font = new FontType("Times", 12);

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: VerticalAlignment Property

TextBlock.VerticalAlignment Property

Vertical positioning of text against target line (default is Baseline)

public VerticalAlignment VerticalAlignment {get; set;}

Example

text.VerticalAlignment = VerticalAlignment.Top;

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: Wrap Property

TextBlock.Wrap Property

Enable text wrapping around baseline (default is true)

Will not be observed if starting point and end point match (would force unwrapped, horizontal text).

public bool Wrap {get; set;}

Example

text.Wrap = true;

See also ...

SharpLeaf.SoftHyphen Property | TextBlock.Members | TextBlock.SetCoordinates Method


SharpPlot 3.71 User Manual: GetCoordinates Method

TextBlock.GetCoordinates Method

Get the coordinates of the rule.

public double[] GetCoordinates();

Result

coordinates as {xfrom, yfrom, xto, yto}.

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: SetCoordinates Method

TextBlock.SetCoordinates Method

Set the coordinates of the text baseline.

If the start point matches the end point, the text will be horizontal and unwrapped.

Overloads

  • public void SetCoordinates(double xfrom,double yfrom);
  • public void SetCoordinates(double xfrom,double yfrom,double xto,double yto);

Example

  // Horizontal baseline, one inch from bottom
   text.SetCoordinates(72,-72,-72,-72);

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: SetCoordinates Method (Double,Double)

TextBlock.SetCoordinates Method (Double,Double)

Set the starting point for flat, horizontal text.

public void SetCoordinates(
    double xfrom,
    double yfrom
);

See also ...

TextBlock.Members | TextBlock.SetCoordinates Method


SharpPlot 3.71 User Manual: SetCoordinates Method (Double,Double,Double,Double)

TextBlock.SetCoordinates Method (Double,Double,Double,Double)

Set the coordinates of the text baseline.

public void SetCoordinates(
    double xfrom,
    double yfrom,
    double xto,
    double yto
);

See also ...

TextBlock.Members | TextBlock.SetCoordinates Method


SharpPlot 3.71 User Manual: RenderXml Method

TextBlock.RenderXml Method

XML description of the TextBlock.

public override string RenderXml();

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: ToString Method

TextBlock.ToString Method

Readable summary of TextBlock detail.

public override string ToString();

See also ...

TextBlock.Members


SharpPlot 3.71 User Manual: ImageBlock : PageElement Class

ImageBlock : PageElement Class

Picture to add to a page layout. Image can optionally be scaled or stretched to fit a bounding box.

public class ImageBlock : PageElement

Constructors

  • public ImageBlock(string filename, string url, double xfrom, double yfrom);
  • public ImageBlock(string filename, string url, double xfrom, double yfrom, double width, double height);
  • public ImageBlock(string filename,string url,double xfrom,double yfrom,double width,double height,bool stretch);

ImageBlock Instance Properties

Filename | File name to use for embedding at report creation time (Raster formats and PS and PDF)
Stretch | Stretch image to fix bounding box exactly (false by default) (observed only if both width and height are non-zero)
Url | URL to point at display time to for web formats (SVG and XAML)

ImageBlock Methods

Clone | Take a deep copy of an ImageBlock instance
GetCoordinates | Get the coordinates of the image
RenderXml | XML description of the ImageBlock
SetCoordinates | Set the position and size of the image
ToString | Readable summary of ImageBlock detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

ImageBlock.Members

Constructors

  • public ImageBlock(string filename, string url, double xfrom, double yfrom);
  • public ImageBlock(string filename, string url, double xfrom, double yfrom, double width, double height);
  • public ImageBlock(string filename,string url,double xfrom,double yfrom,double width,double height,bool stretch);

ImageBlock Instance Properties

Filename | File name to use for embedding at report creation time (Raster formats and PS and PDF)
Stretch | Stretch image to fix bounding box exactly (false by default) (observed only if both width and height are non-zero)
Url | URL to point at display time to for web formats (SVG and XAML)

ImageBlock Methods

Clone | Take a deep copy of an ImageBlock instance
GetCoordinates | Get the coordinates of the image
RenderXml | XML description of the ImageBlock
SetCoordinates | Set the position and size of the image
ToString | Readable summary of ImageBlock detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: ImageBlock Constructor

ImageBlock Constructor

Create a new picture from the filename, possibly scaling and stretching it.

Overloads

  • public ImageBlock(string filename, string url, double xfrom, double yfrom);
  • public ImageBlock(string filename, string url, double xfrom, double yfrom, double width, double height);
  • public ImageBlock(string filename,string url,double xfrom,double yfrom,double width,double height,bool stretch);

Example

  // Include image a real size, one inch from bottom-right paper corner
   image = new ImageBlock("C:\\img\\dyalog.jpg","http://mysite.com/img/dyalog.jpg",-72,-72);
   page.Add(image);

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: ImageBlock Constructor (String,String,Double,Double)

ImageBlock Constructor (String,String,Double,Double)

Use default picture size.

public ImageBlock(
    string filename,
    string url,
    double xfrom,
    double yfrom
);
filename
File name to use for embedding at report creation time (Raster format and PS and PDF).
url
URL to point at display time to for web formats (SVG and XAML).
xfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
yfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).

See also ...

ImageBlock.Members | ImageBlock.ImageBlock Constructor


SharpPlot 3.71 User Manual: ImageBlock Constructor (String,String,Double,Double,Double,Double)

ImageBlock Constructor (String,String,Double,Double,Double,Double)

Scale picture without stretching.

public ImageBlock(
    string filename,
    string url,
    double xfrom,
    double yfrom,
    double width,
    double height
);
filename
File name to use for embedding at report creation time (Raster format and PS and PDF).
url
URL to point at display time to for web formats (SVG and XAML).
xfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
yfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
width
Size of image (0 for default – direction determined by signum of xfrom/yfrom), positive size towards right/bottom, negative size towards top/left.
height
Size of image (0 for default – direction determined by.

See also ...

ImageBlock.Members | ImageBlock.ImageBlock Constructor


SharpPlot 3.71 User Manual: ImageBlock Constructor (String,String,Double,Double,Double,Double,Boolean)

ImageBlock Constructor (String,String,Double,Double,Double,Double,Boolean)

Create a new picture from the filename, possibly scaling and stretching it.

public ImageBlock(
    string filename,
    string url,
    double xfrom,
    double yfrom,
    double width,
    double height,
    bool stretch
);
filename
File name to use for embedding at report creation time (Raster format and PS and PDF).
url
URL to point at display time to for web formats (SVG and XAML).
xfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
yfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
width
Size of image (0 for default – direction determined by signum of xfrom/yfrom), positive size towards right/bott.

See also ...

ImageBlock.Members | ImageBlock.ImageBlock Constructor


SharpPlot 3.71 User Manual: Clone Method

ImageBlock.Clone Method

Take a deep copy of an ImageBlock instance.

public override PageElement Clone();

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: Filename Property

ImageBlock.Filename Property

File name to use for embedding at report creation time (Raster formats, and PS and PDF)

public string Filename {get; set;}

Example

img.Filename = "C:\img\myimage.jpeg";

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: Stretch Property

ImageBlock.Stretch Property

Stretch image to fix bounding box exactly (false by default) (observed only if both width and height are non-zero).

public bool Stretch {get; set;}

Example

img.Stretch = 3;

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: Url Property

ImageBlock.Url Property

URL to point at display time to for web formats (SVG and XAML).

public string Url {get; set;}

Example

img.Url = "http://mywebsite.com/img/myimage.jpg";

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: GetCoordinates Method

ImageBlock.GetCoordinates Method

Get the coordinates of the image.

public double[] GetCoordinates();

Result

coordinates as {xfrom, yfrom, width, height}.

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: SetCoordinates Method

ImageBlock.SetCoordinates Method

Set the position and size of the image.

Overloads

  • public void SetCoordinates(double xfrom,double yfrom);
  • public void SetCoordinates(double xfrom,double yfrom,double width,double height);

Example

// put image at x=100 and y=200, fitting a one-inch box going downwards and to the
            // right from that point
   image.SetCoordinates(100,200,-72,72);

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: SetCoordinates Method (Double,Double)

ImageBlock.SetCoordinates Method (Double,Double)

Set the position of the image.

public void SetCoordinates(
    double xfrom,
    double yfrom
);
xfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
yfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).

See also ...

ImageBlock.Members | ImageBlock.SetCoordinates Method


SharpPlot 3.71 User Manual: SetCoordinates Method (Double,Double,Double,Double)

ImageBlock.SetCoordinates Method (Double,Double,Double,Double)

Set the position and size of the image.

public void SetCoordinates(
    double xfrom,
    double yfrom,
    double width,
    double height
);
xfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
yfrom
Point where to draw image (positive : from paper top left corner, negative : from paper right bottom corner).
width
Size of image (0 for default – direction determined by signum of xfrom/yfrom), positive size towards right/bottom, negative size towards top/left.
height
Size of image (0 for default – direction determined by signum of xfrom/yfrom), positive size towards right/bottom, negative size towards top/left.

See also ...

ImageBlock.Members | ImageBlock.SetCoordinates Method


SharpPlot 3.71 User Manual: RenderXml Method

ImageBlock.RenderXml Method

XML description of the ImageBlock.

public override string RenderXml();

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: ToString Method

ImageBlock.ToString Method

Readable summary of ImageBlock detail.

public override string ToString();

See also ...

ImageBlock.Members


SharpPlot 3.71 User Manual: Box : PageElement Class

Box : PageElement Class

Rectangle to add to a page layout, possibly filled and shadowed.

public class Box : PageElement

Constructors

  • public Box(double xfrom, double yfrom, double xto, double yto);
  • public Box(double xfrom,double yfrom,double xto,double yto,BoxStyle style);

Box Instance Properties

Style BoxStyle to use for Box decoration (null for default)

Box Methods

Clone | Take a deep copy of a Box instance
GetCoordinates | Get the coordinates of the box
RenderXml | XML description of the Box
SetCoordinates | Set the coordinates of the box
ToString | Readable summary of Box detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

Box.Members

Constructors

  • public Box(double xfrom, double yfrom, double xto, double yto);
  • public Box(double xfrom,double yfrom,double xto,double yto,BoxStyle style);

Box Instance Properties

Style BoxStyle to use for Box decoration (null for default)

Box Methods

Clone | Take a deep copy of a Box instance
GetCoordinates | Get the coordinates of the box
RenderXml | XML description of the Box
SetCoordinates | Set the coordinates of the box
ToString | Readable summary of Box detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Box Constructor

Box Constructor

Create a new box definition.

Overloads

  • public Box(double xfrom, double yfrom, double xto, double yto);
  • public Box(double xfrom,double yfrom,double xto,double yto,BoxStyle style);

Example

   boxstyle = new BoxStyle(1,Color.Firebrick,LineStyle.Dash,10);  // 10-point rounding
   box = new Box(72,72,-72,-72,boxstyle);  // One inch from paper edges
   page.Add(box);

See also ...

Box.Members


SharpPlot 3.71 User Manual: Box Constructor (Double,Double,Double,Double)

Box Constructor (Double,Double,Double,Double)

Create a simple 1pt black edged box.

public Box(
    double xfrom,
    double yfrom,
    double xto,
    double yto
);
xfrom
Coordinates in points (positive from top/left of paper, negative from bottom/right).
yfrom
Coordinates in points (positive from top/left of paper, negative from bottom/right).
xto
Coordinates in points (positive from top/left of paper, negative from bottom/right).
yto
Coordinates in points (positive from top/left of paper, negative from bottom/right).

See also ...

Box.Members | Box.Box Constructor


SharpPlot 3.71 User Manual: Box Constructor (Double,Double,Double,Double,BoxStyle)

Box Constructor (Double,Double,Double,Double,BoxStyle)

Create a new box definition.

public Box(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    BoxStyle style
);
xfrom
Coordinates in points (positive from top/left of paper, negative from bottom/right).
yfrom
Coordinates in points (positive from top/left of paper, negative from bottom/right).
xto
Coordinates in points (positive from top/left of paper, negative from bottom/right).
yto
Coordinates in points (positive from top/left of paper, negative from bottom/right).
style
Box decoration attributes.

See also ...

Box.Members | Box.Box Constructor


SharpPlot 3.71 User Manual: Clone Method

Box.Clone Method

Take a deep copy of a Box instance.

public override PageElement Clone();

See also ...

Box.Members


SharpPlot 3.71 User Manual: Style Property

Box.Style Property

BoxStyle to use for Box decoration (null for default).

public BoxStyle Style {get; set;}

Example

box.Style = new BoxStyle(1, Color.Gray); // 1-point thick grey box, unfilled

See also ...

Box.Members


SharpPlot 3.71 User Manual: SetCoordinates Method

Box.SetCoordinates Method

Set the coordinates of the box.

public void SetCoordinates(
    double xfrom,
    double yfrom,
    double xto,
    double yto
);

Example

   box.SetCoordinates(72,72,-72,-72);  // One inch from paper edges

See also ...

Box.Members


SharpPlot 3.71 User Manual: GetCoordinates Method

Box.GetCoordinates Method

Get the coordinates of the box.

public double[] GetCoordinates();

Result

coordinates as {xfrom, yfrom, xto, yto}.

See also ...

Box.Members


SharpPlot 3.71 User Manual: RenderXml Method

Box.RenderXml Method

XML description of the Box.

public override string RenderXml();

See also ...

Box.Members


SharpPlot 3.71 User Manual: ToString Method

Box.ToString Method

Readable summary of Box detail.

public override string ToString();

See also ...

Box.Members


SharpPlot 3.71 User Manual: Rule : PageElement Class

Rule : PageElement Class

Simpe line to add to a page layout.

public class Rule : PageElement

Constructors

  • public Rule(double xfrom, double yfrom, double xto, double yto);
  • public Rule(double xfrom, double yfrom, double xto, double yto, double weight);
  • public Rule(double xfrom, double yfrom, double xto, double yto, double weight, Color color);
  • public Rule(double xfrom,double yfrom,double xto,double yto,double weight,Color color,LineStyle style);

Rule Instance Properties

Color | Color of ruled line
Style | LineStyle of Rule (solid by default)
Width | Width of line in points

Rule Methods

Clone | Take a deep copy of a Rule instance
GetCoordinates | Get the coordinates of the rule
RenderXml | XML description of the Rule
SetCoordinates | Set the coordinates of the rule
ToString | Readable summary of Rule detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

Rule.Members

Constructors

  • public Rule(double xfrom, double yfrom, double xto, double yto);
  • public Rule(double xfrom, double yfrom, double xto, double yto, double weight);
  • public Rule(double xfrom, double yfrom, double xto, double yto, double weight, Color color);
  • public Rule(double xfrom,double yfrom,double xto,double yto,double weight,Color color,LineStyle style);

Rule Instance Properties

Color | Color of ruled line
Style | LineStyle of Rule (solid by default)
Width | Width of line in points

Rule Methods

Clone | Take a deep copy of a Rule instance
GetCoordinates | Get the coordinates of the rule
RenderXml | XML description of the Rule
SetCoordinates | Set the coordinates of the rule
ToString | Readable summary of Rule detail

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Rule Constructor

Rule Constructor

Create a fixed rule across document.

Overloads

  • public Rule(double xfrom, double yfrom, double xto, double yto);
  • public Rule(double xfrom, double yfrom, double xto, double yto, double weight);
  • public Rule(double xfrom, double yfrom, double xto, double yto, double weight, Color color);
  • public Rule(double xfrom,double yfrom,double xto,double yto,double weight,Color color,LineStyle style);

Example

   rule = new Rule(72,-72,-72,-72);  // One inch above paper bottom

See also ...

Rule.Members


SharpPlot 3.71 User Manual: Rule Constructor (Double,Double,Double,Double)

Rule Constructor (Double,Double,Double,Double)

1pt black solid rule.

public Rule(
    double xfrom,
    double yfrom,
    double xto,
    double yto
);
xfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
xto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).

See also ...

Rule.Members | Rule.Rule Constructor


SharpPlot 3.71 User Manual: Rule Constructor (Double,Double,Double,Double,Double)

Rule Constructor (Double,Double,Double,Double,Double)

Black solid rule.

public Rule(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    double weight
);
xfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
xto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
weight
Line width.

See also ...

Rule.Members | Rule.Rule Constructor


SharpPlot 3.71 User Manual: Rule Constructor (Double,Double,Double,Double,Double,Color)

Rule Constructor (Double,Double,Double,Double,Double,Color)

Solid rule.

public Rule(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    double weight,
    Color color
);
xfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
xto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
weight
Line width.
color
Line color.

See also ...

Rule.Members | Rule.Rule Constructor


SharpPlot 3.71 User Manual: Rule Constructor (Double,Double,Double,Double,Double,Color,LineStyle)

Rule Constructor (Double,Double,Double,Double,Double,Color,LineStyle)

Create a fixed rule across document.

public Rule(
    double xfrom,
    double yfrom,
    double xto,
    double yto,
    double weight,
    Color color,
    LineStyle style
);
xfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yfrom
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
xto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
yto
Coordinates of line in points (positive from top/left of paper, negative from bottom/right).
weight
Line width.
color
Line color.
style
Line style.

See also ...

Rule.Members | Rule.Rule Constructor


SharpPlot 3.71 User Manual: Clone Method

Rule.Clone Method

Take a deep copy of a Rule instance.

public override PageElement Clone();

See also ...

Rule.Members


SharpPlot 3.71 User Manual: Color Property

Rule.Color Property

Color of ruled line.

public Color Color {get; set;}

Example

rule.Color = Color.Navy;

See also ...

Rule.Members


SharpPlot 3.71 User Manual: Style Property

Rule.Style Property

LineStyle of Rule (solid by default).

public LineStyle Style {get; set;}

Example

rule.Style = LineStyle.Dash;

See also ...

Rule.Members


SharpPlot 3.71 User Manual: Width Property

Rule.Width Property

Width of line in points.

public double Width {get; set;}

Example

rule.Width = 2;

See also ...

Rule.Members


SharpPlot 3.71 User Manual: SetCoordinates Method

Rule.SetCoordinates Method

Set the coordinates of the rule.

public void SetCoordinates(
    double xfrom,
    double yfrom,
    double xto,
    double yto
);

Example

   rule.SetCoordinates(72,-72,-72,-72);  // One inch above paper bottom

See also ...

Rule.Members


SharpPlot 3.71 User Manual: GetCoordinates Method

Rule.GetCoordinates Method

Get the coordinates of the rule.

public double[] GetCoordinates();

Result

coordinates as {xfrom, yfrom, xto, yto}.

See also ...

Rule.Members


SharpPlot 3.71 User Manual: RenderXml Method

Rule.RenderXml Method

XML description of the Rule.

public override string RenderXml();

See also ...

Rule.Members


SharpPlot 3.71 User Manual: ToString Method

Rule.ToString Method

Readable summary of Rule detail.

public override string ToString();

See also ...

Rule.Members


SharpPlot 3.71 User Manual: Common Reference

Common Reference

In this sections you’ll find classes and structures that are common to both SharpPlot and SharpLeaf.

FillStyle Struct
Fill-styles (built-in and user-defined tilings). SharpPlot offers a good range of pre-defined shading patterns, but the majority of output formats allow you to add your own custom fills.
LineStyle Struct
Line-styles (built-in and user-defined dash-repeat sequences).
PageMode Enumeration
Options to control the layout of multiple document pages by the Document Rendering/Saving functions.
PaperSize Struct
The PaperSize structure lists many standard paper sizes as a double[] {width,height} vector, suitable to use for SharpPlot constructor and PageLayout constructor.
PdfMode Enumeration
Various options to control the way Acrobat Reader first shows the completed PDF document.
SvgMode Enumeration
Various options for scaling the completed graphic in the browser.
Document Class
Page-level manipulation and output of documents produced by SharpPlot.RenderDocument and SharpLeaf.RenderDocument.
VectorMath Class
This class provides a convenient library of static methods for transforming array data.
DbUtil Class
This class provides a small set of static methods for extracting array data from database tables. See the tutorial on aggregating data for some worked examples.


SharpPlot 3.71 User Manual: FillStyle Struct

FillStyle Struct

Fill-styles (built-in and user-defined tilings). SharpPlot offers a good range of pre-defined shading patterns, but the majority of output formats allow you to add your own custom fills.

For SVG, these would typically be more sophisticated gradients, or 3D-effect filters to give the effect of extrusion and lighting on the completed graphic. For raster output, you can use any standard .Net Brush object here. See Gradients for more background on how the fills may be customised.

public struct FillStyle

Public Static Properties

Background | Shape is filled with the current background
BackwardDiagonal | Shape is diagonally hatched right to left
Cross | Shape is filled with crossing vertical and horizontal lines
DashedDownwardDiagonal | Shape is filled with diagonal dashed lines running from top left to bottom right
DashedHorizontal | Shape is filled with dashed horizontal lines
DashedUpwardDiagonal | Shape is filled with diagonal dashed lines running from bottom left top right
DashedVertical | Shape is filled with dashed vertical lines
DiagonalCross | Shape is diagonally cross-hatched
Dome | Fill has 3D domed effect
Drum | Fill has 3D Column effect
ForwardDiagonal | Shape is diagonally hatched left to right
GradientBottom | Fill has S-N gradient
GradientBottomLeft | Fill has SW-NE gradient
GradientBottomRight | Fill has SE-NW gradient
GradientLeft | Fill has W-E gradient
GradientRight | Fill has E-W gradient
GradientTop | Fill has N-S gradient
GradientTopLeft | Fill has NW-SE gradient
GradientTopRight | Fill has NE-SW gradient
Halftone | Fill colour has 50% saturation
Horizontal | Shape is filled with horizontal lines
HorizontalBrick | Shape is filled with bricking pattern
Opacity18 | Fill colour has 18% opacity
Opacity30 | Fill colour has 30% opacity
Opacity42 | Fill colour has 42% opacity
Opacity54 | Fill colour has 54% opacity
Opacity6 | Fill colour has 6% opacity
Opacity66 | Fill colour has 66% opacity
Opacity78 | Fill colour has 78% opacity
Opacity90 | Fill colour has 90% opacity
Pipe | Fill has 3D Pipe effect
Saturate10 | Fill colour has 10% saturation
Saturate20 | Fill colour has 20% saturation
Saturate30 | Fill colour has 30% saturation
Saturate60 | Fill colour has 60% saturation
Saturate80 | Fill colour has 80% saturation
Saturate90 | Fill colour has 90% saturation
Shingle | Shape is filled with fish-scale pattern
Solid | Shape is filled with solid colour
SpotBottomLeft | Fill has Bottom-Left spotlight
SpotBottomRight | Fill has Bottom-Right spotlight
SpotTopLeft | Fill has Top-Left spotlight
SpotTopRight | Fill has Top-Right spotlight
Sunrise | Fill has Sunrise gradient
Unfilled | Shape is not filled
Vertical | Shape is filled with vertical lines
Weave | Shape is shaded with basket-weave pattern

Creating Fills for Vector Output

Creates a custom shading from an existing gradient or URI to a file.

public FillStyle(
    string sourceName  // Brush is also accepted here
);
sp.SetBackground(Color.Bisque,FillStyle.GradientBottomRight);
FillStyle fs = new FillStyle("#gentlelight"); // SVG filter
sp.SetBackground(new FillStyle("tartan.png"));

Bitmap fills are currently only supported in output rendered as VML, XAML and raster. Customised gradients may be used with any of the formats, and arbitrary filters are specific to SVG. A typical filter could look like:

<defs>
  <desc>Background wash (light colour)</desc>
   <linearGradient id="wash" gradientTransform="rotate(35)" >
    <stop offset="15%" style="stop-color:#D7E1E3"/>
    <stop offset="90%" style="stop-color:#9CDCEE"/>
   </linearGradient>
</defs>

You refer to this as “#wash” in the source name for the fill style. Remember to Include the source for the filter in the chart so that it is added at the beginning of the SVG output.

Creating Fills for Raster Output

To create a custom shading from an existing Brush:

public FillStyle(
    Brush brush
);
bg = new TextureBrush(new Bitmap("marble.jpg"));
sp.SetChartBackground(new FillStyle(bg));

You can use the WrapMode setting of the Brush to determine how the texture is tiled. It may be convenient to combine both methods to create a chart which can render either to vector or raster outout. In this case you may pass the Brush object and the URL to the image when you create the custom fill:

bg = new TextureBrush(new Bitmap("marble.jpg"));
sp.SetChartBackground(new FillStyle(bg,"http://serverpath/marble.jpg"));

Clearly, the vector output may require a full http path to the image, and you may choose a completely different image here.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

BoxStyle Structure | Using the Gradient fills | SharpPlot.SetBackground Method | SharpPlot.SetChartBackground Method | SharpPlot.SetFillStyles Method | SharpPlot.SetFrameBackground Method | SharpPlot.SetKeyBackground Method | SharpPlot.SetNoteBackground Method


SharpPlot 3.71 User Manual: LineStyle Struct

LineStyle Struct

Line-styles (built-in and user-defined dash-repeat sequences).

public struct LineStyle

Public Constructor

Creates a custom dashed line from a vector of even length giving on-off pattern, proportionally to the line width.

public LineStyle(
    int[] dashPattern
);
public LineStyle(
    double[] dashPattern
);

Example

sp.SetContourStyle(Color.Red,LineStyle.Dash,1.2);
sp.SetDatumLineStyle(Color.Maroon,new LineStyle(new int[] {12,4,24,4})); // Long dashes

Public Static Properties

Dash | Specifies a dashed line
DashDot | Specifies a line with alternating dashes and dots
DashDotDot | Specifies a line with alternating dashes and paired dots
Dot | Specifies a dotted line
Invisible | Specifies an undrawn (invisible) line
Solid | Specifies a solid line

Creating Custom Dashed Lines

A dashed line is defined by an array of numbers which give the on-off-on-off cycle. Dash lengths are always proportional the line width. Custom lines are drawn with square ends to make the segments exactly the length you ask for. The cycle always begins at the start of the pattern (so the dash-offset is zero) here. For example:

LineStyle mydash = new LineStyle(new int[]{1,2,2,2,3,2,4,2});

Note that in charts rendered to SVG you can animate the dash-offset to give the effect of a ‘walking line’.

Using a Pen object with Raster Output

It is possible to use an existing .Net Pen object to create your line, but this method will only be effective in charts rendered to raster formats.

public LineStyle(
    Pen myPen
);

The color and Width of the pen will be overridden by the color setting and width of the line being drawn.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

BoxStyle Structure | SharpPlot.SetDatumLineStyle Method | SharpPlot.SetGridLineStyle Method | SharpPlot.SetLineStyles Method


SharpPlot 3.71 User Manual: PageMode Enumeration

PageMode Enumeration

Options to control the layout of multiple document pages by the Document Rendering/Saving functions.

public enum PageMode

Members

Horizontal | Line up pages horizontally
Vertical | Line up pages vertically

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

Document.Members


SharpPlot 3.71 User Manual: PaperSize Struct

PaperSize Struct

The PaperSize structure lists many standard paper sizes as a double[] {width,height} vector, suitable to use for SharpPlot constructor and PageLayout constructor.

public struct PaperSize

It also contains two utility functions to convert papersizes to Portrait or Landscape:

 public static double[] Portrait (double[] size)
 public static double[] Landscape(double[] size)

Members

A0 | ISO216 A series: 2384 by 3371 mm
A1 | ISO216 A series: 1685 by 2384 mm
A10 | ISO216 A series: 74 by 105 mm
A2 | ISO216 A series: 1192 by 1685 mm
A3 | ISO216 A series: 843 by 1192 mm
A4 | ISO216 A series: 596 by 843 mm
A5 | ISO216 A series: 421 by 596 mm
A6 | ISO216 A series: 298 by 421 mm
A7 | ISO216 A series: 211 by 298 mm
A8 | ISO216 A series: 149 by 211 mm
A9 | ISO216 A series: 105 by 149 mm
ArchA | Architectural A: 9 by 12 inches
ArchB | Architectural B: 12 by 18 inches
ArchC | Architectural C: 18 by 24 inches
ArchD | Architectural D: 24 by 36 inches
ArchE | Architectural E: 36 by 48 inches
ArchE1 | Architectural E1: 30 by 42 inches
ArchE2 | Architectural E2: 26 by 38 inches
ArchE3 | Architectural E3: 27 by 39 inches
B0 | ISO216 B series: 2835 by 4009 mm
B1 | ISO216 B series: 2004 by 2835 mm
B10 | ISO216 B series: 89 by 125 mm
B2 | ISO216 B series: 1417 by 2004 mm
B3 | ISO216 B series: 1002 by 1417 mm
B4 | ISO216 B series: 709 by 1002 mm
B5 | ISO216 B series: 501 by 709 mm
B6 | ISO216 B series: 354 by 501 mm
B7 | ISO216 B series: 251 by 354 mm
B8 | ISO216 B series: 177 by 251 mm
B9 | ISO216 B series: 125 by 177 mm
C0 | ISO216 C series: 2599 by 3676 mm
C1 | ISO216 C series: 1838 by 2599 mm
C10 | ISO216 C series: 81 by 115 mm
C2 | ISO216 C series: 1300 by 1838 mm
C3 | ISO216 C series: 919 by 1300 mm
C4 | ISO216 C series: 650 by 919 mm
C5 | ISO216 C series: 460 by 650 mm
C6 | ISO216 C series: 325 by 460 mm
C7 | ISO216 C series: 230 by 325 mm
C8 | ISO216 C series: 162 by 230 mm
C9 | ISO216 C series: 115 by 162 mm
Chart | Default SharpPlot paper size: 6 by 4.5 inches
Executive | US standard: 7.25 by 10.5 inches
Folio | US standard: 8.5 by 13 inches
GovernmentLegal | US standard: 8.5 by 13 inches
GovernmentLetter | US standard: 8 by 10.5 inches
JuniorLegal | US standard: 8 by 5 inches
Ledger | US standard: 17 by 11 inches
Legal | US standard: 8.5 by 14 inches
Letter | Default SharpLeaf paper size: 8.5 by 11 inches
Statement | US standard: 5.5 by 8.5 inches
Tabloid | US standard: 11 by 17 inches

See also ...

SharpPlot Constructor | PageLayout.PageLayout Constructor


SharpPlot 3.71 User Manual: PdfMode Enumeration

PdfMode Enumeration

Various options to control the way Acrobat Reader first shows the completed PDF document.

public enum PdfMode

Members

FullScreen | Acrobat Reader opens full-screen (suitable for presentations)
ShowOutlines | Acrobat Reader always shows the bookmark tab when opened
UserDefault | Acrobat Reader shows the PDF with your usual default settings

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot.RenderPdf Method | SharpPlot.SavePdf Method | SharpLeaf.RenderPdf Method | SharpLeaf.SavePdf Method | Document.RenderPdf Method | Document.SavePdf Method


SharpPlot 3.71 User Manual: SvgMode Enumeration

SvgMode Enumeration

Various options for scaling the completed graphic in the browser.

public enum SvgMode

Members

FitHeight | The image will be scaled to fit the viewer height, preserving its shape
FitWidth | The image will be scaled to fit the viewer width, preserving its shape
FixedAspect | The image will be scaled to fit the viewer window, preserving its shape
FixedSize | The image will always appear at the designed size, and will be undecorated
Shadowed | The image will appear at the designed size, with a border and drop-shadow added
Stretchable | The image will fit exactly the space available in the viewer. This may distort the text if the window shape is very different from that which the chart was designed for!

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)

See also ...

SharpPlot.RenderSvg Method | SharpPlot.SaveSvg Method | SharpLeaf.RenderSvg Method | SharpLeaf.SaveSvg Method | Document.RenderSvg Method | Document.SaveSvg Method


SharpPlot 3.71 User Manual: Document Class

Document Class

Page-level manipulation and output of documents produced by SharpPlot.RenderDocument and SharpLeaf.RenderDocument.

Pages from different charts and reports can be extracted and re-ordered, then rendered to any of the supported formats.

public class Document

Constructor

  • public Document();

Document Instance Properties

Pages | Number of pages of the document (ReadOnly)
Title | Document title

Document Methods

Append | Append document pages after the end of current
ExtractPages | Create a new Document, extracting specified pages
GetCharsets | Return the list of used characters for each used font
GetPaperSize | Get largest paper size as a 2-item double vector (width height)
GetPaperSizes | Get paper sizes as a 2-column matrix of (width height) per page
Prepend | Insert document pages before current
RenderAnimatedSvg | Return document rendered as animated SVG, with one frame per page
RenderBitmap | Return document rendered through raster engine as a Bitmap object
RenderEps | Return a document page rendered as Encapsulated PostScript
RenderLog | Return document as a readable log
RenderMetafile | Return or stream document as one of the Extended Metafile formats
RenderPS | Return document rendered as raw PostScript
RenderPageMap | Return an instance of the PageMap class with given resolution and page mode
RenderPdf | Return document as a PDF stream
RenderSvg | Return document rendered as SVG
RenderXaml | Return document rendered as a XAML Canvas
SaveAnimatedGif | Save document rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save document to named file as animated SVG, with one frame per page
SaveEps | Save a document page to named file as Encapsulated PostScript
SaveImage | Save document rendered through raster engine as an image file
SaveLog | Save document as a readable log file
SavePS | Save document to named file as raw PostScript
SavePdf | Save document to named file as PDF
SaveSvg | Save document to named file as SVG
SaveXaml | Save document to named file as a XAML Canvas

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Members

Document.Members

Constructor

  • public Document();

Document Instance Properties

Pages | Number of pages of the document (ReadOnly)
Title | Document title

Document Methods

Append | Append document pages after the end of current
ExtractPages | Create a new Document, extracting specified pages
GetCharsets | Return the list of used characters for each used font
GetPaperSize | Get largest paper size as a 2-item double vector (width height)
GetPaperSizes | Get paper sizes as a 2-column matrix of (width height) per page
Prepend | Insert document pages before current
RenderAnimatedSvg | Return document rendered as animated SVG, with one frame per page
RenderBitmap | Return document rendered through raster engine as a Bitmap object
RenderEps | Return a document page rendered as Encapsulated PostScript
RenderLog | Return document as a readable log
RenderMetafile | Return or stream document as one of the Extended Metafile formats
RenderPS | Return document rendered as raw PostScript
RenderPageMap | Return an instance of the PageMap class with given resolution and page mode
RenderPdf | Return document as a PDF stream
RenderSvg | Return document rendered as SVG
RenderXaml | Return document rendered as a XAML Canvas
SaveAnimatedGif | Save document rendered through raster engine as an animated GIF file, one frame per page.
SaveAnimatedSvg | Save document to named file as animated SVG, with one frame per page
SaveEps | Save a document page to named file as Encapsulated PostScript
SaveImage | Save document rendered through raster engine as an image file
SaveLog | Save document as a readable log file
SavePS | Save document to named file as raw PostScript
SavePdf | Save document to named file as PDF
SaveSvg | Save document to named file as SVG
SaveXaml | Save document to named file as a XAML Canvas

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Document Constructor

Document Constructor

Create an empty document.

public Document();

See also ...

Document.Members


SharpPlot 3.71 User Manual: Pages Property (ReadOnly)

Document.Pages Property (ReadOnly)

Number of pages of the document (ReadOnly).

public int Pages {get;}

Example

int pages = doc.Pages;

See also ...

Document.Members


SharpPlot 3.71 User Manual: Title Property

Document.Title Property

Document title for display in title bar in viewers

public string Title {get; set;}

Example

doc.Title = "Some Text";

See also ...

SharpPlot.TitleBar Property | SharpLeaf.Title Property | DocumentLayout.Title Property | Document.Members


SharpPlot 3.71 User Manual: Append Method

Document.Append Method

Append document pages after the end of current.

Overloads

  • public void Append(Document doc);
  • public void Append(Document doc,int page);
  • public void Append(Document doc,int[] pages);

Example

  // Append a SharpLeaf report to document
   doc.Append(lf.RenderDocument());

See also ...

Document.Members


SharpPlot 3.71 User Manual: Append Method (Document)

Document.Append Method (Document)

Append given document after the end of current.

public void Append(
    Document doc
);
doc
Document to take pages from.

See also ...

Document.Members | Document.Append Method


SharpPlot 3.71 User Manual: Append Method (Document,Int32)

Document.Append Method (Document,Int32)

Append given document page after the end of current.

public void Append(
    Document doc,
    int page
);
doc
Document to take pages from.
page
Page number to append.

See also ...

Document.Members | Document.Append Method


SharpPlot 3.71 User Manual: Append Method (Document,Int32[])

Document.Append Method (Document,Int32[])

Append document pages after the end of current.

public void Append(
    Document doc,
    int[] pages
);
doc
Document to take pages from.
pages
Page numbers to append, in that order.

See also ...

Document.Members | Document.Append Method


SharpPlot 3.71 User Manual: ExtractPages Method

Document.ExtractPages Method

Create a new Document, extracting specified pages.

Overloads

  • public Document ExtractPages(int page);
  • public Document ExtractPages(int[] pages);

Example

  // Drop the first page of a document
   doc = doc.ExtractPages(VectorMath.Range(2,doc.Pages));

See also ...

Document.Members


SharpPlot 3.71 User Manual: ExtractPages Method (Int32)

Document.ExtractPages Method (Int32)

Create a new Document, extracting a single page.

public Document ExtractPages(
    int page
);

See also ...

Document.Members | Document.ExtractPages Method


SharpPlot 3.71 User Manual: ExtractPages Method (Int32[])

Document.ExtractPages Method (Int32[])

Create a new Document, extracting specified pages.

public Document ExtractPages(
    int[] pages
);

See also ...

Document.Members | Document.ExtractPages Method


SharpPlot 3.71 User Manual: GetCharsets Method

Document.GetCharsets Method

Return the list of used characters for each used font.

public string[][] GetCharsets();

Result

Three string[] lists : fontnames, fontstyles, charsets.

Description

The result is three lists of strings :

  • First is list of font names, as registered by the Operating System
  • Second is corresponding list of fontstyles (one of “Regular” “Bold” “Italic” “Bold, Italic”, as returned by FontStyle.ToString)
  • Third is corresponding list of character subsets.

See also ...

Document.Members


SharpPlot 3.71 User Manual: GetPaperSize Method

Document.GetPaperSize Method

Get largest paper size as a 2-item double vector (width height).

public double[] GetPaperSize();

Result

Largest paper size as a 2-item double vector (width height).

See also ...

Document.Members


SharpPlot 3.71 User Manual: GetPaperSizes Method

Document.GetPaperSizes Method

Get paper sizes as a 2-column matrix of (width height) per page.

public double[,] GetPaperSizes();

Result

Get paper sizes as a 2-column matrix of one (width height) per page.

See also ...

Document.Members


SharpPlot 3.71 User Manual: Prepend Method

Document.Prepend Method

Insert document pages before current.

Overloads

  • public void Prepend(Document doc);
  • public void Prepend(Document doc,int page);
  • public void Prepend(Document doc,int[] pages);

Example

   doc.Prepend(sp.RenderDocument());  // Put a chart as a first page

See also ...

Document.Members


SharpPlot 3.71 User Manual: Prepend Method (Document)

Document.Prepend Method (Document)

Insert given document before current.

public void Prepend(
    Document doc
);
doc
Document to prepend.

See also ...

Document.Members | Document.Prepend Method


SharpPlot 3.71 User Manual: Prepend Method (Document,Int32)

Document.Prepend Method (Document,Int32)

Insert given document page before current.

public void Prepend(
    Document doc,
    int page
);
doc
Document to prepend.
page
Page number to prepend.

See also ...

Document.Members | Document.Prepend Method


SharpPlot 3.71 User Manual: Prepend Method (Document,Int32[])

Document.Prepend Method (Document,Int32[])

Insert document pages before current.

public void Prepend(
    Document doc,
    int[] pages
);
doc
Document to prepend.
pages
Page numbers to prepend, in that order.

See also ...

Document.Members | Document.Prepend Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method

Document.RenderAnimatedSvg Method

Return document rendered as animated SVG, with one frame per page.

If the delay is 0, then the user can flick through pages with keyboard arrows or mouse wheel.

Overloads

  • public string RenderAnimatedSvg();
  • public string RenderAnimatedSvg(double delay);
  • public string RenderAnimatedSvg(double delay,SvgMode mode);
  • public string RenderAnimatedSvg(double delay,SvgMode mode,double dpi);
  • public string RenderAnimatedSvg(double delay,SvgMode mode,double dpi,string header);

Result

Document as animated SVG.

Example

   svg = doc.RenderAnimatedSvg(1); // Render document as animated SVG, 1 second per page;

See also ...

Document.Members | Document.RenderSvg Method | Document.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method

Document.RenderAnimatedSvg Method

Return document as animated SVG at one page per second, with fixed size at 96 dpi.

public string RenderAnimatedSvg();

Result

Document as animated SVG.

See also ...

Document.Members | Document.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double)

Document.RenderAnimatedSvg Method (Double)

Return document as animated SVG with fixed size SVG at 96 dpi.

public string RenderAnimatedSvg(
    double delay
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
return value
Document as animated SVG.

See also ...

Document.Members | Document.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode)

Document.RenderAnimatedSvg Method (Double,SvgMode)

Return document as animated SVG with given aspect setting.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
return value
Document as animated SVG.

See also ...

Document.Members | Document.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode,Double)

Document.RenderAnimatedSvg Method (Double,SvgMode,Double)

Return document as animated SVG with given aspect setting and resolution.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode,
    double dpi
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
return value
Document as animated SVG.

See also ...

Document.Members | Document.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderAnimatedSvg Method (Double,SvgMode,Double,String)

Document.RenderAnimatedSvg Method (Double,SvgMode,Double,String)

Return document rendered as animated SVG, with one frame per page.

public string RenderAnimatedSvg(
    double delay,
    SvgMode mode,
    double dpi,
    string header
);
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
header
Arbitrary SVG code to include before document.
return value
Document as animated SVG.

See also ...

Document.Members | Document.RenderAnimatedSvg Method


SharpPlot 3.71 User Manual: RenderBitmap Method

Document.RenderBitmap Method

Return document rendered through raster engine as a Bitmap object.

Overloads

  • public Bitmap RenderBitmap();
  • public Bitmap RenderBitmap(double dpi);
  • public Bitmap RenderBitmap(double dpi,PageMode pagemode);
  • public Bitmap RenderBitmap(double dpi,PageMode pagemode,TextRenderingHint textmode);

Result

The result of this call is a Bitmap object, rendered by default at 96dpi. Ths is may then be saved to disk in any of the common image formats, typically PNG or JPEG to benefit from image compression. GIF is not recommended for images with gradient fills as it is limited to 256 colours and is likely to show some banding.

For images to be used in printed material, you probably should use at least 300dpi to get acceptable quality.

The text will be anti-aliased by default, but you may over-ride the text-rendering algorithm by passing in the standard .Net rendering hint as a final option.

Example

   doc = lf.RenderDocument(1);  // Firt report page
   bmp=doc.RenderBitmap(300);

See also ...

SharpPlot.RenderBitmap Method | Document.Members | Document.RenderMetafile Method | Document.SaveImage Method


SharpPlot 3.71 User Manual: RenderBitmap Method

Document.RenderBitmap Method

Return Bitmap at 96 dpi.

public Bitmap RenderBitmap();

Result

Document as a Bitmap object.

See also ...

Document.Members | Document.RenderBitmap Method


SharpPlot 3.71 User Manual: RenderBitmap Method (Double)

Document.RenderBitmap Method (Double)

Return Bitmap at given resolution.

public Bitmap RenderBitmap(
    double dpi
);
dpi
Resolution to use, in dots per inch (defaults to 96).
return value
Document as a Bitmap object.

See also ...

Document.Members | Document.RenderBitmap Method


SharpPlot 3.71 User Manual: RenderBitmap Method (Double,PageMode)

Document.RenderBitmap Method (Double,PageMode)

Return Bitmap at given resolution and page mode.

public Bitmap RenderBitmap(
    double dpi,
    PageMode pagemode
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).
return value
Document as a Bitmap object.

See also ...

Document.Members | Document.RenderBitmap Method


SharpPlot 3.71 User Manual: RenderBitmap Method (Double,PageMode,TextRenderingHint)

Document.RenderBitmap Method (Double,PageMode,TextRenderingHint)

Return document rendered through raster engine as a Bitmap object.

public Bitmap RenderBitmap(
    double dpi,
    PageMode pagemode,
    TextRenderingHint textmode
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
return value
Document as a Bitmap object.

See also ...

Document.Members | Document.RenderBitmap Method


SharpPlot 3.71 User Manual: RenderEps Method

Document.RenderEps Method

Return a document page rendered as Encapsulated PostScript.

Overloads

  • public string RenderEps();
  • public string RenderEps(int page);
  • public string RenderEps(int page,bool forceMonochrome);
  • public string RenderEps(int page,bool forceMonochrome,string prologue);

Result

The result of this call is a string representation of an Encapsulated PostScript document. It is a single-page PostScript file that may be written to file as text for inclusion in a compound document which is to be printed on any PostScript device. If the final output is to be monochrome, it is better to have SharpPlot render the chart in black and white at this point, rather than rely on the printer to greyscale it.

Note that this does not save any preview information in the file, so if it is printed on a non-PostScript printer all the images will show only as placeholders, with the chart title and date of creation as notes.

If you require any ‘special’ PostScript to be run on the front of the file, you may include it as the third parameter.

Example

   eps = doc.RenderEps(1);  // Render first page

See also ...

SharpPlot.RenderEps Method | Document.Members | Document.RenderPS Method | Document.SaveEps Method


SharpPlot 3.71 User Manual: RenderEps Method

Document.RenderEps Method

Return first document page as full-color EPS.

public string RenderEps();

Result

Document as Encapsulated PostScript.

See also ...

Document.Members | Document.RenderEps Method


SharpPlot 3.71 User Manual: RenderEps Method (Int32)

Document.RenderEps Method (Int32)

Return specified document page as full-color EPS.

public string RenderEps(
    int page
);
page
Page to render (defaults to 1).
return value
Document as Encapsulated PostScript.

See also ...

Document.Members | Document.RenderEps Method


SharpPlot 3.71 User Manual: RenderEps Method (Int32,Boolean)

Document.RenderEps Method (Int32,Boolean)

Return specified document page as EPS with monochrome switch.

public string RenderEps(
    int page,
    bool forceMonochrome
);
page
Page to render (defaults to 1).
forceMonochrome
Disable color support (defaults to false).
return value
Document as Encapsulated PostScript.

See also ...

Document.Members | Document.RenderEps Method


SharpPlot 3.71 User Manual: RenderEps Method (Int32,Boolean,String)

Document.RenderEps Method (Int32,Boolean,String)

Return a document page rendered as Encapsulated PostScript.

public string RenderEps(
    int page,
    bool forceMonochrome,
    string prologue
);
page
Page to render (defaults to 1).
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before page.
return value
Document as Encapsulated PostScript.

See also ...

Document.Members | Document.RenderEps Method


SharpPlot 3.71 User Manual: RenderLog Method

Document.RenderLog Method

Return document as a readable log.

The optional prescan flag will parse any HTML tagged text into simple settings of font and associated text fragments. It will also ensure 7-bit ASCII output by HTML-encoding any hi-bit or Unicode characters.

The standard log only records drawing instructions – this makes it ideal for text comparison tools to check for changes to graphics output. The optional detail flag will add logging of internal settings (used for animations and JavaScript handlers) if you need to debug these.

Overloads

  • public string RenderLog();
  • public string RenderLog(bool prescan);
  • public string RenderLog(bool prescan,bool detail);

Result

Readable version of internal document macros.

Example

   log = doc.RenderLog();  // Retern document log

See also ...

SharpPlot.RenderChartLog Method | SharpLeaf.RenderLog Method | Document.Members | Document.SaveLog Method


SharpPlot 3.71 User Manual: RenderLog Method

Document.RenderLog Method

Return unprocessed, undetailed log.

public string RenderLog();

Result

Readable version of internal document macros.

See also ...

Document.Members | Document.RenderLog Method


SharpPlot 3.71 User Manual: RenderLog Method (Boolean)

Document.RenderLog Method (Boolean)

Return undetailed log, with optional pre-scan flag.

public string RenderLog(
    bool prescan
);
prescan
Flag to allow the prescan code to run on the intermediate page format.
return value
Readable version of internal document macros.

See also ...

Document.Members | Document.RenderLog Method


SharpPlot 3.71 User Manual: RenderLog Method (Boolean,Boolean)

Document.RenderLog Method (Boolean,Boolean)

Return document as a readable log.

public string RenderLog(
    bool prescan,
    bool detail
);
prescan
Flag to allow the prescan code to run on the intermediate page format.
detail
Flag to allow ids and other detail to be shown in addition to basic logging.
return value
Readable version of internal document macros.

See also ...

Document.Members | Document.RenderLog Method


SharpPlot 3.71 User Manual: RenderMetafile Method

Document.RenderMetafile Method

Return or stream document as one of the Extended Metafile formats.

You may need to experiment with the optimum EmfType parameter. Modern software should read the new GDI+ metafile tags correctly (EmfPlusOnly), but older applications may require the old tags as a fallback (EmfOnly). The default is to use both forms (EmfPlusDual), but this may make the file larger than you need.

Overloads

  • public void RenderMetafile(Stream stream);
  • public void RenderMetafile(Stream stream,PageMode pagemode);
  • public void RenderMetafile(Stream stream,PageMode pagemode,TextRenderingHint textmode);
  • public void RenderMetafile(Stream stream,PageMode pagemode,TextRenderingHint textmode,EmfType emftype);
  • public void RenderMetafile(Stream stream,PageMode pagemode,TextRenderingHint textmode,EmfType emftype,double dpi);
  • public Metafile RenderMetafile();
  • public Metafile RenderMetafile(PageMode pagemode);
  • public Metafile RenderMetafile(PageMode pagemode,TextRenderingHint textmode);
  • public Metafile RenderMetafile(PageMode pagemode,TextRenderingHint textmode,EmfType emftype);
  • public Metafile RenderMetafile(PageMode pagemode,TextRenderingHint textmode,EmfType emftype,double dpi);

Result

The result of this call is a Metafile object which may be used as required to save the chart to file, or display it on an application control such as a PictureBox. There is no result if the user passes a Stream – the EMF content is simply appended to the stream.

Example

   emf=doc.RenderMetafile(PageMode.Horizontal); // Draw pages side-by-side horizontally;

See also ...

SharpPlot.RenderMetafile Method | Document.Members | Document.RenderBitmap Method | Document.SaveImage Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream)

Document.RenderMetafile Method (Stream)

Write document to given Stream as Metafile.

public void RenderMetafile(
    Stream stream
);
stream
Stream to output Metafile to.
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream,PageMode)

Document.RenderMetafile Method (Stream,PageMode)

Write document to given Stream as Metafile with given page mode.

public void RenderMetafile(
    Stream stream,
    PageMode pagemode
);
stream
Stream to output Metafile to.
pagemode
Page layout to use (defaults to PageMode.Vertical).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream,PageMode,TextRenderingHint)

Document.RenderMetafile Method (Stream,PageMode,TextRenderingHint)

Write document to given Stream as Metafile with given page mode and text rendering to given Stream.

public void RenderMetafile(
    Stream stream,
    PageMode pagemode,
    TextRenderingHint textmode
);
stream
Stream to output Metafile to.
pagemode
Page layout to use (defaults to PageMode.Vertical).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream,PageMode,TextRenderingHint,EmfType)

Document.RenderMetafile Method (Stream,PageMode,TextRenderingHint,EmfType)

Write document to given Stream as Metafile with given page mode, text rendering and metafile format to given Stream.

public void RenderMetafile(
    Stream stream,
    PageMode pagemode,
    TextRenderingHint textmode,
    EmfType emftype
);
stream
Stream to output Metafile to.
pagemode
Page layout to use (defaults to PageMode.Vertical).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (Stream,PageMode,TextRenderingHint,EmfType,Double)

Document.RenderMetafile Method (Stream,PageMode,TextRenderingHint,EmfType,Double)

Write document to given Stream as Metafile with given page mode, text rendering, metafile format and resolution to given Stream.

public void RenderMetafile(
    Stream stream,
    PageMode pagemode,
    TextRenderingHint textmode,
    EmfType emftype,
    double dpi
);
stream
Stream to output Metafile to.
pagemode
Page layout to use (defaults to PageMode.Vertical).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
dpi
Metafile resolution in dots per inch (defaults to 96).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method

Document.RenderMetafile Method

Return document as Metafile.

public Metafile RenderMetafile();

Result

Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (PageMode)

Document.RenderMetafile Method (PageMode)

Return document as Metafile with given page mode.

public Metafile RenderMetafile(
    PageMode pagemode
);
pagemode
Page layout to use (defaults to PageMode.Vertical).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (PageMode,TextRenderingHint)

Document.RenderMetafile Method (PageMode,TextRenderingHint)

Return document as Metafile with given page mode and text rendering mode.

public Metafile RenderMetafile(
    PageMode pagemode,
    TextRenderingHint textmode
);
pagemode
Page layout to use (defaults to PageMode.Vertical).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (PageMode,TextRenderingHint,EmfType)

Document.RenderMetafile Method (PageMode,TextRenderingHint,EmfType)

Return document as Metafile with given page mode, text rendering mode and metafile format.

public Metafile RenderMetafile(
    PageMode pagemode,
    TextRenderingHint textmode,
    EmfType emftype
);
pagemode
Page layout to use (defaults to PageMode.Vertical).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderMetafile Method (PageMode,TextRenderingHint,EmfType,Double)

Document.RenderMetafile Method (PageMode,TextRenderingHint,EmfType,Double)

Return or stream document as one of the Extended Metafile formats.

public Metafile RenderMetafile(
    PageMode pagemode,
    TextRenderingHint textmode,
    EmfType emftype,
    double dpi
);
pagemode
Page layout to use (defaults to PageMode.Vertical).
textmode
Text mode to use (defaults to TextRenderingHint.AntiAlias).
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDual).
dpi
Metafile resolution in dots per inch (defaults to 96).
return value
Created Metafile.

See also ...

Document.Members | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: RenderPageMap Method

Document.RenderPageMap Method

Return an instance of the PageMap class with given resolution and page mode.

The resolution is in units per inch, and defaults to 72 for coordinates in points. Use your output DPI setting for coordinates in pixels.

Overloads

  • public PageMap RenderPageMap();
  • public PageMap RenderPageMap(double dpi);
  • public PageMap RenderPageMap(double dpi,PageMode pagemode);

Result

PageMap instance for whole document.

Example

   bmp=doc.RenderBitmap(96); // 96 dots per inch;
   pm = doc.RenderPageMap(96);  // use pixels as coordinates

See also ...

PageMap Class | Document.Members


SharpPlot 3.71 User Manual: RenderPageMap Method

Document.RenderPageMap Method

Return an instance of the PageMap class in points, with vertical page mode.

public PageMap RenderPageMap();

Result

PageMap instance for completed chart.

See also ...

Document.Members | Document.RenderPageMap Method


SharpPlot 3.71 User Manual: RenderPageMap Method (Double)

Document.RenderPageMap Method (Double)

Return an instance of the PageMap class with given resolution and vertical page mode.

public PageMap RenderPageMap(
    double dpi
);
dpi
Resolution of the PageMap unit, in units per inch (defaults to 72 for coordinates in points, use your DPI setting for coordinates in pixels).
return value
PageMap instance for completed chart.

See also ...

Document.Members | Document.RenderPageMap Method


SharpPlot 3.71 User Manual: RenderPageMap Method (Double,PageMode)

Document.RenderPageMap Method (Double,PageMode)

Return an instance of the PageMap class with given resolution and page mode.

public PageMap RenderPageMap(
    double dpi,
    PageMode pagemode
);
dpi
Resolution of the PageMap unit, in units per inch (defaults to 72 for coordinates in points, use your DPI setting for coordinates in pixels).
pagemode
Page layout to use (defaults to PageMode.Vertical).
return value
PageMap instance for completed chart.

See also ...

Document.Members | Document.RenderPageMap Method


SharpPlot 3.71 User Manual: RenderPS Method

Document.RenderPS Method

Return document rendered as raw PostScript.

Overloads

  • public string RenderPS();
  • public string RenderPS(bool forceMonochrome);
  • public string RenderPS(bool forceMonochrome,string prologue);

Result

The result of this call is a string representation of a PostScript document. This may be written to file as text or directly to any PostScript device. If the final output is to be monochrome, it is better to have SharpPlot render the chart in black and white at this point, rather than rely on the printer to greyscale it. The prologue may contain arbitrary PostScript code to include before first page.

Example

   ps = doc.RenderPS();

See also ...

SharpPlot.RenderPS Method | SharpLeaf.RenderPS Method | Document.Members | Document.RenderEps Method | Document.SavePS Method


SharpPlot 3.71 User Manual: RenderPS Method

Document.RenderPS Method

Return PostScript in full color.

public string RenderPS();

Result

Document as PostScript.

See also ...

Document.Members | Document.RenderPS Method


SharpPlot 3.71 User Manual: RenderPS Method (Boolean)

Document.RenderPS Method (Boolean)

Return PostScript with monochrome flag.

public string RenderPS(
    bool forceMonochrome
);
forceMonochrome
Disable color support (defaults to false).
return value
Document as PostScript.

See also ...

Document.Members | Document.RenderPS Method


SharpPlot 3.71 User Manual: RenderPS Method (Boolean,String)

Document.RenderPS Method (Boolean,String)

Return document rendered as raw PostScript.

public string RenderPS(
    bool forceMonochrome,
    string prologue
);
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before first page.
return value
Document as PostScript.

See also ...

Document.Members | Document.RenderPS Method


SharpPlot 3.71 User Manual: RenderPdf Method

Document.RenderPdf Method

Return document as a PDF stream.

The default is to have the document open in the user’s default mode, to embed all non-standard TrueType fonts and to compress the PDF content. You can set the PdfMode to open the outlines window, or to start with the document in full-screen view (useful for presentations).

By default, all fonts except the ‘base-14’ set will be embedded in the document automatically. If you are sure that all your potential viewers will have the fonts you have used, then set the noembed list to the names of the safe fonts, for example “Verdana,Perpetua” would be typical. This will make the document very much smaller, and the Acrobat Reader will usually be quite successful in substituting missing fonts if you are unlucky.

Overloads

  • public string RenderPdf();
  • public string RenderPdf(PdfMode mode);
  • public string RenderPdf(PdfMode mode,bool deflate);
  • public string RenderPdf(PdfMode mode,bool deflate,string noembed);

Result

Document as PDF.

Example

  // Render un-compressed PDF, showing bookmarks
   pdf = doc.RenderPdf(PdfMode.ShowOutlines,false);

Embedding the PDF into a webpage

If you want to write the PDF content directly into a webpage, you should give it the correct content type “application/pdf”, and link to it with an appropriate <embed> tag such as:

<embed src="makepdf.aspx" height=300 width=640 type="application/pdf" >

The PdfMode parameter of RenderPDF should be set to FullScreen here, which causes the Acrobat Reader to occupy the entire frame set up by the <embed> tag with no toolbars or scrollbars. If you render a multipage PDF here, set the flag to ShowOutlines and allow enough extra space for the outline pane and Acrobat Reader toolbars. You will probably need to experiment to get the height and width to look correct.

See also ...

SharpPlot.RenderPdf Method | SharpLeaf.RenderPdf Method | Document.Members | Document.SavePdf Method


SharpPlot 3.71 User Manual: RenderPdf Method

Document.RenderPdf Method

PDF will be opened in user’s default view with all fonts embedded and will be compressed.

public string RenderPdf();

Result

Document as PDF.

See also ...

Document.Members | Document.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode)

Document.RenderPdf Method (PdfMode)

PDF will have all non-native fonts embedded and is compressed.

public string RenderPdf(
    PdfMode mode
);
mode
Controls how the PDF is shown on opening.
return value
Document as PDF.

See also ...

Document.Members | Document.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode,Boolean)

Document.RenderPdf Method (PdfMode,Boolean)

PDF optionally compressed and will open in chosen mode with all fonts embedded.

public string RenderPdf(
    PdfMode mode,
    bool deflate
);
mode
Controls how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
return value
Document as PDF.

See also ...

Document.Members | Document.RenderPdf Method


SharpPlot 3.71 User Manual: RenderPdf Method (PdfMode,Boolean,String)

Document.RenderPdf Method (PdfMode,Boolean,String)

Return document as a PDF stream.

public string RenderPdf(
    PdfMode mode,
    bool deflate,
    string noembed
);
mode
Controls how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
noembed
Selected fonts to be omitted (comma-separated list of names).
return value
Document as PDF.

See also ...

Document.Members | Document.RenderPdf Method


SharpPlot 3.71 User Manual: RenderSvg Method

Document.RenderSvg Method

Return document rendered as SVG.

Overloads

  • public string RenderSvg();
  • public string RenderSvg(SvgMode mode);
  • public string RenderSvg(SvgMode mode,double dpi);
  • public string RenderSvg(SvgMode mode,double dpi,PageMode pagemode);
  • public string RenderSvg(SvgMode mode,double dpi,PageMode pagemode,string header);

Result

The result of this call is a string representation of an SVG document. This may be written to file as text for inclusion in a webpage, or returned via HTTP with content type “image/svg+xml”.

Most modern browsers (including Microsoft Internet Explorer 9 – 2011) natively support SVG. So not only they will display SVG files save with SaveSvg, but you can also inline the string returned by RenderSvg directly into you HTML body.

For compatibility with older browsers, you can embed the SVG using the <embed> tag :

<embed src="mychart.svg" height=300 width=640 type="image/svg+xml">

Example

  // Render SVG at 96 dots per inch, scaled to fit container width, with pages laid vertically.
   svg = doc.RenderSvg(SvgMode.FitWidth,96,PageMode.Vertical);

See also ...

SharpPlot.RenderSvg Method | SharpLeaf.RenderSvg Method | Document.Members | Document.SaveSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method

Document.RenderSvg Method

Return document as fixed size SVG at 96 dpi.

public string RenderSvg();

Result

Document as SVG.

See also ...

Document.Members | Document.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode)

Document.RenderSvg Method (SvgMode)

Return document as SVG with given aspect setting.

public string RenderSvg(
    SvgMode mode
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
return value
Document as SVG.

See also ...

Document.Members | Document.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double)

Document.RenderSvg Method (SvgMode,Double)

Return document as SVG with given aspect setting and resolution.

public string RenderSvg(
    SvgMode mode,
    double dpi
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
return value
Document as SVG.

See also ...

Document.Members | Document.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double,PageMode)

Document.RenderSvg Method (SvgMode,Double,PageMode)

Return document as SVG with given aspect setting, resolution and page mode.

public string RenderSvg(
    SvgMode mode,
    double dpi,
    PageMode pagemode
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
pagemode
Page layout to use (defaults to PageMode.Vertical).
return value
Document as SVG.

See also ...

Document.Members | Document.RenderSvg Method


SharpPlot 3.71 User Manual: RenderSvg Method (SvgMode,Double,PageMode,String)

Document.RenderSvg Method (SvgMode,Double,PageMode,String)

Return document rendered as SVG.

public string RenderSvg(
    SvgMode mode,
    double dpi,
    PageMode pagemode,
    string header
);
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Display resolution to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96 dpi).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary SVG code to include before document.
return value
Document as SVG.

See also ...

Document.Members | Document.RenderSvg Method


SharpPlot 3.71 User Manual: RenderXaml Method

Document.RenderXaml Method

Return document rendered as a XAML Canvas.

Overloads

  • public string RenderXaml();
  • public string RenderXaml(double dpi);
  • public string RenderXaml(double dpi,PageMode pagemode);
  • public string RenderXaml(double dpi,PageMode pagemode,string header);
  • public string RenderXaml(double dpi,PageMode pagemode,string header,bool html);

Result

To make use of this format on the internet you can wrap the XAML content in HTML by setting the html flag to true. The page will reference the silverlight.js file supplied with the plugin, and also the silverplot.js file supplied with SharpPlot. This is very convenient for initial testing, but you will probably want to make your own wrapper page for production use. In any case, the web browser will need a SilverLight plugin.

Example

   xaml = doc.RenderXaml(96);  // Render XAML at 96 dots per inch

See also ...

SharpPlot.RenderXaml Method | SharpLeaf.RenderXaml Method | Document.Members | Document.SaveXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method

Document.RenderXaml Method

Return document as XAML at 96 dpi.

public string RenderXaml();

Result

Completed XAML Canvas containing document.

See also ...

Document.Members | Document.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double)

Document.RenderXaml Method (Double)

Return document as XAML at given resolution.

public string RenderXaml(
    double dpi
);
dpi
Resolution to use, in dots per inch (defaults to 96).
return value
Completed XAML Canvas containing document.

See also ...

Document.Members | Document.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,PageMode)

Document.RenderXaml Method (Double,PageMode)

Return document as XAML with given resolution and page mode.

public string RenderXaml(
    double dpi,
    PageMode pagemode
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
return value
Completed XAML Canvas containing document.

See also ...

Document.Members | Document.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,PageMode,String)

Document.RenderXaml Method (Double,PageMode,String)

Return document as XAML with given resolution, page mode and extra header content.

public string RenderXaml(
    double dpi,
    PageMode pagemode,
    string header
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.
return value
Completed XAML Canvas containing document.

See also ...

Document.Members | Document.RenderXaml Method


SharpPlot 3.71 User Manual: RenderXaml Method (Double,PageMode,String,Boolean)

Document.RenderXaml Method (Double,PageMode,String,Boolean)

Return document rendered as a XAML Canvas.

public string RenderXaml(
    double dpi,
    PageMode pagemode,
    string header,
    bool html
);
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.
html
Wrap XAML Canvas into an HTML page, using Silverlight.js and Silverplot.js (defaults to false).
return value
Completed XAML Canvas containing document.

See also ...

Document.Members | Document.RenderXaml Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method

Document.SaveAnimatedGif Method

Save document rendered through raster engine as an animated GIF file, one frame per page.

Animated GIF cannot be rendered as an in-memory C# object because .Net does not support animated GIF format.

Overloads

  • public void SaveAnimatedGif(string filename);
  • public void SaveAnimatedGif(string filename,double delay);
  • public void SaveAnimatedGif(string filename,double delay,double dpi);
  • public void SaveAnimatedGif(string filename,double delay,double dpi,TextRenderingHint textmode);

Example

   doc.SaveAnimatedGif("document.gif",1,72);
            // Save document as animated gif at 72 DPI, 1 second per page;

See also ...

Document.Members


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String)

Document.SaveAnimatedGif Method (String)

Save animated GIF at 96 dpi, 1 frame per second.

public void SaveAnimatedGif(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double)

Document.SaveAnimatedGif Method (String,Double)

Save animated GIF at given resolution, 1 frame per second.

public void SaveAnimatedGif(
    string filename,
    double delay
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).

See also ...

Document.Members | Document.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double,Double)

Document.SaveAnimatedGif Method (String,Double,Double)

Save animated GIF at given resolution and animation delay.

public void SaveAnimatedGif(
    string filename,
    double delay,
    double dpi
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

Document.Members | Document.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedGif Method (String,Double,Double,TextRenderingHint)

Document.SaveAnimatedGif Method (String,Double,Double,TextRenderingHint)

Save document rendered through raster engine as an animated GIF file, one frame per page.

public void SaveAnimatedGif(
    string filename,
    double delay,
    double dpi,
    TextRenderingHint textmode
);
filename
Name of output file.
delay
Delay between frames in seconds (defaults to 1).
dpi
Resolution to use, in dots per inch (defaults to 96).
textmode
Text rendering mode to use (defaults to TextRenderingHint.AntiAlias).

See also ...

Document.Members | Document.SaveAnimatedGif Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method

Document.SaveAnimatedSvg Method

Save document to named file as animated SVG, with one frame per page.

If the delay is 0, then the user can flick through pages with keyboard arrows or mouse wheel.

Overloads

  • public void SaveAnimatedSvg(string filename);
  • public void SaveAnimatedSvg(string filename,double delay);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode,double dpi);
  • public void SaveAnimatedSvg(string filename,double delay,SvgMode mode,double dpi,string header);

Example

   doc.SaveAnimatedSvg("document.svg",1); // Save document as animated SVG, 1 second per page;

See also ...

Document.Members | Document.RenderAnimatedSvg Method | Document.SaveSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String)

Document.SaveAnimatedSvg Method (String)

Save document as animated SVG at 1 page per second, with fixed size at 96dpi.

public void SaveAnimatedSvg(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double)

Document.SaveAnimatedSvg Method (String,Double)

Save document as animated SVG with fixed size at 96dpi.

public void SaveAnimatedSvg(
    string filename,
    double delay
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).

See also ...

Document.Members | Document.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode)

Document.SaveAnimatedSvg Method (String,Double,SvgMode)

Save document as animated SVG with given aspect ratio setting.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).

See also ...

Document.Members | Document.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode,Double)

Document.SaveAnimatedSvg Method (String,Double,SvgMode,Double)

Save document as animated SVG with given aspect setting and resolution.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode,
    double dpi
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).

See also ...

Document.Members | Document.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveAnimatedSvg Method (String,Double,SvgMode,Double,String)

Document.SaveAnimatedSvg Method (String,Double,SvgMode,Double,String)

Save document to named file as animated SVG, with one frame per page.

public void SaveAnimatedSvg(
    string filename,
    double delay,
    SvgMode mode,
    double dpi,
    string header
);
filename
Name of output file.
delay
Delay between page shifts in seconds (0 will let the user control page shift by keyboard/mouse) (defaults to 1).
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).
header
Arbitrary SVG code to include before document.

See also ...

Document.Members | Document.SaveAnimatedSvg Method


SharpPlot 3.71 User Manual: SaveEps Method

Document.SaveEps Method

Save a document page to named file as Encapsulated PostScript. See the RenderEps method for more information.

Overloads

  • public void SaveEps(string filename);
  • public void SaveEps(string filename,int page);
  • public void SaveEps(string filename,int page,bool forceMonochrome);
  • public void SaveEps(string filename,int page,bool forceMonochrome,string prologue);

Example

   doc.SaveEps("page1.eps",1);  // Save first page as EPS

See also ...

SharpPlot.SaveEps Method | Document.Members | Document.RenderEps Method | Document.SavePS Method


SharpPlot 3.71 User Manual: SaveEps Method (String)

Document.SaveEps Method (String)

Save first document page as full-color EPS.

public void SaveEps(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SaveEps Method


SharpPlot 3.71 User Manual: SaveEps Method (String,Int32)

Document.SaveEps Method (String,Int32)

Save document page as full-color EPS.

public void SaveEps(
    string filename,
    int page
);
filename
Name of output file.
page
Page to display (defaults to 1).

See also ...

Document.Members | Document.SaveEps Method


SharpPlot 3.71 User Manual: SaveEps Method (String,Int32,Boolean)

Document.SaveEps Method (String,Int32,Boolean)

Save document page as EPS with monochrome switch.

public void SaveEps(
    string filename,
    int page,
    bool forceMonochrome
);
filename
Name of output file.
page
Page to display (defaults to 1).
forceMonochrome
Disable color support (defaults to false).

See also ...

Document.Members | Document.SaveEps Method


SharpPlot 3.71 User Manual: SaveEps Method (String,Int32,Boolean,String)

Document.SaveEps Method (String,Int32,Boolean,String)

Save a document page to named file as Encapsulated PostScript.

public void SaveEps(
    string filename,
    int page,
    bool forceMonochrome,
    string prologue
);
filename
Name of output file.
page
Page to display (defaults to 1).
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before page.

See also ...

Document.Members | Document.SaveEps Method


SharpPlot 3.71 User Manual: SaveImage Method

Document.SaveImage Method

Save document rendered through raster engine as an image file.

To prepare an image for publication, you may need a DPI setting of 300-1200 depending on the demands of the repro house. For a chart to be shown on the web, a resolution of 96dpi is generally adequate. The text will be anti-aliased by default, but you may over-ride the text-rendering algorithm by passing in the standard .Net rendering hint as a final option.

For charts saved as Metafiles you may need to experiment with the optimum EmfType parameter. Modern software should read the new GDI+ metafile tags correctly (EmfPlusOnly), but older applications may require the old tags as a fallback (EmfOnly). The default is to use both forms (EmfPlusDual), but this may make the file larger than you need.

Overloads

  • public void SaveImage(string filename);
  • public void SaveImage(string filename,ImageFormat format);
  • public void SaveImage(string filename,ImageFormat format,double dpi);
  • public void SaveImage(string filename,ImageFormat format,double dpi,PageMode pagemode);
  • public void SaveImage(string filename,ImageFormat format,double dpi,PageMode pagemode,TextRenderingHint textmode);
  • public void SaveImage(string filename,ImageFormat format,double dpi,PageMode pagemode,TextRenderingHint textmode,EmfType emftype);

Example

   doc = lf.RenderDocument(1);  // First report page
   doc.SaveImage("page1.png",ImageFormat.Png,96);

See also ...

SharpPlot.SaveImage Method | Document.Members | Document.RenderBitmap Method | Document.RenderMetafile Method


SharpPlot 3.71 User Manual: SaveImage Method (String)

Document.SaveImage Method (String)

Save document as Bitmap at 96 dpi.

public void SaveImage(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat)

Document.SaveImage Method (String,ImageFormat)

Save document at given format at 96 dpi.

public void SaveImage(
    string filename,
    ImageFormat format
);
filename
Name of output file.
format
Image format to use for file.

See also ...

Document.Members | Document.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat,Double)

Document.SaveImage Method (String,ImageFormat,Double)

Save document at given format and resolution.

public void SaveImage(
    string filename,
    ImageFormat format,
    double dpi
);
filename
Name of output file.
format
Image format to use for file.
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

Document.Members | Document.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat,Double,PageMode)

Document.SaveImage Method (String,ImageFormat,Double,PageMode)

Save document with given format, resolution and page mode.

public void SaveImage(
    string filename,
    ImageFormat format,
    double dpi,
    PageMode pagemode
);
filename
Name of output file.
format
Image format to use for file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).

See also ...

Document.Members | Document.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat,Double,PageMode,TextRenderingHint)

Document.SaveImage Method (String,ImageFormat,Double,PageMode,TextRenderingHint)

Save document with given format, resolution, page mode and text rendering mode.

public void SaveImage(
    string filename,
    ImageFormat format,
    double dpi,
    PageMode pagemode,
    TextRenderingHint textmode
);
filename
Name of output file.
format
Image format to use for file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).
textmode
Text rendering mode to use (defaults to TextRenderingHint.AntiAlias).

See also ...

Document.Members | Document.SaveImage Method


SharpPlot 3.71 User Manual: SaveImage Method (String,ImageFormat,Double,PageMode,TextRenderingHint,EmfType)

Document.SaveImage Method (String,ImageFormat,Double,PageMode,TextRenderingHint,EmfType)

Save document rendered through raster engine as an image file.

public void SaveImage(
    string filename,
    ImageFormat format,
    double dpi,
    PageMode pagemode,
    TextRenderingHint textmode,
    EmfType emftype
);
filename
Name of output file.
format
Image format to use for file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).
textmode
Text rendering mode to use (defaults to TextRenderingHint.AntiAlias).
emftype
Specifies the nature of the records that are placed in an EMF (defaults to EmfType.EmfPlusDu.

See also ...

Document.Members | Document.SaveImage Method


SharpPlot 3.71 User Manual: SaveLog Method

Document.SaveLog Method

Save document as a readable log file. See the RenderLog method for more information.

Overloads

  • public void SaveLog(string filename);
  • public void SaveLog(string filename,bool prescan);
  • public void SaveLog(string filename,bool prescan,bool detail);

Example

   doc.SaveLog("mydocument.log");

See also ...

SharpPlot.SaveChartLog Method | SharpLeaf.SaveLog Method | Document.Members | Document.RenderLog Method


SharpPlot 3.71 User Manual: SaveLog Method (String)

Document.SaveLog Method (String)

Save unprocessed, undetailed log.

public void SaveLog(
    string filename
);
filename
Name of output text file.

See also ...

Document.Members | Document.SaveLog Method


SharpPlot 3.71 User Manual: SaveLog Method (String,Boolean)

Document.SaveLog Method (String,Boolean)

Save undetailed log, specifying pre-scan flag.

public void SaveLog(
    string filename,
    bool prescan
);
filename
Name of output text file.
prescan
Flag to allow the prescan code to run on the intermediate page format.

See also ...

Document.Members | Document.SaveLog Method


SharpPlot 3.71 User Manual: SaveLog Method (String,Boolean,Boolean)

Document.SaveLog Method (String,Boolean,Boolean)

Save document as a readable log file.

public void SaveLog(
    string filename,
    bool prescan,
    bool detail
);
filename
Name of output text file.
prescan
Flag to allow the prescan code to run on the intermediate page format.
detail
Flag to allow ids and other detail to be shown in addition to basic logging.

See also ...

Document.Members | Document.SaveLog Method


SharpPlot 3.71 User Manual: SavePS Method

Document.SavePS Method

Save document to named file as raw PostScript. See the RenderPS method for more information.

Overloads

  • public void SavePS(string filename);
  • public void SavePS(string filename,bool forceMonochrome);
  • public void SavePS(string filename,bool forceMonochrome,string prologue);

Example

   doc.SavePS("mydocument.ps");

See also ...

SharpPlot.SavePS Method | SharpLeaf.SavePS Method | Document.Members | Document.RenderPS Method | Document.SaveEps Method


SharpPlot 3.71 User Manual: SavePS Method (String)

Document.SavePS Method (String)

Save PostScript with full colour.

public void SavePS(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SavePS Method


SharpPlot 3.71 User Manual: SavePS Method (String,Boolean)

Document.SavePS Method (String,Boolean)

Save PostScript with monochrome flag.

public void SavePS(
    string filename,
    bool forceMonochrome
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).

See also ...

Document.Members | Document.SavePS Method


SharpPlot 3.71 User Manual: SavePS Method (String,Boolean,String)

Document.SavePS Method (String,Boolean,String)

Save document to named file as raw PostScript.

public void SavePS(
    string filename,
    bool forceMonochrome,
    string prologue
);
filename
Name of output file.
forceMonochrome
Disable color support (defaults to false).
prologue
Arbitrary PostScript code to include before first page.

See also ...

Document.Members | Document.SavePS Method


SharpPlot 3.71 User Manual: SavePdf Method

Document.SavePdf Method

Save document to named file as PDF. See RenderPdf for more information.

Overloads

  • public void SavePdf(string filename);
  • public void SavePdf(string filename,PdfMode mode);
  • public void SavePdf(string filename,PdfMode mode,bool deflate);
  • public void SavePdf(string filename,PdfMode mode,bool deflate,string noembed);

Example

  // Save compressed PDF, showing bookmarks
   doc.SavePdf("mydocument.pdf",PdfMode.ShowOutlines,true);

See also ...

SharpPlot.SavePdf Method | SharpLeaf.RenderPdf Method | Document.Members | Document.RenderPdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String)

Document.SavePdf Method (String)

PDF will be opened in user’s default view with all fonts embedded and will be compressed.

public void SavePdf(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode)

Document.SavePdf Method (String,PdfMode)

PDF will have all non-native fonts embedded and is compressed.

public void SavePdf(
    string filename,
    PdfMode mode
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.

See also ...

Document.Members | Document.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode,Boolean)

Document.SavePdf Method (String,PdfMode,Boolean)

PDF optionally compressed and will open in chosen mode with all fonts embedded.

public void SavePdf(
    string filename,
    PdfMode mode,
    bool deflate
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).

See also ...

Document.Members | Document.SavePdf Method


SharpPlot 3.71 User Manual: SavePdf Method (String,PdfMode,Boolean,String)

Document.SavePdf Method (String,PdfMode,Boolean,String)

Save document to named file as PDF.

public void SavePdf(
    string filename,
    PdfMode mode,
    bool deflate,
    string noembed
);
filename
Name of output file.
mode
Control how the PDF is shown on opening.
deflate
Use file compression (default is true) (turn off to enable saved comments).
noembed
Allow selected fonts to be omitted (comma-separated list of names).

See also ...

Document.Members | Document.SavePdf Method


SharpPlot 3.71 User Manual: SaveSvg Method

Document.SaveSvg Method

Save document to named file as SVG. See the RenderSvg method for more information.

Overloads

  • public void SaveSvg(string filename);
  • public void SaveSvg(string filename,SvgMode mode);
  • public void SaveSvg(string filename,SvgMode mode,double dpi);
  • public void SaveSvg(string filename,SvgMode mode,double dpi,PageMode pagemode);
  • public void SaveSvg(string filename,SvgMode mode,double dpi,PageMode pagemode,string header);

Example

  // Save SVG at 96 dots per inch, scaled to fit container width, with pages laid vertically.
   doc.SaveSvg("mydocument.svg",SvgMode.FitWidth,96,PageMode.Vertical);

See also ...

SharpPlot.SaveSvg Method | SharpLeaf.SaveSvg Method | Document.Members | Document.RenderSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String)

Document.SaveSvg Method (String)

Save document as SVG with fixed size at 96dpi.

public void SaveSvg(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode)

Document.SaveSvg Method (String,SvgMode)

Save document as SVG with given aspect ratio setting.

public void SaveSvg(
    string filename,
    SvgMode mode
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).

See also ...

Document.Members | Document.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double)

Document.SaveSvg Method (String,SvgMode,Double)

Save document as SVG with given aspect setting and resolution.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).

See also ...

Document.Members | Document.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double,PageMode)

Document.SaveSvg Method (String,SvgMode,Double,PageMode)

Save document as SVG with given aspect setting, resolution and page mode.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi,
    PageMode pagemode
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).

See also ...

Document.Members | Document.SaveSvg Method


SharpPlot 3.71 User Manual: SaveSvg Method (String,SvgMode,Double,PageMode,String)

Document.SaveSvg Method (String,SvgMode,Double,PageMode,String)

Save document to named file as SVG.

public void SaveSvg(
    string filename,
    SvgMode mode,
    double dpi,
    PageMode pagemode,
    string header
);
filename
Name of output file.
mode
Aspect setting used to display SVG (defaults to SvgMode.FixedSize).
dpi
Number of pixels per inch to observe when using SvgMode.FixedSize or SvgMode.Shadowed (defaults to 96dpi).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).
header
Arbitrary SVG code to include before document.

See also ...

Document.Members | Document.SaveSvg Method


SharpPlot 3.71 User Manual: SaveXaml Method

Document.SaveXaml Method

Save document to named file as a XAML Canvas. See the RenderXaml method for more information.

Overloads

  • public void SaveXaml(string filename);
  • public void SaveXaml(string filename,double dpi);
  • public void SaveXaml(string filename,double dpi,PageMode pagemode);
  • public void SaveXaml(string filename,double dpi,PageMode pagemode,string header);
  • public void SaveXaml(string filename,double dpi,PageMode pagemode,string header,bool html);

Example

   doc.SaveXaml("mydocument.xaml",96);  // Save XAML at 96 dots per inch

See also ...

SharpPlot.SaveXaml Method | SharpLeaf.SaveXaml Method | PageMode Enumeration | Document.Members | Document.RenderXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String)

Document.SaveXaml Method (String)

Save document as XAML at 96 dpi.

public void SaveXaml(
    string filename
);
filename
Name of output file.

See also ...

Document.Members | Document.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double)

Document.SaveXaml Method (String,Double)

Save document as XAML with given resolution.

public void SaveXaml(
    string filename,
    double dpi
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).

See also ...

Document.Members | Document.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,PageMode)

Document.SaveXaml Method (String,Double,PageMode)

Save document as XAML with given resolution and page mode.

public void SaveXaml(
    string filename,
    double dpi,
    PageMode pagemode
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).

See also ...

Document.Members | Document.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,PageMode,String)

Document.SaveXaml Method (String,Double,PageMode,String)

Save document as XAML with given resolution, page mode, and extra header content.

public void SaveXaml(
    string filename,
    double dpi,
    PageMode pagemode,
    string header
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.

See also ...

Document.Members | Document.SaveXaml Method


SharpPlot 3.71 User Manual: SaveXaml Method (String,Double,PageMode,String,Boolean)

Document.SaveXaml Method (String,Double,PageMode,String,Boolean)

Save document to named file as a XAML Canvas.

public void SaveXaml(
    string filename,
    double dpi,
    PageMode pagemode,
    string header,
    bool html
);
filename
Name of output file.
dpi
Resolution to use, in dots per inch (defaults to 96).
pagemode
Page layout to use for multiple pages (defaults to PageMode.Vertical).
header
Arbitrary XAML code to include at top of Canvas.
html
Wrap XAML Canvas into an HTML page, using Silverlight.js and Silverplot.js (defaults to false).

See also ...

Document.Members | Document.SaveXaml Method


SharpPlot 3.71 User Manual: VectorMath Class

VectorMath Class

This class provides a convenient library of static methods for transforming array data.

public class VectorMath

VectorMath Methods

Catenate | Catenate a vector to another vector (or scalar)
Cos | Compute the cosine of any vector
Difference | Compute the first difference of an integer vector
Divide | Divide two integer vectors
Drop | Create an integer vector by removing count items from an existing integer vector
Enlist | Catenate a list of vectors together
ExponentialSmooth | Simple exponential smooth of existing vector with given smoothing constant
Max | The largest item in an integer vector
Min | The smallest item in an integer vector
MovingAverage | Moving average of an integer vector given period and pad value
MovingTotal | Moving total of an integer vector given period and pad value
Multiply | Multiply two integer vectors
Negate | The negative values of an integer vector
Pow | Power two double vectors
Range | Generate indices from start up to end
Reciprocal | The inverse values of an integer vector
RunningMax | Running maximum of an integer vector
RunningMin | Running minimum of an integer vector
RunningTotal | Running total of an integer vector
Sin | Compute the sine of any vector
Sqrt | Square root of an integer vector
Subtract | Subtract two integer vectors
Sum | Add two integer vectors
Tail | Create an integer vector from the last elements of existing integer vector and new element count
Take | Create an integer vector from an existing integer vector and new element count
Total | Total of an integer vector

Example

Typically you may want to combine several variables in a Scatterplot, or draw a timeseries with a moving average.

BP = new int[] {427,428,427,429,424,418,420,424,416,410,406,409,403,395,389,380,374,369,
  356,362,383,383,382,393,386,398,382,379,380,394,385,381,388,396,404,393,400,413,417,
  414,402,400,400,408,408,406,405,395,392,395,371,392,400,415,413,414,417,428,416,422,
  429,416,414,401,416,406,407,416,421,411,412,406,405,408,414,407,408,414,412,406,395,
  403,400,397,395,405,411,414,408};

pad = sp.MissingValue;
mav12 = VectorMath.MovingAverage(BP,12,pad);
mav20 = VectorMath.MovingAverage(BP,20,pad);

sp.LineGraphStyle = LineGraphStyles.Markers|LineGraphStyles.NoLines;
sp.SetMarkers(Marker.Dot);

sp.DrawLineGraph(BP);

sp.SetLineStyles(LineStyle.Solid);

sp.LineGraphStyle = 0;
sp.DrawLineGraph(new double[][]{mav12,mav20});

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: Catenate Method

VectorMath.Catenate Method

Catenate a vector to another vector (or scalar).

public static double[] Catenate(
    double v1,
    double[] v2
);

Example

series3 = VectorMath.Catenate(series1,series2);

Overloads

  • public static double[] Catenate(double v1,double[] v2);
  • public static double[] Catenate(double[] v1,double v2);
  • public static int[] Catenate(int v1,int[] v2);
  • public static int[] Catenate(int[] v1,int v2);
  • public static double[] Catenate(int[] v1,double v2);
  • public static double[] Catenate(double v1,int[] v2);
  • public static double[] Catenate(double[] v1,double[] v2);
  • public static int[] Catenate(int[] v1,int[] v2);


SharpPlot 3.71 User Manual: Catenate Method (Double,Double[])

VectorMath.Catenate Method (Double,Double[])

Catenate a double scalar to a double vector.

public static double[] Catenate(
    double v1,
    double[] v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Catenate Method (Double[],Double)

VectorMath.Catenate Method (Double[],Double)

Catenate a double vector to a double scalar.

public static double[] Catenate(
    double[] v1,
    double v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Catenate Method (Int32,Int32[])

VectorMath.Catenate Method (Int32,Int32[])

Catenate an integer scalar to an integer vector.

public static int[] Catenate(
    int v1,
    int[] v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Catenate Method (Int32[],Int32)

VectorMath.Catenate Method (Int32[],Int32)

Catenate an integer vector to an integer scalar.

public static int[] Catenate(
    int[] v1,
    int v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Catenate Method (Int32[],Double)

VectorMath.Catenate Method (Int32[],Double)

Catenate a an integer vector to a double scalar.

public static double[] Catenate(
    int[] v1,
    double v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Catenate Method (Double,Int32[])

VectorMath.Catenate Method (Double,Int32[])

Catenate a double scalar to an integer vector.

public static double[] Catenate(
    double v1,
    int[] v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Catenate Method (Double[],Double[])

VectorMath.Catenate Method (Double[],Double[])

Catenate two double vectors.

public static double[] Catenate(
    double[] v1,
    double[] v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Catenate Method (Int32[],Int32[])

VectorMath.Catenate Method (Int32[],Int32[])

Catenate a vector to another vector (or scalar).

public static int[] Catenate(
    int[] v1,
    int[] v2
);

See also ...

VectorMath.Catenate Method


SharpPlot 3.71 User Manual: Cos Method

VectorMath.Cos Method

Compute the cosine of any vector.

Overloads

  • public static double[] Cos(int[] vector);
  • public static double[] Cos(double[] vector);

Example

cos = VectorMath.Cos(series2);


SharpPlot 3.71 User Manual: Cos Method (Int32[])

VectorMath.Cos Method (Int32[])

Cosine of an integer vector.

public static double[] Cos(
    int[] vector
);

See also ...

VectorMath.Cos Method


SharpPlot 3.71 User Manual: Cos Method (Double[])

VectorMath.Cos Method (Double[])

Compute the cosine of any vector.

public static double[] Cos(
    double[] vector
);

See also ...

VectorMath.Cos Method


SharpPlot 3.71 User Manual: Difference Method

VectorMath.Difference Method

Compute the first difference of any vector. The initial value is always zero.

Example

difference = VectorMath.Difference(series1);

Overloads

  • public static int[] Difference(int[] vector);
  • public static double[] Difference(double[] vector);


SharpPlot 3.71 User Manual: Difference Method (Int32[])

VectorMath.Difference Method (Int32[])

Compute the first difference of an integer vector.

public static int[] Difference(
    int[] vector
);

See also ...

VectorMath.Difference Method


SharpPlot 3.71 User Manual: Difference Method (Double[])

VectorMath.Difference Method (Double[])

Compute the first difference a double vector.

public static double[] Difference(
    double[] vector
);

See also ...

VectorMath.Difference Method


SharpPlot 3.71 User Manual: Divide Method

VectorMath.Divide Method

Divide a vector by another vector (or scalar).

Example

series2 = VectorMath.Divide(series1,1000);
series3 = VectorMath.Divide(series1,series2);

Overloads

  • public static double[] Divide(int[] v1,int[] v2);
  • public static double[] Divide(double[] v1,double v2);
  • public static double[] Divide(double v1,double[] v2);
  • public static double[] Divide(int[] v1,int v2);
  • public static double[] Divide(int v1,int[] v2);
  • public static double[] Divide(int[] v1,double v2);
  • public static double[] Divide(double v1,int[] v2);
  • public static double[] Divide(double[] v1,double[] v2);


SharpPlot 3.71 User Manual: Divide Method (Int32[],Int32[])

VectorMath.Divide Method (Int32[],Int32[])

Divide two integer vectors.

public static double[] Divide(
    int[] v1,
    int[] v2
);

See also ...

VectorMath.Divide Method


SharpPlot 3.71 User Manual: Divide Method (Double[],Double)

VectorMath.Divide Method (Double[],Double)

Divide a double vector by a double scalar.

public static double[] Divide(
    double[] v1,
    double v2
);

See also ...

VectorMath.Divide Method


SharpPlot 3.71 User Manual: Divide Method (Double,Double[])

VectorMath.Divide Method (Double,Double[])

Divide a double scalar by a double vector.

public static double[] Divide(
    double v1,
    double[] v2
);

See also ...

VectorMath.Divide Method


SharpPlot 3.71 User Manual: Divide Method (Int32[],Int32)

VectorMath.Divide Method (Int32[],Int32)

Divide an integer vector by an integer scalar.

public static double[] Divide(
    int[] v1,
    int v2
);

See also ...

VectorMath.Divide Method


SharpPlot 3.71 User Manual: Divide Method (Int32,Int32[])

VectorMath.Divide Method (Int32,Int32[])

Divide an integer scalar by an integer vector.

public static double[] Divide(
    int v1,
    int[] v2
);

See also ...

VectorMath.Divide Method


SharpPlot 3.71 User Manual: Divide Method (Int32[],Double)

VectorMath.Divide Method (Int32[],Double)

Divide a double scalar by an integer vector.

public static double[] Divide(
    int[] v1,
    double v2
);

See also ...

VectorMath.Divide Method


SharpPlot 3.71 User Manual: Divide Method (Double,Int32[])

VectorMath.Divide Method (Double,Int32[])

Divide an integer vector by a double scalar.

public static double[] Divide(
    double v1,
    int[] v2
);


SharpPlot 3.71 User Manual: Divide Method (Double[],Double[])

VectorMath.Divide Method (Double[],Double[])

Divide two double vectors.

public static double[] Divide(
    double[] v1,
    double[] v2
);

See also ...

VectorMath.Divide Method


SharpPlot 3.71 User Manual: Drop Method

VectorMath.Drop Method

Create a vector by removing count elements from an existing vector.

Example

series2 = VectorMath.Drop(series1,12);

Overloads

  • public static int[] Drop(int[] existing,int count);
  • public static double[] Drop(double[] existing,int count);


SharpPlot 3.71 User Manual: Drop Method (Int32[],Int32)

VectorMath.Drop Method (Int32[],Int32)

Create an integer vector by removing count items from an existing integer vector.

public static int[] Drop(
    int[] existing,
    int count
);

See also ...

VectorMath.Drop Method


SharpPlot 3.71 User Manual: Drop Method (Double[],Int32)

VectorMath.Drop Method (Double[],Int32)

Create a double vector by removing count items from a given double vector.

public static double[] Drop(
    double[] existing,
    int count
);

See also ...

VectorMath.Drop Method


SharpPlot 3.71 User Manual: Enlist Method

VectorMath.Enlist Method

Catenate a list of vectors together.

public static double[] Enlist(
    double[][] vectors
);

Example

series = VectorMath.Enlist(new double[][]{series1,series2,series3});

Overloads

  • public static double[] Enlist(double[][] vectors);
  • public static int[] Enlist(int[][] vectors);


SharpPlot 3.71 User Manual: Enlist Method (Double[][])

VectorMath.Enlist Method (Double[][])

Catenate a list of double vectors.

public static double[] Enlist(
    double[][] vectors
);

See also ...

VectorMath.Enlist Method


SharpPlot 3.71 User Manual: Enlist Method (Int32[][])

VectorMath.Enlist Method (Int32[][])

Catenate a list of vectors together.

public static int[] Enlist(
    int[][] vectors
);

See also ...

VectorMath.Enlist Method


SharpPlot 3.71 User Manual: ExponentialSmooth Method

VectorMath.ExponentialSmooth Method

Brown’s exponential smoothing with optional smoothing constant (default=0.7).

Example

series2 = VectorMath.ExponentialSmooth(series1);
series2 = VectorMath.ExponentialSmooth(series1,0.5);

Overloads

  • public static double[] ExponentialSmooth(double[] vector,double alpha);
  • public static double[] ExponentialSmooth(double[] vector);
  • public static double[] ExponentialSmooth(int[] vector);
  • public static double[] ExponentialSmooth(int[] vector,double alpha);


SharpPlot 3.71 User Manual: ExponentialSmooth Method (Double[],Double)

VectorMath.ExponentialSmooth Method (Double[],Double)

Simple exponential smooth of existing vector with given smoothing constant.

public static double[] ExponentialSmooth(
    double[] vector,
    double alpha
);

See also ...

VectorMath.ExponentialSmooth Method


SharpPlot 3.71 User Manual: ExponentialSmooth Method (Double[])

VectorMath.ExponentialSmooth Method (Double[])

Exponential smooth of double vector with alpha=0.7.

public static double[] ExponentialSmooth(
    double[] vector
);

See also ...

VectorMath.ExponentialSmooth Method


SharpPlot 3.71 User Manual: ExponentialSmooth Method (Int32[])

VectorMath.ExponentialSmooth Method (Int32[])

Exponential smooth of integer vector with alpha=0.7.

public static double[] ExponentialSmooth(
    int[] vector
);

See also ...

VectorMath.ExponentialSmooth Method


SharpPlot 3.71 User Manual: ExponentialSmooth Method (Int32[],Double)

VectorMath.ExponentialSmooth Method (Int32[],Double)

Exponential smooth of integer vector with given smoothing constant.

public static double[] ExponentialSmooth(
    int[] vector,
    double alpha
);

See also ...

VectorMath.ExponentialSmooth Method


SharpPlot 3.71 User Manual: Max Method

VectorMath.Max Method

Find the largest item in the content of any vector.

Example

biggest = VectorMath.Max(series1);
series2 = VectorMath.RunningMax(series1);

Overloads

  • public static int Max(int[] vector);
  • public static double Max(double[] vector);


SharpPlot 3.71 User Manual: Max Method (Int32[])

VectorMath.Max Method (Int32[])

The largest item in an integer vector.

public static int Max(
    int[] vector
);

See also ...

VectorMath.Max Method


SharpPlot 3.71 User Manual: Max Method (Double[])

VectorMath.Max Method (Double[])

The largest item in a double vector.

public static double Max(
    double[] vector
);

See also ...

VectorMath.Max Method


SharpPlot 3.71 User Manual: Min Method

VectorMath.Min Method

Find the smallest item in the content of any vector.

Example

smallest = VectorMath.Min(series1);
series2 = VectorMath.RunningMin(series1);

Overloads

  • public static int Min(int[] vector);
  • public static double Min(double[] vector);


SharpPlot 3.71 User Manual: Min Method (Int32[])

VectorMath.Min Method (Int32[])

The smallest item in an integer vector.

public static int Min(
    int[] vector
);

See also ...

VectorMath.Min Method


SharpPlot 3.71 User Manual: Min Method (Double[])

VectorMath.Min Method (Double[])

The smallest item in a double vector.

public static double Min(
    double[] vector
);

See also ...

VectorMath.Min Method


SharpPlot 3.71 User Manual: MovingAverage Method

VectorMath.MovingAverage Method

Scan the content of any vector to give a moving average with given window and optional padding.

Example

series3 = VectorMath.MovingAverage(series1,12);
series3 = VectorMath.MovingAverage(series1,12,-32768);

Overloads

  • public static double[] MovingAverage(int[] vector,int window,double padding);
  • public static double[] MovingAverage(int[] vector,int window);
  • public static double[] MovingAverage(double[] vector,int window);
  • public static double[] MovingAverage(double[] vector,int window,double padding);


SharpPlot 3.71 User Manual: MovingAverage Method (Int32[],Int32,Double)

VectorMath.MovingAverage Method (Int32[],Int32,Double)

Moving average of an integer vector given period and pad value.

public static double[] MovingAverage(
    int[] vector,
    int window,
    double padding
);

See also ...

VectorMath.MovingAverage Method


SharpPlot 3.71 User Manual: MovingAverage Method (Int32[],Int32)

VectorMath.MovingAverage Method (Int32[],Int32)

Moving average of an integer vector with a given window.

public static double[] MovingAverage(
    int[] vector,
    int window
);

See also ...

VectorMath.MovingAverage Method


SharpPlot 3.71 User Manual: MovingAverage Method (Double[],Int32)

VectorMath.MovingAverage Method (Double[],Int32)

Moving average of a double vector with a given window.

public static double[] MovingAverage(
    double[] vector,
    int window
);

See also ...

VectorMath.MovingAverage Method


SharpPlot 3.71 User Manual: MovingAverage Method (Double[],Int32,Double)

VectorMath.MovingAverage Method (Double[],Int32,Double)

Moving average of a double vector with a given window and pad value.

public static double[] MovingAverage(
    double[] vector,
    int window,
    double padding
);

See also ...

VectorMath.MovingAverage Method


SharpPlot 3.71 User Manual: MovingTotal Method

VectorMath.MovingTotal Method

Sum the content of any vector to give a moving total with given window and optional padding.

Example

series3 = VectorMath.MovingTotal(series1,12);
series3 = VectorMath.MovingTotal(series1,12,-1);

Overloads

  • public static int[] MovingTotal(int[] vector,int window,int padding);
  • public static int[] MovingTotal(int[] vector,int window);
  • public static double[] MovingTotal(double[] vector,int window);
  • public static double[] MovingTotal(double[] vector,int window,int padding);


SharpPlot 3.71 User Manual: MovingTotal Method (Int32[],Int32,Int32)

VectorMath.MovingTotal Method (Int32[],Int32,Int32)

Moving total of an integer vector given period and pad value.

public static int[] MovingTotal(
    int[] vector,
    int window,
    int padding
);

See also ...

VectorMath.MovingTotal Method


SharpPlot 3.71 User Manual: MovingTotal Method (Int32[],Int32)

VectorMath.MovingTotal Method (Int32[],Int32)

Moving total of an integer vector with a given window.

public static int[] MovingTotal(
    int[] vector,
    int window
);

See also ...

VectorMath.MovingTotal Method


SharpPlot 3.71 User Manual: MovingTotal Method (Double[],Int32)

VectorMath.MovingTotal Method (Double[],Int32)

Moving total of a double vector with a given window.

public static double[] MovingTotal(
    double[] vector,
    int window
);

See also ...

VectorMath.MovingTotal Method


SharpPlot 3.71 User Manual: MovingTotal Method (Double[],Int32,Int32)

VectorMath.MovingTotal Method (Double[],Int32,Int32)

Moving total of a double vector with a given window and pad value.

public static double[] MovingTotal(
    double[] vector,
    int window,
    int padding
);

See also ...

VectorMath.MovingTotal Method


SharpPlot 3.71 User Manual: Multiply Method

VectorMath.Multiply Method

Multiply a vector by another vector (or scalar).

Example

series2 = VectorMath.Multiply(series1,10);
series3 = VectorMath.Multiply(series1,series2);

Overloads

  • public static int[] Multiply(int[] v1,int[] v2);
  • public static double[] Multiply(double[] v1,double v2);
  • public static double[] Multiply(double v1,double[] v2);
  • public static int[] Multiply(int[] v1,int v2);
  • public static int[] Multiply(int v1,int[] v2);
  • public static double[] Multiply(int[] v1,double v2);
  • public static double[] Multiply(double[] v1,double[] v2);


SharpPlot 3.71 User Manual: Multiply Method (Int32[],Int32[])

VectorMath.Multiply Method (Int32[],Int32[])

Multiply two integer vectors.

public static int[] Multiply(
    int[] v1,
    int[] v2
);

See also ...

VectorMath.Multiply Method


SharpPlot 3.71 User Manual: Multiply Method (Double[],Double)

VectorMath.Multiply Method (Double[],Double)

Multiply a double vector by a double scalar.

public static double[] Multiply(
    double[] v1,
    double v2
);

See also ...

VectorMath.Multiply Method


SharpPlot 3.71 User Manual: Multiply Method (Double,Double[])

VectorMath.Multiply Method (Double,Double[])

Multiply a double scalar by a double vector.

public static double[] Multiply(
    double v1,
    double[] v2
);

See also ...

VectorMath.Multiply Method


SharpPlot 3.71 User Manual: Multiply Method (Int32[],Int32)

VectorMath.Multiply Method (Int32[],Int32)

Multiply an integer vector by an integer scalar.

public static int[] Multiply(
    int[] v1,
    int v2
);

See also ...

VectorMath.Multiply Method


SharpPlot 3.71 User Manual: Multiply Method (Int32,Int32[])

VectorMath.Multiply Method (Int32,Int32[])

Multiply an integer scalar by an integer vector.

public static int[] Multiply(
    int v1,
    int[] v2
);

See also ...

VectorMath.Multiply Method


SharpPlot 3.71 User Manual: Multiply Method (Int32[],Double)

VectorMath.Multiply Method (Int32[],Double)

Multiply an integer vector by a double scalar.

public static double[] Multiply(
    int[] v1,
    double v2
);

See also ...

VectorMath.Multiply Method


SharpPlot 3.71 User Manual: Multiply Method (Double,Int32[])

VectorMath.Multiply Method (Double,Int32[])

Multiply a double scalar by an integer vector.

public static double[] Multiply(
    double v1,
    int32[] v2
);


SharpPlot 3.71 User Manual: Multiply Method (Double[],Double[])

VectorMath.Multiply Method (Double[],Double[])

Multiply two double vectors.

public static double[] Multiply(
    double[] v1,
    double[] v2
);

See also ...

VectorMath.Multiply Method


SharpPlot 3.71 User Manual: Negate Method

VectorMath.Negate Method

Compute the negative of any vector.

Example

negative = VectorMath.Negate(series3);

Overloads

  • public static int[] Negate(int[] vector);
  • public static double[] Negate(double[] vector);


SharpPlot 3.71 User Manual: Negate Method (Int32[])

VectorMath.Negate Method (Int32[])

Compute the negative of an integer vector.

public static int[] Negate(
    int[] vector
);


SharpPlot 3.71 User Manual: Negate Method (Double[])

VectorMath.Negate Method (Double[])

Compute the negative a double vector.

public static double[] Negate(
    double[] vector
);


SharpPlot 3.71 User Manual: Pow Method

VectorMath.Pow Method

Raise a vector to a given power.

Example

series2 = VectorMath.Pow(series1,2);

Overloads

  • public static double[] Pow(int[] vector,double power);
  • public static double[] Pow(double[] vector,double power);


SharpPlot 3.71 User Manual: Pow Method (Int32[],Double)

VectorMath.Pow Method (Int32[],Double)

Raise an integer vector to a given power.

public static double[] Pow(
    int[] vector,
    double power
);

See also ...

VectorMath.Pow Method


SharpPlot 3.71 User Manual: Pow Method (Double[],Double)

VectorMath.Pow Method (Double[],Double)

Raise a double vector to a given power.

public static double[] Pow(
    double[] vector,
    double power
);

See also ...

VectorMath.Pow Method


SharpPlot 3.71 User Manual: Range Method

VectorMath.Range Method

Generate indices from start up to end.

public static int[] Range(
    int from,
    int to
);


SharpPlot 3.71 User Manual: Reciprocal Method

VectorMath.Reciprocal Method

Compute the inverse of any vector.

Example

inverse = VectorMath.Reciprocal(series3);

Overloads

  • public static int[] Reciprocal(int[] vector);
  • public static double[] Reciprocal(double[] vector);


SharpPlot 3.71 User Manual: Reciprocal Method (Int32[])

VectorMath.Reciprocal Method (Int32[])

Compute the inverse of an integer vector.

public static double[] Reciprocal(
    int[] vector
);


SharpPlot 3.71 User Manual: Reciprocal Method (Double[])

VectorMath.Reciprocal Method (Double[])

Compute the inverse of a double vector.

public static double[] Reciprocal(
    double[] vector
);


SharpPlot 3.71 User Manual: RunningMax Method

VectorMath.RunningMax Method

Scan the content of any vector to give a running maximum.

Example

series2 = VectorMath.RunningMax(series1);

Overloads

  • public static int[] RunningMax(int[] vector);
  • public static double[] RunningMax(double[] vector);


SharpPlot 3.71 User Manual: RunningMax Method (Int32[])

VectorMath.RunningMax Method (Int32[])

Running maximum of an integer vector.

public static int[] RunningMax(
    int[] vector
);

See also ...

VectorMath.RunningMax Method


SharpPlot 3.71 User Manual: RunningMax Method (Double[])

VectorMath.RunningMax Method (Double[])

Running maximum of a double vector.

public static double[] RunningMax(
    double[] vector
);

See also ...

VectorMath.RunningMax Method


SharpPlot 3.71 User Manual: RunningMin Method

VectorMath.RunningMin Method

Scan the content of any vector to give a running minimum.

Example

series2 = VectorMath.RunningMin(series1);

Overloads

  • public static int[] RunningMin(int[] vector);
  • public static double[] RunningMin(double[] vector);


SharpPlot 3.71 User Manual: RunningMin Method (Int32[])

VectorMath.RunningMin Method (Int32[])

Running minimum of an integer vector.

public static int[] RunningMin(
    int[] vector
);

See also ...

VectorMath.RunningMin Method


SharpPlot 3.71 User Manual: RunningMin Method (Double[])

VectorMath.RunningMin Method (Double[])

Running minimum of a double vector.

public static double[] RunningMin(
    double[] vector
);

See also ...

VectorMath.RunningMin Method


SharpPlot 3.71 User Manual: RunningTotal Method

VectorMath.RunningTotal Method

Sum the content of any vector to give a running total.

Example

series2 = VectorMath.RunningTotal(series1);

Overloads

  • public static int[] RunningTotal(int[] vector);
  • public static double[] RunningTotal(double[] vector);


SharpPlot 3.71 User Manual: RunningTotal Method (Int32[])

VectorMath.RunningTotal Method (Int32[])

Running total of an integer vector.

public static int[] RunningTotal(
    int[] vector
);

See also ...

VectorMath.RunningTotal Method


SharpPlot 3.71 User Manual: RunningTotal Method (Double[])

VectorMath.RunningTotal Method (Double[])

Running total of a double vector.

public static double[] RunningTotal(
    double[] vector
);

See also ...

VectorMath.RunningTotal Method


SharpPlot 3.71 User Manual: Sin Method

VectorMath.Sin Method

Compute the sine of any vector.

Overloads

  • public static double[] Sin(int[] vector);
  • public static double[] Sin(double[] vector);

Example

sin = VectorMath.Sin(series1);


SharpPlot 3.71 User Manual: Sin Method (Int32[])

VectorMath.Sin Method (Int32[])

Sine of an integer vector.

public static double[] Sin(
    int[] vector
);

See also ...

VectorMath.Sin Method


SharpPlot 3.71 User Manual: Sin Method (Double[])

VectorMath.Sin Method (Double[])

Compute the sine of any vector.

public static double[] Sin(
    double[] vector
);

See also ...

VectorMath.Sin Method


SharpPlot 3.71 User Manual: Sqrt Method

VectorMath.Sqrt Method

Compute the square root of any vector.

Example

series2 = VectorMath.Sqrt(series1);

Overloads

  • public static double[] Sqrt(int[] vector);
  • public static double[] Sqrt(double[] vector);


SharpPlot 3.71 User Manual: Sqrt Method (Int32[])

VectorMath.Sqrt Method (Int32[])

Square root of an integer vector.

public static double[] Sqrt(
    int[] vector
);

See also ...

VectorMath.Sqrt Method


SharpPlot 3.71 User Manual: Sqrt Method (Double[])

VectorMath.Sqrt Method (Double[])

Square root of a double vector.

public static double[] Sqrt(
    double[] vector
);

See also ...

VectorMath.Sqrt Method


SharpPlot 3.71 User Manual: Subtract Method

VectorMath.Subtract Method

Subtract a vector from another vector (or scalar).

Example

series2 = VectorMath.Subtract(series1,10);
series3 = VectorMath.Subtract(series1,series2);

Overloads

  • public static int[] Subtract(int[] v1,int[] v2);
  • public static double[] Subtract(double v1,double[] v2);
  • public static double[] Subtract(double[] v1,double v2);
  • public static int[] Subtract(int v1,int[] v2);
  • public static int[] Subtract(int[] v1,int v2);
  • public static double[] Subtract(int[] v1,double v2);
  • public static double[] Subtract(double[] v1,double[] v2);


SharpPlot 3.71 User Manual: Subtract Method (Int32[],Int32[])

VectorMath.Subtract Method (Int32[],Int32[])

Subtract two integer vectors.

public static int[] Subtract(
    int[] v1,
    int[] v2
);

See also ...

VectorMath.Subtract Method


SharpPlot 3.71 User Manual: Subtract Method (Double,Double[])

VectorMath.Subtract Method (Double,Double[])

Subtract a double scalar from a double vector.

public static double[] Subtract(
    double v1,
    double[] v2
);

See also ...

VectorMath.Subtract Method


SharpPlot 3.71 User Manual: Subtract Method (Double[],Double)

VectorMath.Subtract Method (Double[],Double)

Subtract a double vector from a double scalar.

public static double[] Subtract(
    double[] v1,
    double v2
);

See also ...

VectorMath.Subtract Method


SharpPlot 3.71 User Manual: Subtract Method (Int32,Int32[])

VectorMath.Subtract Method (Int32,Int32[])

Subtract an integer scalar from an integer vector.

public static int[] Subtract(
    int v1,
    int[] v2
);

See also ...

VectorMath.Subtract Method


SharpPlot 3.71 User Manual: Subtract Method (Int32[],Int32)

VectorMath.Subtract Method (Int32[],Int32)

Subtract an integer vector from an integer scalar.

public static int[] Subtract(
    int[] v1,
    int v2
);

See also ...

VectorMath.Subtract Method


SharpPlot 3.71 User Manual: Subtract Method (Int32[],Double)

VectorMath.Subtract Method (Int32[],Double)

Subtract a double scalar from an integer vector.

public static double[] Subtract(
    int[] v1,
    double v2
);

See also ...

VectorMath.Subtract Method


SharpPlot 3.71 User Manual: Subtract Method (Double,Int32[])

VectorMath.Subtract Method (Double,Int32[])

Subtract an integer vector from a double scalar.

public static double[] Subtract(
    double v1,
    int[] v2
);


SharpPlot 3.71 User Manual: Subtract Method (Double[],Double[])

VectorMath.Subtract Method (Double[],Double[])

Subtract two double vectors.

public static double[] Subtract(
    double[] v1,
    double[] v2
);

See also ...

VectorMath.Subtract Method


SharpPlot 3.71 User Manual: Sum Method

VectorMath.Sum Method

Add a vector to another vector (or scalar).

Example

series2 = VectorMath.Sum(series1,100);
series3 = VectorMath.Sum(series1,series2);

Overloads

  • public static int[] Sum(int[] v1,int[] v2);
  • public static double[] Sum(double v1,double[] v2);
  • public static double[] Sum(double[] v1,double v2);
  • public static int[] Sum(int v1,int[] v2);
  • public static int[] Sum(int[] v1,int v2);
  • public static double[] Sum(int[] v1,double v2);
  • public static double[] Sum(double v1,int[] v2);
  • public static double[] Sum(double[] v1,double[] v2);


SharpPlot 3.71 User Manual: Sum Method (Int32[],Int32[])

VectorMath.Sum Method (Int32[],Int32[])

Add two integer vectors.

public static int[] Sum(
    int[] v1,
    int[] v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Sum Method (Double,Double[])

VectorMath.Sum Method (Double,Double[])

Add a double scalar to a double vector.

public static double[] Sum(
    double v1,
    double[] v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Sum Method (Double[],Double)

VectorMath.Sum Method (Double[],Double)

Add a double vector to a double scalar.

public static double[] Sum(
    double[] v1,
    double v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Sum Method (Int32,Int32[])

VectorMath.Sum Method (Int32,Int32[])

Add an integer scalar to an integer vector.

public static int[] Sum(
    int v1,
    int[] v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Sum Method (Int32[],Int32)

VectorMath.Sum Method (Int32[],Int32)

Add an integer vector to an integer scalar.

public static int[] Sum(
    int[] v1,
    int v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Sum Method (Int32[],Double)

VectorMath.Sum Method (Int32[],Double)

Add a an integer vector to a double scalar.

public static double[] Sum(
    int[] v1,
    double v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Sum Method (Double,Int32[])

VectorMath.Sum Method (Double,Int32[])

Add a double scalar to an integer vector.

public static double[] Sum(
    double v1,
    int[] v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Sum Method (Double[],Double[])

VectorMath.Sum Method (Double[],Double[])

Add two double vectors.

public static double[] Sum(
    double[] v1,
    double[] v2
);

See also ...

VectorMath.Sum Method


SharpPlot 3.71 User Manual: Tail Method

VectorMath.Tail Method

Create a vector from the last count elements of an existing vector.

Example

series2 = VectorMath.Tail(series1,100);

Overloads

  • public static int[] Tail(int[] existing,int count);
  • public static double[] Tail(double[] existing,int count);


SharpPlot 3.71 User Manual: Tail Method (Int32[],Int32)

VectorMath.Tail Method (Int32[],Int32)

Create an integer vector from the last elements of existing integer vector and new element count.

public static int[] Tail(
    int[] existing,
    int count
);

See also ...

VectorMath.Tail Method


SharpPlot 3.71 User Manual: Tail Method (Double[],Int32)

VectorMath.Tail Method (Double[],Int32)

Create a double vector from the last count items of a double vector.

public static double[] Tail(
    double[] existing,
    int count
);

See also ...

VectorMath.Tail Method


SharpPlot 3.71 User Manual: Take Method

VectorMath.Take Method

Create a vector given existing content and new length, padding with zero if required.

Example

series2 = VectorMath.Take(series1,100);

Overloads

  • public static int[] Take(int[] existing,int count);
  • public static double[] Take(double[] existing,int count);


SharpPlot 3.71 User Manual: Take Method (Int32[],Int32)

VectorMath.Take Method (Int32[],Int32)

Create an integer vector from an existing integer vector and new element count.

public static int[] Take(
    int[] existing,
    int count
);

See also ...

VectorMath.Take Method


SharpPlot 3.71 User Manual: Take Method (Double[],Int32)

VectorMath.Take Method (Double[],Int32)

Create a double vector from double vector and count.

public static double[] Take(
    double[] existing,
    int count
);

See also ...

VectorMath.Take Method


SharpPlot 3.71 User Manual: Total Method

VectorMath.Total Method

Sum the content of any vector.

Example

series3 = VectorMath.MovingTotal(series1,12);
series3 = VectorMath.MovingTotal(series1,12,-1);
series2 = VectorMath.RunningTotal(series1);
total = VectorMath.Total(series1);

Overloads

  • public static int Total(int[] vector);
  • public static double Total(double[] vector);


SharpPlot 3.71 User Manual: Total Method (Int32[])

VectorMath.Total Method (Int32[])

Total of an integer vector.

public static int[] MovingTotal(
    int[] vector,
    int window,
    int padding
);

See also ...

VectorMath.Total Method


SharpPlot 3.71 User Manual: Total Method (Double[])

VectorMath.Total Method (Double[])

Total of a double vector.

public static int[] MovingTotal(
    int[] vector,
    int window
);


SharpPlot 3.71 User Manual: DbUtil Class

DbUtil Class

This class provides a small set of static methods for extracting array data from database tables. See the tutorial on aggregating data for some worked examples.

public class DbUtil

DbUtil Methods

GetIntegers
GetDoubles
GetStrings

Example

 sp.Reset(240,160);
 sp.SetMargins(24,18,24,4);
 filler = (int)sp.MissingValue;

 mytable = new DataTable(); // Get some real data here!;
 myselection = mytable.Select("year>2006 AND symb='BP'");
 int[] BP = DbUtil.GetIntegers(myselection,filler,"SharePrice");

 sp.Heading = "BP";
 sp.HeadingStyle = HeadingStyles.Right;
 sp.DrawLineGraph(BP);

This example simply retrieves one complete column from the current selection, using SharpPlot’s missing value setting to replace any DBNull values in the data.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


SharpPlot 3.71 User Manual: GetDoubles Method

DbUtil.GetDoubles Method

Get one or more Double columns from a Selection, with optional missing value filler.

Example

 sp.Reset(240,160);
 sp.SetMargins(24,18,24,4);
 filler = sp.MissingValue;

 mytable = new DataTable(); // Get some real data here!;
 myselection = mytable.Select("year>2006 AND symb='BP'");
 DbUtil.GetDoubles(myselection,filler,"SharePrice");

 sp.Heading = "BP";
 sp.HeadingStyle = HeadingStyles.Right;
 sp.DrawLineGraph(BP);

Overloads

  • public static double[][] GetDoubles(DataRow[] sel,double nullFiller,string[] cols);
  • public static double[][] GetDoubles(DataRow[] sel,string[] cols);
  • public static double[] GetDoubles(DataRow[] sel,double nullFiller,string cols);
  • public static double[] GetDoubles(DataRow[] sel,string cols);

Description

This example retrieves a single column of data as a simple array of doubles, with any missing data (DBNull values) replaced with the current SharpPlot missing value property. You can also retrieve multiple columns in a single call which is ideal as a way of plotting several parallel series.

See also ...

DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetDoubles Method (DataRow[],Double,String[])

DbUtil.GetDoubles Method (DataRow[],Double,String[])

Get several columns from a Selection as a Double array of arrays with supplied missing value filler.

 public static double[][] GetDoubles(
    DataRow[] sel,
    double nullFiller,
    string[] cols
);

See also ...

DbUtil.GetDoubles Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetDoubles Method (DataRow[],String[][])

DbUtil.GetDoubles Method (DataRow[],String[][])

Get several columns from a Selection as a Double array of arrays with missing values replaced with zero.

public static double[][] GetDoubles(
    DataRow[] sel,
    string[] cols
);

See also ...

DbUtil.GetDoubles Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetDoubles Method (DataRow[],Double,String)

DbUtil.GetDoubles Method (DataRow[],Double,String)

Get one column from a Selection as a Double array with supplied missing value filler.

 public static double[] GetDoubles(
    DataRow[] sel,
    double nullFiller,
    string cols
);

See also ...

DbUtil.GetDoubles Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetDoubles Method (DataRow[],String)

DbUtil.GetDoubles Method (DataRow[],String)

Get one column from a Selection as a Double array with missing values replaced by zero.

 public static double[] GetDoubles(
    DataRow[] sel,
    string cols
);

See also ...

DbUtil.GetDoubles Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetIntegers Method

DbUtil.GetIntegers Method

Get one or more Integer columns from a Selection, with optional missing value filler.

Example

 sp.Reset(240,160);
 sp.SetMargins(24,18,24,4);

 mytable = new DataTable(); // Get some real data here!;
 myselection = mytable.Select("year>2006 AND symb='BP'");
 DbUtil.GetIntegers(myselection,"SharePrice");

 sp.Heading = "BP";
 sp.HeadingStyle = HeadingStyles.Right;
 sp.DrawLineGraph(BP);

Overloads

  • public static int[][] GetIntegers(DataRow[] sel,int nullFiller,string[] cols);
  • public static int[][] GetIntegers(DataRow[] sel,string[] cols);
  • public static int[] GetIntegers(DataRow[] sel,int nullFiller,string cols);
  • public static int[] GetIntegers(DataRow[] sel,string cols);

Description

This example retrieves a single column of data as a simple array of integers, with any missing data (DBNull values) replaced with zero. You can also retrieve multiple columns in a single call which is ideal as a way of plotting several parallel series. Floating point data is rounded to the nearest integer.

See also ...

DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetIntegers Method (DataRow[],Int32,String[])

DbUtil.GetIntegers Method (DataRow[],Int32,String[])

Get several columns from a Selection as an Integer array of arrays with supplied missing value filler.

 public static int[][] GetIntegers(
    DataRow[] sel,
    int nullFiller,
    string[] cols
);

See also ...

DbUtil.GetIntegers Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetIntegers Method (DataRow[],String[][])

DbUtil.GetIntegers Method (DataRow[],String[][])

Get several columns from a Selection as an Integer array of arrays with missing values replaced with zero.

public static int[][] GetIntegers(
    DataRow[] sel,
    string[] cols
);

See also ...

DbUtil.GetIntegers Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetIntegers Method (DataRow[],Int32,String)

DbUtil.GetIntegers Method (DataRow[],Int32,String)

Get one column from a Selection as an Integer array with supplied missing value filler.

 public static int[] GetIntegers(
    DataRow[] sel,
    int nullFiller,
    string cols
);

See also ...

DbUtil.GetIntegers Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetIntegers Method (DataRow[],String)

DbUtil.GetIntegers Method (DataRow[],String)

Get one column from a Selection as an Integer array with missing values replaced by zero.

 public static int[] GetIntegers(
    DataRow[] sel,
    string cols
);

See also ...

DbUtil.GetIntegers Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetStrings Method

DbUtil.GetStrings Method

Get one or more String columns from a Selection, with optional missing value filler. By default, the empty string is used to replace any DBNull values in the chosen column.

Example

 sp.Reset(240,160);
 sp.SetMargins(24,18,24,4);
 filler = (int)sp.MissingValue;

 mytable = new DataTable(); // Get some real data here!;
 myselection = mytable.Select("symb='BP'");

 string[] xlabs = DbUtil.GetStrings(myselection,"Year");

 sp.SetXLabels(xlabs);
 sp.DrawBarChart(BPAnnualEarnings);

Overloads

  • public static string[][] GetStrings(DataRow[] sel,string nullFiller,params string[] cols);
  • public static string[][] GetStrings(DataRow[] sel,params string[] cols);
  • public static string[] GetStrings(DataRow[] sel,string nullFiller,string cols);
  • public static string[] GetStrings(DataRow[] sel,string cols);

Description

Retrieves data from a data table selection in a form suitable for creating axis labels (single or multiple lines). The array of arrays of strings is ideal for use with spanned X-labels, for example:

string[][] labs = DbUtil.GetStrings(myselection,"Months","Quarters","Years");

If only one column is requested, the data is returned as a simple array of labels. It a numeric column is requested, it is returned as strings by running its default ToString method.

See also ...

Spanned Labels | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetStrings Method (DataRow[],String,String[])

DbUtil.GetStrings Method (DataRow[],String,String[])

Get several columns from a Selection as a String array of arrays with supplied missing value filler.

 public static string[][] GetStrings(
    DataRow[] sel,
    string nullFiller,
    string[] cols
);

See also ...

DbUtil.GetStrings Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetStrings Method (DataRow[],String[][])

DbUtil.GetStrings Method (DataRow[],String[][])

Get several columns from a Selection as a String array of arrays with missing values replaced with blank.

public static string[][] GetStrings(
    DataRow[] sel,
    string[] cols
);

See also ...

DbUtil.GetStrings Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetStrings Method (DataRow[],String,String)

DbUtil.GetStrings Method (DataRow[],String,String)

Get one column from a Selection as a String array with supplied missing value filler.

 public static string[] GetStrings(
    DataRow[] sel,
    string nullFiller,
    string cols
);

See also ...

DbUtil.GetStrings Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: GetStrings Method (DataRow[],String)

DbUtil.GetStrings Method (DataRow[],String)

Get one column from a Selection as a String array with missing values replaced by blank.

 public static string[] GetStrings(
    DataRow[] sel,
    string cols
);

See also ...

DbUtil.GetStrings Method | DbUtil.DbUtil Members


SharpPlot 3.71 User Manual: DbUtil Members

DbUtil Members

DbUtil Methods

GetIntegers
GetDoubles
GetStrings


SharpPlot 3.71 User Manual: Release Notes

Release Notes

Changes from first release

Added SharpPlot.GetTextSize

Nic November 2021 - v3.71

Fixed XBarChartStyles.StackedBars with logarithmic scale

Nic September 2021 - v3.69

Fixed ValueTags with logarithmic scale

Nic August 2021 - v3.68

Fixed ValueTagStyles.SectorValue with SharpPlot.DrawXBarChart
Fixed missing values in SharpPlot.DrawXBarChart

Nic August 2020 - v3.67

Fixed Windows Registry font listing in APL

Nic July 2020 - v3.66

Fixed DataStyles.Relative with SharpPlot.DrawBarChart
Fixed InitCauseway for Windows in APL version

Nic June 2020 - v3.65

Fixed hatchings FillStyle with transparent foreground colour
Fixed gradients with transparency in PDF
Fixed pie wedge gradients in PDF

Nic June 2020 - v3.64

Added support for background colors in hatchings FillStyle
Fixed drawing the arcs twice in SharpPlot.DrawNetworkMap
Fixed SharpPlot.DrawNetworkMap, SharpPlot.SplitBy and SharpPlot.GroupBy on empty arguments in APL
Fixed SharpPlot.DrawKey(KeyDefinition[]) in APL
Fixed custom gradient fillstyles in PDF and PS

Nic June 2020 v3.63

Fixed resetting cell pointer of SharpPlot.SetTrellis when calling SharpPlot.NewPage
Fixed using DocumentLayout with no frames in APL
Fixed runaway coordinates in SVG
Fixed space around markers for NetworkMapStyles.Dissected to be link pen width
Fixed arrow tips to be exact in SharpPlot.DrawVectors
Fixed default z-axis ticks for non-3D charts
Fixed AltitudeShading when ZRange is 0
Fixed custom fonts on Linux
Fixed custom fonts in Markers
Fixed clipping of point that fall exactly on the clipping edge (used to be wrongly clipped off)
Added Ascii85, Flate, and PNG compression in APL

Nic January 2019 - v3.62

Fixed FillStyle.Dome in SVG
Fixed crashes when frame size is less than zero
Fixed arrow positioning in SharpPlot.DrawMinMaxChart

Nic September 2018 - v3.61

Fixed XLabels with LogScale and InvertAxis
Fixed empty pie wedges in SharpPlot.DrawPieChart
Fixed Key to use SharpPlot.SetMarkerColors when a single color is used

Nic August 2018 - v3.59

Fixed SharpPlot.SetXTickMarks/SetYTickMarks/SetZTickMarks to be backwards-compatible with long vector
Fixed seggregation between stroke/fill transparency in PDF
Fixed exception when drawing small rectangles

Nic August 2018 - v3.58

Fixed SharpPlot.SetTrellis with SharpPlot.DrawMultiple
Fixed negative SharpPlot.ClassInterval with SharpPlot.SetXRange
Fixed SharpPlot.Backlog to log itself

Nic June 2018 - v3.57

Allowed inversed range in SharpPlot.SetXRange, SharpPlot.SetYRange, SharpPlot.SetZRange
Fixed SharpPlot.Backlog not to be affected by resets (see SharpPlot.ResetOption)
Fixed custom dashed LineStyle in EPS to be multiplied by SharpPlot.SetPenWidths
Fixed dash lines to have same aspect on all drivers
Fixed hatch FillStyle in raster formats
Added SharpPlot.DrawNoteOld for backwards compatibility with old, incorrect behaviour predating v3.55

Nic May 2018 - v3.56

Added SharpPlot.MissingColor SharpPlot.DrawAltitudeMatrix and SharpPlot.DrawTreeMap
Added EmfType to SharpPlotViewer "save image as" dialog
Added CausewayLimitException for SharpPlot.LineLimit, SharpPlot.MarkerLimit, SharpPlot.TileLimit,
SharpPlot.TextLimit, SharpPlot.PixelLimit
Fixed SharpPlot.MissingValue in SharpPlot.DrawAltitudeMatrix and SharpPlot.DrawResponsePlot
Fixed pixel matrix in SVG and EMF
Fixed hatch FillStyles in SVG
Fixed hatch FillStyles to use a step of 8pts and a width of 1pt on all drivers
Fixed transparency in PDF
Fixed AltitudeMatrixStyles: GridLines and ExplodeAxes
Fixed SharpPlotViewer's DPI label when DPI is outside the range of the trackbar
Fixed SharpPlotViewer labels to scale correctly to OS DPI setting.
Fixed OutOfMemoryException in SharpPlot.DrawAltitudeMatrix, SharpPlot.DrawContourPlot, SharpPlot.DrawResponsePlot
Fixed OutOfMemoryException in SharpPlotViewer
Fixed SharpPlot.DrawNote note alignment and boxing for non-zero rotation angles

Nic March 2018 - v3.55

Fixed hatchings in EPS and PDF output
Fixed wrongly omitted label at axis interception when label doesn't collide with orthogonal axis
Fixed automatic tickmarks for very large spans when using LogScale
Fixed SharpPlot.DrawPieChart with YAxisStyles.LogScale
Fixed invisible Markers in EPS when using SharpPlot.SetPenWidths(0)

Nic February 2018 - v3.54

Added ParagraphStyle.HorizontalGap for horizontal spacing around inclusions, bullets and boxes
Breaking change: SharpLeaf.SetBox second argument was removed, ParagraphStyle.HoriontalGap is used instead

Nic January 2018 - v3.53

Added "Save as" menu in SharpPlotViewer
Fixed ScaleBar to be drawn on top of chart
Fixed SharpPlot.SetChartBackground with SharpPlot.DrawPieChart
Fixed Marker key with all-missing series
Fixed SharpPlot.SetEdgeStyle to be observed on all block keys
Fixed drawing error message when chart is undrawable

Nic December 2017 - v3.52

Added AltitudeMatrixStyles.AntiAlias
Fixed SharpPlot.DrawContourPlot AltitudeShading to be anti-aliased (and more light-weight) on all drivers
Fixed SharpPlot.Gutter with SharpPlot.SetTrellis and SharpPlot.NewPage
Fixed DPI argument to SharpPlot.SaveImage with ImageFormat.Emf
Fixed coordinate rounding and comparison tolerance
Fixed output image size rounding in raster formats
Fixed occasional spurious Contours lines when using Curves
Fixed XAxisStyles.Longitude/YAxisStyles.Latitude coordinate formatting
Workaround coordinate bug in Word when exporting Metafile to PDF

Nic November 2017 - v3.51

Added SharpPlot.LineLimit, SharpPlot.MarkerLimit, SharpPlot.TileLimit, SharpPlot.TextLimit, SharpPlot.PixelLimit
Replaced SharpPlot.BarLimit and SharpPlot.TowerLimit with SharpPlot.TileLimit (non-breaking change)
Added SharpPlot.SaveAnimatedGif, SharpLeaf.SaveAnimatedGif and Document.SaveAnimatedGif
Added SharpPlot.RenderAnimatedSvg/SaveAnimatedSvg, SharpLeaf.RenderAnimatedSvg/SaveAnimatedSvg
and Document.RenderAnimatedSvg/SaveAnimatedSvg
Fixed enabling anti-aliasing of included images on all drivers
Fixed disabling anti-aliasing of SharpPlot.DrawAltitudeMatrix on all drivers
Fixed AltitudeMatrixStyles.EdgeCoordinates
Fixed Color.Transparent in PDF and PostScript
Fixed multiple series SharpPlot.DrawMinMaxChart using SharpPlot.SplitBy
Fixed SurfaceShading clipping for 1-item series

Nic October 2017 - v3.49

Fixed white background on default SharpLeaf PageLayout
Fixed SharpPlotViewer with SharpLeaf and Document instances
Fixed SharpPlotViewer to handle multiple pages
Fixed SharpPlot.DrawNetworkMap node layout when using SharpPlot.SetAxesScales
Work around anti-aliasing of pixel bitmaps produced by SharpPlot.DrawAltitudeMatrix

Nic October 2017 - v3.48

Fixed Contour/Bubble plot with missing values
Added (bool stretch) flag to SharpPlot.DrawImage
Breaking change: SharpPlot.DrawImage: stretch used to default to true, and now defaults to false.
Fixed Metafiles with Windows DPI scaling

Nic September 2017 - v3.47

Added SharpPlot.DrawAltitudeMatrix for a flat, altitude-shaded X/Y response plot.
Added NetworkMapStyles.RoundLines for round-ended links
Added ParagraphStyle.ClearLeft and ParagraphStyle.ClearRight
Fixed SharpPlot.MissingValue on Z-values for SharpPlot.DrawContourPlot and SharpPlot.DrawBubbleChart
Fixed NetworkMapStyles.SplitByLink with SharpPlot.DrawNetworkMap
Fixed SharpPlot.GroupBy with SharpPlot.DrawLineGraph, and reset between other Draw methods
Fixed SharpPlot.BarLimit with GroupBy/SplitBy
Fixed SharpPlot.DrawHistogram with YAxisStyles.LogScale and XAxisStyles.Time
Fixed using SharpPlot.SetXLabels with one label per data point
Fixed mouse zoom in SharpPlotViewer to focus on mouse pointer rather than window center

Nic August 2017 - v3.46

Fixed anomalous spider tag offsets on the left side of some pie charts
Added CloudChartStyles.ContourTags and ResponsePlotStyles.ContourTags
Fixed Contours and ZDatumLines in ResponsePlot and CloudChart
Added DPI argument to SharpPlot.RenderMetafile

Nic August 2017 - v3.45

Fixed Include wrap-arounds in SharpLeaf

Nic July 2017 - v3.44

Added SharpPlot.SetEquationNumericFormat
Added SharpPlot.Correlation

Nic July 2017 - v3.43

Fixed SharpPlotImage GUI events (MouseDown, etc.)
Fixed SharpPlot.SetAxesScales with BalancedAxis and SharpPlot.SetXRange / SharpPlot.SetYRange
Added FillStyles : Horizontal Vertical Cross DashedVertical DashedHorizontal
DashedDownwardDiagonal DashedUpwardDiagonal
Fixed Hatched FillStyles in PDF and PS

Nic June 2017 - v3.42

Fixed numeric XLabel collisions so that remaining labels are centered on zero

Nic May 2017 - v3.41

Fixed SetTickMarks in APL to force enclosed vector for custom tick placement
(simple vector is MajorInterval,MinorCount)
Fixed quote protection in numeric and date/time formatters
Fixed image markers in SVG/XAML
Fixed SharpPlot.Version in APL
Fixed unwrappable text to output a hyphen where possible

Nic May 2017 - v3.39

Fixed more effects in SVG
Fixed DocumentLayout and PageLayout internal structure
Fixed TickMarks to always be interpreted as days whether using Time or Date
Fixed Timescales millisecond formatting in .Net
Fixed Timescales escaped formatting with '\' in APL
Fixed Latitude/Longitude label formatting
Fixed Duration to take seconds only, and use SharpPlot.XTimeFormat/SharpPlot.YTimeFormat

Nic April 2017 - v3.38

Fixed whitespaces in SVG
Fixed SharpPlot.SetEffects in CloudCharts, ResponsePlots and Vectors

Nic April 2017 - v3.37

Added HotspotType.Segment for Links/Tips/Hints/Handlers on Risers and Vectors
Fixed handler support in SharpPlot.DrawNetworkMap
Fixed SharpPlot.SetXRange and SharpPlot.SetYRange with Time but not Date axis style
to be taken as the same OLE format as the plotted data (rather than number of hours)

Nic March 2017 - v3.36

Added SharpPlot.Backlog property
Fixed SharpPlot.SetXRange(max) SharpPlot.SetYRange(max) SharpPlot.SetZRange(max)
- single argument doesn't force zero anymore - use ForceZero or Set*Range(0,max).
Fixed non-breaking space in EPS and PDF

Nic March 2017 - v3.35

Added SharpPlot.DrawNetworkMap chart type

Nic March 2017 - v3.34

Fixed Key vertical alignment for large Markers
Fixed NoteStyles.Percentage before drawing any chart
Fixed series handlers when using SharpPlot.SetMarkerColors
Fixed non-Latin-1 character widths and font embedding in PDF

Nic March 2017 - v3.33

Fixed ArrowLines arrow sizes and tip positioning
Fixed transparency in tiles in SVG and XAML
Fixed SharpPlot.RedrawAxes to observe LogScale
Fixed SharpPlot.SetEquationPosition to observe LogScale

Nic March 2017 - v3.32

Fixed image Marker size to be in points and not in 96-DPI pixels
Fixed arcs in PDF driver
Fixed arrows in SVG driver
Fixed SharpPlot.ReadCommentOld for pre-v3.27 versions
Fixed Logarithmic style setting X/YAxisStyles.LogScale for subsequent charts

Nic March 2017 - v3.31

Fixed invisible axis optimisation

Nic February 2017 - v3.29

Fixed Parity when re-using axes
Added SharpPlot.ReadCommentOld to read comment from SharpPlot files from releases predating v3.27
Fixed font subsets for italic and bold variants
Added SharpPlot.GetCharsets and SharpLeaf.GetCharsets to get list of used fonts and the charsets they use
Fixed Single-point lines to pick up their key although nothing is displayed

Nic February 2017 - v3.28

Added BubbleChartStyles.Contours
Allowed SharpPlot.SetWeightings to affect data height when using ScatterPlotStyles.Contours
or BubbleChartStyles.Contours
Fixed treating Double.NaN as SharpPlot.MissingValue
Added SharpPlot.SetAxesScales
Added VectorStyles.Clipped
Fixed Parity when using invisible axes
Fixed DataStyles.Rows on all charts

Nic February 2017 - v3.27

Allow negative size in SharpPlot.SetArrowSize for arrow size proportional to line width.
Fixed SharpPlot.MissingValue in SharpPlot.DrawBubbleChart
Fixed SharpPlot.DrawBubbleChart resetting SharpPlot.SetMarkerScales
Fixed HTML tags parsing

Nic February 2017 - v3.26

Fixed ModelFit with unsolvable regression (all-zero coeffs) when YRange does not contain zero.

Nic February 2017 - v3.25

Fixed SharpPlot.SetMarkerColors for series with SharpPlot.MissingValue
Fixed HaloMarkers in SVG
Fixed unsolvable regressions (ModelFit, Contours) to return all-zero coefficients
Fixed character mapping in PostScript and PDF

Nic February 2017 - v3.24

Removed SharpPlot.ClassInterval limit for SharpPlot.DrawHistogram
Allowed SharpPlot.ClassInterval to be 0 for automatic and negative to specify the number of bins
Fixed time formatting in Linux

Nic February 2017 - v3.23

Fixed KeyStyles.InlineWithData on multiple charts
Fixed TrendLine and ModelFit to observe KeyStyles.InlineWithData
Fixed EXIF orientation on images.
Fixed SharpPlot.DrawImage on Logarithmic axes.
Fixed SharpPlot.SplitBy on multiple series
Extended wedges to allow inner radius
HotspotInfo.Locator is now (x y innerradius outerradius startangle endangle) for Shape=3 (wedge)
Fixed SharpPlot.DefineFont : allow long "shortcodes", allow using a different fontstyle in Set*Font()
Fixed SharpPlot.Set*Font() : fixed fallback on all drivers
Added Postscript Font embedding in SharpPlot.DefineFont
Added Postscript definitions to FontType

Nic January 2017 - v3.22

Fixed HTML parsing

Nic November 2016 - v3.21

Fixed text measurement with unicode and HTML tags
Fixed SharpPlot text wrapping (hyphen taken into account when breaking words)
Fixed numeric axis labels formatting
Fixed SharpPlot.YCaption wrap size
Fixed SharpPlot.DrawNote width
Fixed SharpPlot.SetXLabels collision
Added more Symbol characters to metrics

Nic November 2016 - v3.19

Fixed Correlation Coefficient computation for SharpPlot.SetOrderOfFit greater than 1

Nic November 2016 - v3.18

Cached J j setting in PDF driver
Fixed newline splitting in strings
Fixed SharpPlot.SetYZones and Horizontal Bar chart with YAxisStyles.InvertAxis
Fixed alignment of unicode/HTML-tagged characters
Fixed HTML parsing
Fixed multi-text splitting (ptxt)

Nic November 2016 - v3.17

Added PieChartStyles : Absolute Percentage ChartX ChartY
Fixed ContourPlot edges
Fixed XLabels collision handling for irregular ticks
Fixed default Date formatting in APL
Fixed default PieRadius when PieChartStyles.MergeInsideTags
Fixed XL ValueTagFormat string substitution for empty labels
Fixed clipping Pie XLabels horizontally

Nic October 2016 - v3.16

Fixed Vertical Key splitting in two columns

Nic October 2016 - v3.15

Fixed X-Clipping of Risers
Fixed rounded formatting of numbers with LogScale

Nic October 2016 - v3.14

Fixed and documented string formatting (Xx~*;) - fixed insertions and added escaping with backslash
Fixed picture formatting in APL - allow escaping with backslash
Fixed 'XL' in ValueTagFormat for Pie/Venn XLabel/ValueTag merging - allow escaping with backslash
Fixed ValueTagStyles.ShowAllTags for Pie Chart
Added PieChartStyles.MergeInsideTags
Added PieChartStyles.ShowAllLabels

Nic October 2016 - v3.13

Added SharpPlot.GetKeyBoxes for the bounding boxes of latest round of drawn keys
Fixed DrawNote width with NoteStyles.Percentage
Fixed DrawPolygon to use bottom-left origin

Nic October 2016 - v3.12

Added ResetOptions.SettingsPersist
Added SharpPlotImage.MouseControl and SharpPlotImage.KeyboardControl for zooming and panning
Fixed SharpPlot.DrawNote when no chart nor frame drawn, and ignoring AxisStyle.LogScale when do chart drawn
Fixed SharpPlotViewer : Zooming implicitly disables FitToPage - changed zooming semantics to DPI
Fixed SharpPlotImage : DrawEdge=false by default, SystemColors.Control BackColor by default

Nic October 2016 - v3.11

Fixed ZLabels and ZAxisStyles.ExactFit for ScaleBar (Bubble, Contour, Cloud, Response, TreeMap)
Fixed ScaleBar label alignment towards the inside of the frame
Fixed Arial to truly use Arial font in PS and PDF output, rather than Adobe's Helvetica
Fixed Pure-APL SharpPlot to support APL/.Net calling convention (enclosed single argument)
Fixed custom fonts on Linux (still not metricating them though)
Fixed date/time formatting on Linux and non-.Net Windows
Fixed PDF generation on Linux

Nic June 2016 - v3.10

Fixed zero-range values in SharpPlot.DrawMinMaxChart

Nic May 2016 - v3.03

Fixed horizontal alignment of angled value tags on bar charts

Nic April 2016 - v3.01

Introduced SharpLeaf classes to create reports (typesetting and tabulation engine)
Introduced Document class for page-level manipulation of read-only documents produced by SharpPlot and SharpLeaf
Added PaperSize structure for easy selection of standard paper sizes
Added SvgMode : FitWidth and FitHeight
Simplified PageBuilder architecture - SharpPlot is twice faster.
Rationalised API for SharpPlot Render/Save overloads - a few overloads have disappeared for consistency with APL,
which may require replacing calls to more explicit overloads (full list at bottom of this entry).
Fixed resolution (dpi) setting on SVG, XAML and JSON drivers. In particular, RenderXaml/SaveXaml
now use resolution in dots per inch (like other export methods) rather than scale to points
so new argument is old argument multiplied by 72 (and default is 96 instead of 1.333)
Rationalised warnings and errors
Fixed empty pages on all drivers
Fixed SharpPlot.DrawTable positioning, scaling, paper resize, and headings/frame usage (esp. in trellis)
Fixed Hints, Tips, Hyperlinks and JavaScript on SVG and XAML drivers, including on invisible items
Fixed Series and Hotspots identifiers for active charts
Fixed JSON array formatting (missing ] for each line of output)
Fixed Hyperlinks on PDF driver
Fixed HTML tags in text on SVG driver
Fixed Color.Transparent on all drivers
Fixed full unicode support on SharpPlot.(AddComment/ReadComment)
Fixed HTML entities and unicode support on all drivers (PDF and PS remain restricted to Latin+Symbol character sets)
Fixed SharpPlot.SetXRange/SetYRange/SetZRange(double max) not to implicitly set min to zero
Overloads removed for APL compatibilty :
- SharpPlot.AddComment(string text, bool compress) - un-keyed compressed comments are unsupported
- SharpPlot.RenderPdf(bool deflate) - need to use SharpPlot.RenderPdf(PdfMode.UserDefault, deflate)
- SharpPlot.RenderPdf(string filename, PdfMode mode, string noembed, bool deflate) - need to use SharpPlot.RenderPdf(mode, deflate, noembed)
- SharpPlot.SavePdf(string filename, bool deflate) - need to use SharpPlot.SavePdf(filename, PdfMode.UserDefault, deflate)
- SharpPlot.SavePdf(string filename, PdfMode mode, string noembed, bool deflate) - need to use SharpPlot.SavePdf(filename, mode, deflate, noembed)
- SharpPlot.RenderSvg(SvgMode svgmode, string header) - need to use SharpPlot.RenderSvg(svgmode, 96, header)
- SharpPlot.SaveSvg(string filename, SvgMode svgmode, string header) - need to use SharpPlot.SaveSvg(filename, svgmode, 96, header)
- SharpPlot.SaveImage(string filename,ImageFormat format, TextRenderingHint textmode) - need to use SharpPlot.SaveImage(filename, format, 96, textmode)
- SharpPlot.SaveImage(string filename,ImageFormat format, Emftype emftype) - need to use SharpPlot.SaveImage(filename, format, 96, TextRendingHint.AntiAlias, emftype)
- SharpPlot.SaveImage(string filename,ImageFormat format, Emftype emftype, TextRenderingHint textmode) - need to use SharpPlot.SaveImage(filename, format, 96, textmode, emftype)
- SharpPlot.DrawImage(Image bmp, double left, double top) - need to use SharpPlot.DrawImage(bmp,'',left,top)
- SharpPlot.DrawImage(string filename, double left, double top) - need to use SharpPlot.DrawImage(filename,'',left,top)
Breaking changes :
- SharpPlot.RenderXaml and SharpPlot.SaveXaml now use DPI (which defaults to 96, as for other drivers) instead of scale (which defaulted to 1.333, producing the same 96DPI = 72*1.333)
- SharpPlot.SaveXaml and SharpPlot.SaveVml : HTML wrapping has become a optional explicit argument rather than an implicit assumption on the extension of the file
- Default Soft Hyphen is now Unicode standard 'Â' (0xAD)

Nic December 2015 - v3.00

Fixed image inclusion in EPS and PDF drivers (all files format in C#, JPEG only in APL)

Nic June 2015 - v2.64

Fixed font decors (and HTML tags) on EPS and PDF driver
Added support for matrices of objects in SharpArrays
Fixed overloads with ref arguments in C# builder
Fixed object and (number vs character) comparison (Match, EQ) in C# builder
Fixed null handling in C# and APL

Nic April 2015 - v2.61

SharpPlot/APL delivered as true :Classes - yet retaining backwards compatibility with old code
SharpPlot/APL performance enhancement : halved both CPU time and workspace usage

Nic April 2015 - v2.60

Fixed YAxisStyle.InvertAxis with custom TickMarks and LogScale
Fixed Marker PenWidths and HaloMarkers on EPS driver
Fixed ScaleBar to use ZCaptionFont

Nic January 2015 - v2.52

New object model for underlying page representation (PSB)
Significant performance improvement on chart rendering, especially for complex charts such as 3D surfaces
Fixed custom markers on EPS driver
Fixed Document Structuring Convention (DSC) for EPS
Fixed properties reset (using ResetOption) for ResetProperties, NewCell and NewFrame
Fixed background fill on EPS driver
Fixed saturate fills on PDF driver
Fixed metafile scaling with non-96 Windows DPI

Nic November 2014 - v2.51

Fixed AxisStyles.ExactFit on all chart types
Fixed ZoneStyles.SpanFrame
Fixed Zone overflow if stop value was higher than frame limit
Fixed Trace Chart : Y axis scaled to IAllowance ; fixed limits in SetIZones
Added ContourPlotStyles.NoMarkers
Added new overloads to DrawPolygon

Nic November 2014 - v2.43

Mapped BarEdgeNib to EdgeStyle nib
Fixed Edges and Keys to take EdgeStyle into account
Fixed StepChartStyles.Risers
Fixed JSON data for multiple series
Fixed square/round line edges on all drivers
Fixed Node and Ball marker for EPS
Fixed (Lines+SurfaceShading) on XY plots
Fixed Cross Markers and HaloMarkers on raster images
Fixed Marker size and linewidth scaling on all drivers, and in key
Fixed User cycle consumptions (Color, FillStyle, LineStyles, Markers, etc.) to match what has been drawn
Fixed Key for Dial
Fixed Cloud risers with surface fit
Fixed issues with Classic interpreter

Nic October 2014 - v2.42

Fixed Key positioning to use chart coordinates by default
Fixed date/time formatting on Linux
Fixed Unicode character width computation

Nic October 2014 - v2.41

Fixed DrawBoxPlot(double[][] data) and DrawBoxPlot(int[][] data)
Fixed BoxPlotStyles.(CroppedAxes OverlayGrid TabularData)
Fixed Logarithmic BoxPlot
Added XCaption for PieCharts

Nic September 2014 - v2.40

Added DrawPolygon method
Fixed opaque fills on SVG and XAML driver
Fixed stretched images on SVG and XAML driver

Nic July 2014 - v2.39

Fixed ZoneStyles.Intersect

Nic July 2014 - v2.38

Fixed axis label collision when YLabelNudge is set
Fixed XBarCharts with multiple series
Fixed JSON data for BarCharts
Fixed clipping of surface fills
Fixed key scaling for BubbleCharts, and removed key boxing when BarEdgeNib is null
Fixed remaining spurious crisp edges
Fixed PolarCharts to scale to frame width
Fixed TreeMap ValueTags
Fixed Bubble chart auto-scaling
Fixed automatic tickmark computation, especially for Duration and Time axes
Fixed edge style for Dial, Pie, Polar and Venn
Added SetJitter method
Added TableStyles.FitHeight

Nic April 2014 - v2.36

Crisp edges - now flagged OFF on tickmarks in general - modern SVG viewers are much better at ant-alias! Also
the little fudge in the svg namespace to add weight to blurred lines is reduced to 0.2 - same reason.

Boxplot style Plain - omits median line from box.

ACDS 28th Jan 2013

Edges on legends - barcharts and surface plots now respect the edge-weight in the legend placeholder.

Gridlines - best drawn anti-aliased as the 'crispedges' setting in SVG can make them fall through the
cracks between the pixels and only draw some of them at all! Definitely in Chrome, other viewers may be OK.

ACDS 21st Nov 2012

TreeMap - new chart style migrated from RainPro.

ACDS Nov 2012 (consolidating work in Adelaide)

Vertical text - fix to vscan.vshow to set symbol font around maths entities. Was failing in EPS.

ACDS 4th Nov 2011

Modelfit - updated to handle all combos of logY and logX with linear fit. Also improves the equation
placemant when the x-scale is logged (Middle gets biased right otherwise).

ACDS 15th Sept 2011

Modelfit - more sensible annotations when one or more axes is logged. Adds EquationStyle=Linear to force
a simple LSq fit on the unlogged data in the case of a log Y-axis and linear x-axis. This shows the
fitted straight line as a curve and reports the intercept and slope of the unlogged data.

ACDS 31st Aug 2011

EPS output - using characters from the Symbol font was not adding the cmyk argument to settext when
it switched font, and subsequently switched back to the base font. Fixed.

ACDS 28th April 2011

ACDS 17th March 2011 as version 2.13 after acceptance test by BIS

SVG animations - could not be applied to gridlines (e.g. fade-in) or the chart clipping rectangle
(to allow linegraphs to draw across the page). Added

ScriptTarget.ClipRect
ScriptTarget.GridLines

to the list of targets for special effects.

SVG/VML - tips (and javascript expressions) on arbitrary targets (like Zones and Headings) were not
being output by the SVG and VML drivers. Bug introduced in 2008 - fixed.

ACDS 7th March 2011

XAML - rotated text with HTML tagging was misplaced, and drawn too small. Fixed.

ACDS 16th Feb 2011

SetMarkerColors - adds an overload to take a list of colours as a string (names or HTML format) just
to save a bit of typing while setting up tests!

ACDS 10th Feb 2011

Barcharts - now take care to crop to the chart edge (VML breaks apart badly if we don't) and kicks any
affected value tags inside the bar as a clue something bad happened. For similar reasons, XBar just
eliminates any bars which are outside the cropping area.

ACDS 9th Feb 2011

CMYK colour model - supported for solid and hatched colours - see Barsuite for some typical swatches.
This works by using a base-100 encoding of the 4 ink proportions, so is restricted in accuracy to
2 dec pl for example:

orangeâ†sp.UseCmyk 0 38 84 24

is an orange with 24% black added. All the drivers except PostScript/PDF map these back to RGB for display
using the same algorithm as GhostScript (subtractive). PS and PDF output checks for CMYK colours in the
driver (see function ColourMe in eps.â™chrgb) and calls setcmykcolor with the original 4 values. This
permits the user to have exact control over the inks used by the printer.

Tables - allows explicit alignment of titles (using LabelStyle) and caption+stubs (using CaptionStyle) to
tidy up appearance. Not sure how spanned headings should behave when the titles are aligned left or
right (rather than the default of centred). For now they just follow the leaf nodes, but we may want
to split them out and always centre them.

ACDS 6th Jan 2011

Trend lines - new placeholder added to EquationFormat CC=CorrelationCoefficient and R2=the square of this.
EquationIndex is the position along the line, so we add EquationPosition as exact (x,y) in chart
co-ordinates, unless the style is Absolute/Percentage which behave as per notes.

ACDS 25th Nov 2010

Barcharts with log axes - data was not being rescaled correctly for XBarchart. Also adds Logarithmic to style
for normal barchart, as this should scale all the data. ScatterPlot and BubbleChart also now support
this style just to save time when both axes are to be logged.

RedrawAxes - will output and extant datumlines as well as over-drawing axes. This gives the user a way
to get the datumlines imposed over the data values if required.

ACDS 14th Oct 2010

VML output - scalable VML (set with dpi=0) was not passed via the internal HTML parser so bold and
italic failed to appear in the output. Some tags like <sub> can never work reliably here as we cannot
adjust the typesize as the user scales the window, so gaps will appear if the default size is stretched
and text will collide if it is shrunk.

ACDS 9th Sept 2010

Html tagging - unclosed <sup> and <sub> tags left the baseline adjustment behind so that the next text
output was incorrectly placed. Now all html flags are explicitly reset and baseline restored at the
end of each text block.

ACDS 1st June 2010 - version 2.07

Spanned labels on 3D charts - implemented for X-axis only for now. Probably used for column charts!

ACDS 27th April 2010

Histogram - style now gives detailed control over which X-datumlines are drawn to mark mean, and up to
three multiples of the std deviation. These may be tagged as required with DatumLineTags.

ACDS 31st March 2010

Polynomial fit - was using an unnecessarily general algorithm. Updated to call a nice LU decomposition
library that turned up on a maths blog and runs a lot faster for heavy datasets.

ScatterPlot and BubbleChart - styles updated to include OnTopModel. This should always have been there!

ACDS 2nd March 2010

SetNewline - added for scripting environments (like APL) which don't support
and so on as splitters.
This augments the hard-wired newline characters
and \r with a single character of your choice.

ACDS 1st March 2010

Synchronised Y-axes - new axis style 'Synch' will force the tickmarks of a secondary axis to mate up nicely
with the primary, so it can share a common set of gridlines. Related feature is axis style 'Balanced'
which forces matching numbers of ticks above and below the axis which is always set at the zero point.

Arrows - balanced axes get arrows on both ends. Also captions can be passed as 2-element arrays
to go left/right on X-axis and bottom/top on y-axis. Most non-standard charts ignore all but the first
caption if you do pass more than one. A few related bugs flushed out - you can now have Xstyle 'top' in
harmony with a balanced y-axis and 'Atend' caption. New XStyle 'OmitLast' kills the final label which
may be about to collide with a secondary axis or an 'AtEnd' caption on a right-hand y-axis.

ACDS 25th Feb 2010

Secondary axes - a multi-axis chart in the first cell of a trellis carried the 'right-axis' style
forward into the next cell unless explicitly reset. Fixed.

Trellis grid - gridline was not drawn in the 1 by 2 case. Fixed.

ACDS 18th Feb 2010

XAxis labels - when we have a midlined X-axis we correctly killed the first label, but when the Y-axis
is at the right (or is a duplicate) then we may want to kill the last xlabel instead/as well. Also
we need a way to tell the labelling that a secondary axis in upcoming. New XStyle OmitLast does this.

ACDS Shrove Tuesday 2010

ZDatumLines - added for use in 3D charts and contour plots. Also we now have DatumTags to simplify the
process of annotating lines which mark ranges in typical QA charts. These are used up in x,y,z order.
Use DatumTagStyle to adjust the default alignment or place the tags 'AtEnd'.

ACDS 9th Feb 2010

AddComment - was not handling hi-Unicode characters entered directly from the keyboard rather than
encoded in HTML-style strings. Now makes the mapping to &#xhhhh; automatically and reverses it
in ReadComment (assumes users won't use this very geeky style of encoding!).

ACDS 2nd Feb 2010

Text wrapping - captions with heavy use of small tags (typically superscripted footnote refs) could get
split in mid-tag which makes a complete mess of the resulting html. Wrapped legends were allowing
too much space for the key placeholder so broke the text too early. Fixed.

PDF output - was measuring characters like open/closing double-quotes incorrectly - these are mapped to octal
in the 'old' Windows positions and we were looking up the metrics assuming Unicode. Fixed.

ACDS 1st Feb 2010

Set functions - any Setter that takes an array argument (e.g. sp.SetXTickmarks) adds an overload to
allow it to be called with no argument to reset the internal state to default. This is useful in the
case of a Trellis where several charts are almost the same, but some settings need to be cancelled.
For properties which take double values, passing either NaN or the current missing value will also reset.

ACDS 16th Jan 2010

Wrapped text with super/subscripts - if the wrap-point fell in non-baselined text it was not correctly
positioned on the following line(s). Also a tag with no following text was not closed properly in SVG
leading to ill-formed XML which stops the viewer at this point. Both fixed.

ACDS 6th Jan 2010

Notes - new style 'Cropped' which eliminates entire note if any part of it would be clipped at the axis limit.
Also makes sure to clip in-line keys which previously escaped the clipping rectangle.

DrawMultiple - failed if there were no PageLabels (or SplitBy) set. Fixed.

ACDS 16th Nov 2009

KeyDefinition - overload added to Constructor to allow exact specification of Line+Marker legend. Required
to add custom legends to contour plots.

ACDS 1st Nov 2009

DrawKey - change to explicitly positioned key to de-couple Baseline and Left key styles. The issue was that
Baseline also had the effect of placing the legend placeholder at the x-coord given instead of placing
the edge of the box here, which was a bit illogical. Now you have to say Left to get this effect.

ACDS 29th Oct 2009

FindExtremes - returns the (xyxy) bounding box of the data (arguments as for Scatter) and any generated
control points if you have set the 'Curves' style. It is possible for Beziers to stray outside the limits
of the data, but never outside their control points, so you can use this to set axis ranges if you need to.

ACDS 24th Sept 2009

Bubblechart - adds 'Altitude' as a style which uses the current set of Altitude colors to color each
marker depending on the incidence value (3rd argument). A ScaleBar may be used to interpret the colors.

LineGraph,Scatter - as a side effect of the above, you can now set MarkerColors to an arbitrary vector of colors.
These will be reshaped as needed and used to color each point, overriding the normal series color. The
placeholder in the legend ignores this vector and always uses the series color. Also applies to Polar and
Cloud as you would expect. Various examples updated to check this out - FishFinder has coloured buoys now!

ACDS 10th Sept 2009

DrawKey - given key position should be logged for you if you are placing a key against log axes. Fixed.

DrawNote - oddly, the 'Percentage' style was not supported for notes. Now works as for keys.

Log axes - user-supplied range was getting rounded out to the next tick mark with log axes. Fixed.

ACDS 9th Sept 2009

PostScript names - DefineFont updated so the caller can change the PostScript names associated with the
base set of 14 fonts. For example Arial might not be required to map to Helvetica these days!

ACDS 13th May 2009

Enumerations - were starting at 2 which wastes one possibility. Fixed.

ACDS 5th May 2009

RenderPdf - overloads added to support compression and font embedding (as for SavePdf).
Readcomment - takes a string (from one of the RenderXxx calls) as an alternative to a filename.

ACDS 8th April 2009

RenderChartLog - added to allow chart log to be captured as a string result rather than written to file.

ACDS 1st April 2009

ACDS 27th March 2009 as 2.0

Keys - right-aligned legend block (positioned with DrawKey) was incorrectly wrapped when it was
placed close (but not adjacent) to the right-hand axis. Fixed.

ModelSpan - new property allows user to restrict a modelfit to a selected X-range. Could be used
to fit several discrete models to a series with an obvious change of slope. The default is
still to project the fit across the entire x-axis, so used EquationStyle 'SpanData' to get
the model shown only within the window set by the span. ScatterSuite 8 checks it.

XBar - now takes the 'Horizontal' style to fall into line with Bar, Step and VLine plots. Checked
out in XBarSuite 5 with Gantt-style labelling.

Legend positioning - adds KeyStyle 'Baselined' to give the same positioning as notes. The first line
of text takes the position given, rather than allowing for a possible box. TextSuite 1 checks it.

Gridlines - adds XGridLines and YGridlines as vector settings to allow complete control over grid
placement. Any lines drawn outside the first and last ticks are killed off just in case. Setting
the grid does not force the axis range to span the extremes - grid lines behave differently from
tickmarks and datum lines in this respect. LineGraphsuite 10 has an eample.

ACDS 14th March 2009 (version updated to 2.0)

Stepcharts - get a key placeholder with a little step in it to help discriminate these from
ordinary lines. Set as internal type 3 and generally treated just like lines.

ACDS 13th Feb 2009

Cyrillic text - somewhere in the move to .Net 2 we changed something which caused non-Latin text
to wrap and right-align incorrectly in images. Fixed by adding an extra flag in vscan to stop
it making the &#nnnn; conversions for simple text (whatever the Unicode value). This means that
the raster engine saves the time converting it all back again, and eliminates the root cause
of the wrapping and alignment issues. Metrics for basic Cyrillic and basic Greek added to the
factory-fitted font cache, as this adds very little overhead and will save a lot of measuring
activity in charts with non-Latin labelling.

SaveChartLog - additional flag so we can force this to make the log after the prescan process
which is used to clean up output intended for raster and eps. This shows the output of
the HTML scanner which resolves tagged text to simple fragments for engines which don't
directly support HTML-style tags.

Table chart - grouped data on the y-axis should use en-dash to split out the groups. Fixed.

ACDS 9th Feb 2009

Xlabels - when rotated by 90 or 270 these now horizontally centre multi-line labels.

ACDS 23rd Dec 2008

Stepchart - if the final point hit the axis (e.g. 2% interest rate) the last line segment was not
drawn. Now checks in advance whether we have more x than y values and passes an extra flag.

ACDS 16th Dec 2008

YDatum lines - could be drawn outside the frame unless the y-axis was clipped. Now checks on the
available frame and omits any which would be either above or below the frame. Same if we have
a baseline which may be vertical if the chart is style=Horizontal and is also now screened out.

ACDS 17th Nov 2008

Metafile output - extra overloads added to RenderMetafile which take a Stream and simply write to
that, rather than creating a stream internally and using it to capture the EMF content.

Key box - this was setting the lower bound a little too far away from the X-axis so vertical keys
ran out of space when there was clearly room for one more row. Fixed. Also the amount of corner-rounding
was over-generous on small charts - now reduces with the font size. Notes also. TextSuite 2 tests it.

Wrapped text - softhyphens were breaking correctly, but did not show as hyphens when used. Fixed.

Key box (again) - if we only had a single key entry, the check for overunning was not performed, so you
could write the key anywhere. Now ensures that it is at least falling on the paper. Also if it
only just missed (an unboxed key would have fitted) it attempted to draw a zero-sized box with
rounded corners - which blew GDI+ out of the water with an argument exception. Fixed.

Autofit keys - were not reducing the inter-item gap in proportion to the reduced font size. Fixed.

Legend text - honours Keystyle NoWrap which turns off wrapping of long lines in vertical keys.

ACDS 28th Oct 2008

Vertical text - was now handling HTML tagging so superscript etc was not working in PDF and other
formats which don't support tagged content directly. Fixed.

Legend width - the placeholder for a custom line with a very short total dash-repeat was drawn with
room for exactly one repeat cycle, rather than snapping up to the normal default width. Fixed.

ACDS 20th Oct 2008

Chart titlebar - was getting reset by calls to NewFrame so the last chart set the default title and the
user's setting could be wiped if it was set too early. Now the user's setting always wins and
the first heading encountered fixes the title otherwise.

ACDS 3rd Sept 2008

Curves+SurfaceShading - the recent improvement to the way surfaces are edged bypassed the curves and
failed to fill the area at all. Fixed.

ACDS 28th Aug 2008

MinMax - failed with three arrays, all empty. Now just runs through and draws nothing.

PageMap - new call to get a map of the chart that an application can use to track the cursor,
pick up hints and tips, and so on. See documentation for details. Several tests check it out.

Key wrapping - legend text did not auto-wrap if the legend was placed explicitly with DrawKey. Now
it wraps into the page width (incl the right margin) less any space needed to box the key.

Linespacing - the number that you give here is interpreted as absolute,percent or relative depending
on how it relates to the fontsize. If you definitely want absolute, you can set a -ve number to bypass
the choice, so setting -3 on a 7pt font would give you 3pts of interline space rather than 21pt.

ACDS 14th Aug 2008

Tables in a Trellis - the table did not notice the cell structure and just drew in the lower left
of the page. Now small tables centre in the available space and large ones are scaled (keeping aspect)
to fit as best they can. They do Headers, Subheads and Footers correctly now too as a bonus, but only
when called stand-alone or in a trellis or if you set the UseHeaders style explicitly.

Trellis - does gridlines now. Uses the Axis settings to box it and the Gridline settings (shared with tables)
to draw the gridlines. Set TrellisStyles.Gridlines to activate it.

Trellis - style 'SkipToNext' eliminated as it fights with 'Reset' which is much more useful.
No way to fix this with the current design, so seems safer to force an explicit NewCell() call.

ACDS 28th July 2008

Rotated text with HTML tagging - tags were ignored here. Now uses the normal HTML parsing utility
to output unrotated text having roteted the co-ordinate system. Trivial in EPS and the raster
viewers, but requires care in PDF. Not yet supported in XAML which needs a serious think, or
a future release of SilverLight which will probaly do it native with tspan tags (like SVG).

Pie legends - use of the 'FarthestFirst' style changed the ordering of the legend blocks. Fixed.

ACDS 8th July 2008

Label mask - SharpPlot does its best to thin out colliding X-labels for you, but if the labels are angled or
it just gets this wrong, you can set a boolean array (which is reshaped to the number of labels) to
thin them manually.

sp.SetLabelMask(new bool[] {false,true}); // Alternate labels

Note that this adapts itself to barcharts where there is a dummy label on the Y-axis. It applies
to 2D charts, Polar charts, Piecharts and the Dial chart only. Also dialcharts now handle long
label text rather better.

ACDS 5th July 2008

Legend gap - added KeyGap property (default 1.32) to set the space between legend entries in a vertical key.

ACDS 2nd July 2008

Descending X or Y-ticks - accidentally eliminated the modelfit line. Fixed.

Legend entries - these are added by default for trendlines and modelfit but this may be a nuisance to
a Gui front-end, so now you can set:

sp.ModelFitKey = false;
sp.TrendLineKey = false;

to turn either of these placeholders off. For consistency:

sp.SeriesKey = false;

will eliminate the series placeholder in the same way.

ACDS 24th June 2008

Upfront ranging - adds four new property-setters to allow you to exploit the auto-ranging even
when there are several upcoming plots. Calling these with any array or set of arrays:

sp.SetXDataRange(new int[][] {x1,x2});
sp.SetZDataRange(zextremes);

will simple add the lowest and highest values to the first series plotted, and then range as usual.
This works independently for X,Y,Z and Inner axes as you would expect.

ACDS 6th June 2008

Constructor - allows for (double,double) now as paper size in points.

ACDS 4th June 2008

Absolute ticks - were not quite accurately giving the user what was asked for. Showed up if you asked
to draw the ticks right across the entire axis frame when they came up slightly short. Fixed! Also
the tick-length arrays are now double[] as well as int[] to allow easy conversion from other units.

ACDS 8th May 2008

TickStyles - implements 'Absolute' style so that the tick-length array (and the associated gridline
and datumline thresholds) are interpreted as pts rather than as percentages of standard. The default
thresholds are 4pt and 8pt respectively for absolute tick lengths.

ACDS 6th May 2008

Text decorations - underline and strikeout were not implemented for all chart elements in all
output media. These now work for horizontal and vertical text everywhere except XAML which
only does underline. They are not currently implemented for angled text. Note that decorations
are not drawn on super/subscripted text as these are assumed to be footnote references and
look very wrong if underlined or struck through!

Fat lines in MinMax charts - were being drawn as rectangles above 2pt which was a workaround
for the old WMF limitation that all lines above 5px got round ends. Removed, as none
of the modern formats have this problem.

Legend on pies - was using the wrong colours if the start angle was not zero - fixed.

ACDS 21st April 2008

Cropped axes - was not invalidating the current fill colour so that succeeding text did not
reset it if the text had the default colour (Black). The symptom was labels written
in the same colour as the frame background. Fixed.

ACDS 16th April 2008

Surface shading with clipping - the code to 'flatline' to the edge is only required when we have
surface shading to an off-page point. Now it is only invoked when needed which eliminates a
couple of edge effects on clipped linegraphs. Also we now use the segmented line as the
edging so the surface becomes unedged where it is clamped to the axis limits.

Styles FramedAxes and CroppedAxes - both now bypass our internal clipping logic and rely on the
output medium to handle the clipping for us. The only exposure is in VML which does not
support clipping, but the improved reliability and simplification of the SharpPlot code
seems to make this a good tradeoff. For big timeseries, it should also give a noticeable
speedup as the output polyline is no longer drawn in multiple segments.

ACDS 8th April 2008

Baseline - defaults to drawing like the Axes, but we gain SetBaselineStyle to allow it to
have any of colour, style, nib set differently if required. Probably used just to turn it
off with LineStyle=Invisible in most cases.

ACDS 4th April 2008

LineGraph - runs of data can be thinned out (e.g. to eliminate marker noise) with two new chart
styles. SkipRepeats removes all points with the same y-value as the one before, and SkipRuns
does the same, but leaving the final point of each block of repeated values in place. These
styles apply to LimeGraph and PolarChart only for the moment, as they only really make
sense for timeseries data (e.g. regular readings from a meter would be a good example).

Stepchart - adding the Segmented support broke the case where the final x-value is zero. Fixed.

Arrowheads on axes - the case with a Top X-axis and Inverted Y-scale should put the arrowhead at the
bottom of the Y-axis. Fixed.

Edging on surface plots - was using the nib of the series line to edge the filled region. Better to
use 'BarEdgeNib' for the enclosing line as then we can zero it if we want rid of it completely. Also
this allows a thicker nib for the data without looking really ugly for the edging.

ACDS 19th March 2008

VML - adds the feature that a DPI of zero means 'scale to fit' which abandons the use of CSS2 text
for the simple horizontal text and uses the TextPath tag for all text output. The chart width and
height are then set to 100% which makes it occupy its containing <div> completely. There are two
limitations (intrinsic to VML) which we cannot work around: line-weights are expressed as px so
cannot scale, and font-sizes similarly. The resulting charts will therefore only scale within
a fairly limited range before the proportions look very poor.

VML - as a side-effect of the above, all rotated and vertical text is now anti-aliased and looks
much better, for example the labels on 3D charts are much more readable.

Gradient fills - overloads added to new FillStyle to allow the caller to create a gradient with
a given target pattern saturation (FillStyle.Saturate30 is default) to change the emphasis on
the highlight, or to pass a chosen colour which completely replaces the computed colour.

Tips with 'ontop' model - use of ValueStyle 'Tips' did not work correctly with a modelfit or
trendline drawn ontop of the data (the line stole the tip from the first marker). Fixed.

XAxis labels - use of styles Spanned+Angled reversed the order of lines within each label. Also
the alignment of multiline angled labels was generally poor - Fixed.

ACDS 3rd March 2008

VML rendering - adds the option to express all units as "px" rather than "pt" by passing the required
dpi value (96 reproduces the existing size on most video adapters). Also splits up very long
polylines (over 5000 points) into multiple blocks, as VML just gives up on these.

Invisible markers - are now rendered as circles with no edge or fill if there are hints, tips or
script elements attached to them. This allows hinting of linegraph values in VML and SVG.

Stepcharts - treatment of missing values was poor, particularly in the unfilled case. Now we make
sure to eliminate value tags from the filled chart (which respects the baseline better now), and
bridge over the gaps in the simple line case (as per the Linegraph). Adds support for the
style 'Segmented' which breaks the lines either side of the missing values.

ACDS 14th Feb 2008

Piecharts - value labels placed 'inside' the sector were evaporating for exploded sectors. Fixed.

Piecharts - sectors with think edges were not drawn thick in the Image formats. Fixed.

ACDS 5th Feb 2008

Tick-mark line-width - scales with the axis weight by default, but now you can override this with:

sp.TickMarkWidth = 0.6;

to set the tick-mark line-width explicitly. The default tick length still scales with the axis
weight as before. Applies to 2D and 3D axes, Polar and Dial charts.

ACDS 29th Jan 2008

Tips on Linecharts - if the line got segmented (clipped Y-axis for example) it ate the tips which
belonged to the upcoming markers. Fixed by calling pL multiple times for each segment (as now)
but stroking all the segments at once, which makes for cleaner SVG and PDF and only calls off
the tip for the line.

ACDS 28th Jan 2008

Polar gridlines - the outer circle was not drawn even if the XStyle was 'NoAxis/Invisible'. Fixed.

ACDS 16th Jan 2008

Missing values - using Double.MinValue as the missing data marker could break MinMax and BarChart
ranging, as these attempt to add an artificial low point 'just below' the minimum value. This is
not possible if the lowest value is the smallest representable number! Now eliminates the
non-data items before finding the low-point.

ACDS Jan 8th 2008

Piechart labelling - this rather assumed that the first quadrant would heve quite big sectors and
didn't bother to do the label-dodging code that is used from 9:00 to midnight. Now it runs the
first quadrant backwards from 3:00 to make sure that trivia like 1-100 are not handled
spectacularly badly. We should probably implement PieLimit (like Barlimit) just to keep
things under control in extreme cases! A compromise is to eliminate any labels which would
otherwise be entirely pushed off-page by the adjustments. Works pretty well in practice.

ACDS Boxing Day 2007 / New Year's Day 2008

Boxplot - was losing the decile whiskers on PNG output. Turns out that if you don't let GDI+ anti-alias
dotted lines they slip between the pixels at line-weights less than 2px. So we force a spightly
firmer line and also disable 'crisp edges' if we have deciles to draw. Also the median line was
drawn with square (rather than flat) endcaps which allowed it to stick out of the width of the box.
Simple fix to the pT macro to use flat caps regardless, unless the linestyle is not solid.

ACDS 19th Dec 2007

XBarchart - missed out on the cropping stage which should be applied to the chart and values. Fixed.

ACDS 12th Dec 2007

Stepchart - horizontal, surface-shaded with no risers did not draw the line back to the x-baseline
correctly before shading. Fixed.

ACDS 27th Nov 2007

LineStyle - very long dash-repeats (like 10000000 1) would make nonsense of the key layout or make
the legend impossible to draw. Now new LineStyle(rpt) will signal error if the pattern is obviously
impossible.

ReadComment - extended to handle comments in XAML files intended for the SilverLight viewer.

Clipping - was not handling the 'envelope' fill for min-max charts correctly. Fixed.

ACDS 15th Nov 2007

Framed axes - failed if either or both of X and Y styles was 'NoAxis'. Now draws the frame correctly
even if both axes are undrawn.

ACDS 8th Nov 2007

Parity plot style - adds a standard parity-plot capability to Scatter and Contour plots to allow easy
comparison of actual behaviour with a theoretical standard. Function Parity tests it.

Frame border - is drawn entirely inside the paper if the gutter is zero. This should preserve the
line-width correctly when drawn on screen.

Custom markers - now take a XAML path as a string, or for very simple polygons a vector of xy pairs
giving the co-ordinates of each vertex of the marker relative to the marker origin. The first
pair of values as treated as a relative moveto, and subsequent values as lineto pairs. Nested
vectors define multiple subpaths.

ACDS 5th Nov 2007

Clipping - makes a distinction between Framed axes (when clipping is brutal) and axes open to the top
when markers (and value tags) which fall near the boundary are drawn completely. Also Risers are
now drawn to markers which have been clipped out vertically, and are terminated at the y-axis limit.

ACDS 20th Aug 2007

Clipping - was fooled if both the first and last points fell outside the same boundary. Fixed by
the usual trick of adding a couple of guard points in the middle of the target then chopping them
after doing the algorithm. Also the segmentation dropped a part line which crossed directly from
below the bottom to above the top (or outside left to outside right) - fixed.

ReadNote - allows the user to recover (optionally compressed) notes from all formats.

ACDS 7th August 2007

Keys - new KeyIndices setting allows user to choose exactly the keys to be run by DrawKey (or by default
if the key is left alone until ch.Close is called). If ANY keys have been requested this way, then
the legend is treated as done, and nothing will emerge automatically when the chart is closed.

ACDS 2nd August 2007

UpDown stacked bars - implements the Excel strategy of keeping separate up and down stacks rather
than a simple cumulative which can completely hide sectors. Value tags now follow the bottoms
of negative bars and 'hop out' downwards if the tag in the final sector won't fit. Stacked charts
may give nonsense results if used with a displaced baseline - this only makes sense when all the
bars in the first block exceed the displaced baseline! Same for Horizontal bars, naturally!

ACDS 26th July 2007

Framed Axes - now special-cased and drawn with a simple Box which tidies up the corners. Common case
of Plain XY axes which join at (0,0) is also now drawn as a single Poly.

ACDS 25th July 2007

Duplicate ticks - XTickStyle and YTickStyle now include 'Duplicate' which adds the ticks on the 'far side'
but without the extra labels you get with duplicated axes.

ACDS 17th July 2007

Linegraphs - lines are drawn from right to left so the dash-repeat looks good at the right-hand end.
This also requires the constructor for custom lines to flip the pattern. We should also flip the
pattern of Pen objects passed for use in custom lines - todo!

ACDS 5th July 2007

LineStyle - dash repeat pattern for custom linestyles takes double[] now to allow very fine control.

ACDS 31st May 2007

Getters added - for all fonts, backgrounds and lines. Return the full set of elements as object[] to
allow an application to query the current settings easily and offer the user a dialogue with
the default values prefilled.

ACDS 24th May 2007

Keys, Labels - accepts a comma-delimited simple string as a script-kiddie alternative to the string[]
format. If your labels have commas, then you MUST still pass the array as before.

ACDS 21st May 2007

Clamped lines - if the line left the chart upwards and never returned, the clamped line should extend
to the last X-value and a filled surface should run to here also. Fixed.

ACDS 18th April 2007

ExactFit - was fitting the 'far end' but insisting that the bottom tick was rounded back to a whole
tick interval. Now it leaves it alone for integer data so you can have ticks at (1,3,5,7) by setting
the interval to 2 and the range to 1,n.

ACDS 13th April 2007

Legend positioning - placing the legend box with DrawKey(x,y) had some issues when the top of the box
got close to the top of the chart area and there was a small top margin. Also the bottom of the box
was not quite accurately positioned if bottom alignment was used. Fixed.

GetVersion - added as a simple call to find out what we are running (as a string).

AddComment - adds arbitrary text as annotations to vector output such as EPS or SVG.

ACDS 12th April 2007

Label wrapping - inside labels were using the margin width as a wrapping target. Fixed.

ACDS 11th April 2007

Metafile output - extra arguments added to RenderMetafile and SaveImage to allow complete control over
the final format. You can now determine the EmfType which is generated in addition to the image type.
Also textual HTML tags like <sup>2</sup> were not being handled for this output type. Fixed.

XML hints - the type information for things like EmfType was wrong as Causeway was assumed as the
prefix if no prefix was given. These are now fully typed so no extra prefixing is required.

ACDS 10th April 2007

Vertical key - was looking for double-column layout much too soon, and restricting the width
allowed for text with a few long keys to less than half what it should be. Fixed.

Label nudge - both X and Y labels can be nudged now with SetXLabelNudge and SetYLabelNudge which
take (x,y) displacenents in points. Only applies to 'standard' charts for now, so not Polar or Dial.
Note that displacement is always +ve towards the chart area, so will be symmetric for left/right axes.

ACDS 5th April 2007

KeyLimit - allows user to restrict the number of key items flushed at each call to DrawKey. The
default value is Â¯1 which writes as many as it can in the space available. Suggested use is to
split up keys between several panels if there are many lines to be keyed. Barsuite 8 tests it.

ACDS Mothering Sunday 2007

Key position - was not allowing for extra-long tickmarks or X-labels with very large linespacing.
Either could occur on charts with a deep hierarchy of time-related labels. Fixed.

ACDS 2nd March 2007

Vertical Keys - did now quite line up the text in the default case. Thick dashed lines should make
enough space to show the dash-repeat, but in the simple case lines and bars should match! Fixed.

Value tags on HBars - were allowing rather generous padding, so if written in a small font they could
softly and suddenly vanish away, a little too early. Fixed - padding is now the width of ! in the
current valuetag font rather than a fixed amount in points.

ACDS 19th Feb 2007

MapCoords - new utility to take x and y values (in chart-axis co-ordinates) and translate the numbers
to points suitable for placing Notes and Keys with Absolute positioning. This may be more convenient
when placing text to annotate data values.

ACDS 30th Jan 2007

Date+Time style - if you set en explicit array of XTicks as OADate values this mistakenly divided
the numbers by 24 (correct for Time style but not for Date|Time). Fixed.

ACDS 15th Jan 2007

Barcharts - a single group with several bars would put a tick on every bar rather than a single
tick on the whole group. Now only switches to a tick per bar if the number of supplied
labels matches the number of bars in the group.

ACDS 10th Jan 2007

Stepcharts - vertical value labels only aligned correctly on style 'surface'. Now work the
same way if the chart is unfilled, or if risers are drawn.

Adds support for style 'Horizontal' which simply flips the axes around. Handy for population
pyramids with irregular age bands.

ACDS 3rd Jan 2007

Z-Axis scaling - automatic tickmarks now allow for the perspective projection of the Z-axis which
generally results in less crowded ticks for charts where the viewpoint leaves this axis
very foreshortened by the perspective effect.

ACDS 1st Jan 2007

Axis labels on 3D charts - both X and Y labels now support the AngledLabels style which writes
the labels midlined on a projection of the corresponding gridline. Because of the perspective
projection these lines are not quite parallel, so it probably makes no sense to allow the user
to set an explicit angle here.

ACDS 23rd Dec 2006

Date/Time style - the 14/Nov fix had the side-effect of Flooring OLE dates which knocked out
the Time element rather effectively. Fixed!

ACDS 4th Dec 2006

Value tags - ValueStyle 'ShowAllTags' turns off the checking on space so collisions can happen.
Apparently Business Objects does this and some users like it! Oh well. Maybe one day we move
the tags out of the side of the bars and use spider lines like piecharts. This will do
for today.

ACDS 22nd Nov 2006

Date labels - dates in the format YYYYMMDD are accepted as X-values (in addition to OLE dates) and
correctly formatted as labels for the X-axis. However it was not possible to pass an array of
numeric dates as the argument to SetXLabels and have the date formatter applied to them automatically.
You can now do thie (e.g. for barcharts of monthly values) but you must set the format string
such as "MM YYYY" before setting the labels, as the conversion is handled by the Set function here.

ACDS 14th Nov 2006

Towers - test for "it's a column chart" was a bit too simple so sp.DrawTowerChart on a simple vector
of numbers could step outside its bounding box and mess up the Xlabels. Fixed.

ACDS 19th Sept 2006

SaveImage as Metafile - was using the inbuilt Save method which saves a raster image
wrapped as a metafile. Now it gets the vector version as a memory stream and saves that
instead, which gives much better scaling, for example when used in a Word document.

RenderImagemap - was using 'alt=' for the tips on each link, which works in IE but not
in Firefox - changed to use 'title=' which works in both. Setting the status text to
implement hints seems not to work in Firefox, which is odd as it works fine in
Netscape-3, so more research may be required.

DrawImage - allows existing artwork (bitmap or metafile) to be added either to the
chart background (probably a company logo) or as additional markers to the
completed chart. The caller may give a bitmap object or filename and optional uri and size.
The bitmap is required for embedded formats and the uri is used to make the link for web
graphics. The artwork will be sized (preserving aspect if only the width is given) using
points or chart co-ordinates depending at what stage it is drawn.

ACDS 13th July 2006

NewPage - adds an option to reset all properties (defaults to true) and also clears the
table of key placeholders - keys cannot carry across pages.

Auto-ranging for 'Duration' style - values are minutes, but we try to get ticks to the
nearest quarter-hour when the range allows it - which gives much tidier scaling.

ResetKey - removes any accumulated placeholders from the key definitions.

Font scaling - ResetFrame was not rescaling the footnote font - fixed.

ACDS 14th June 2006

DrawVectors - will plot a scatter of arrows (for current-flow charts) or any kind of
directed graph involving nodes and connections. Takes the start and end-points of
a set of vectors and draws them as independent lines with optional nodes or
arrowheads. Value tags are written along the lines, centred above. SplitBy may
be used to draw the lines in multiple colours and generate a key for them.

ACDS 8th June 2006

DrawTable - now accepts arrays of strings, allowing the caller to format the data before
creating the table. Also, this was eliminating empty cells rather than just skipping
past them, possibly mis-aligning the rest of the row. Fixed.

ACDS 1st June 2006

Angled captions - the PDF output was rounding the transform matrix too soon, and losing
precision in the angle as a result. Fixed. Also the placement of angled multi-line
captions was not as pretty as it should be - also fixed.

ACDS May 20th 2006

XBarChart - was incorrectly forcing an extra final (as well as initial) tick on the X-axis. Fixed.

Keys - automatic keys (set without explicit keyframe) now wrap the text much more
intelligently. Hopefully with this behaviour and KeyNudge for fine adjustments, we
can forget KeyFrame unless the layout is very fussy about key placement.

Data in rows - enhanced slightly to allow a simple barchart to cycle through colours
one per BAR rather than one per GROUP. The X-ticks are drawn with one tick (and X-label)
at each bar, even though they would logically form a single group. Keys work groupwise
as normal, and so each bar has a legend entry. Group gap is ignored, and 'gap' sets the
inter-bar spacing in this case. Use DataStyle = DataStyles.Rows to set this behavior.

ACDS May 3rd 2006

Drop-dead date for the trial version now fixed automatically in the build.

Explicit tick placement failed for exactly 2 tick positions, as the values were confused
with (major,minor) interval settings. Fixed.

ACDS 28th April 2006

Text insertion patterns like X~~X<b>XXXX</b> were failing on multiline labels. The pattern must
be applied before the label is split at newlines! This would otherwise cause a length
mismatch in AE.Expand and crash the engine. Fixed.

Spanned labels were merging duplicates on the innermost rank. Fixed.

ACDS 28th Mar 2006

DrawBubbleChart - now allows 'Radial' scaling, which may be more suitable for unfilled markers
and notes existing Marker Scale so you can just make them ALL bigger in proportion.

Adds style 'ScaleBar' which draws a nominal Z-axis in the right margin with bubbles
scaled at each Z-tickmark. These are lebelled using the ZLabel formatter and drawn
with the Key font.

Scatter plots - value tags note the actual marker size to offset the tag above the marker better.

ACDS 6th Feb 2006

Automatic datumlines - were generated more than once if you plotted more than
one barchart on the same set of axes. Fixed.

Vertical value labels - did not respect 'Middle' style on barcharts. Fixed.

Curves style - a small error in the conversion of Polylines to Bezier curves could give
odd 'overshoot' effects when successive segments differed greatly in length. Did not
show up in timeseries plots, but could draw some very odd contour lines. Fixed.

ACDS 27th Jan 2006

Horizontal bars - categorised data was not being labelled correctly when there were zero values
in stacked barcharts. Fixed.

Aggregations - combining Grouping and Splitting to make a stacked bar from 'database' data
was losing track of the missing values in the original dataset. The rule now is that an
aggregate composed entirely of missing data is now flagged as 'missing' and its value
tags etc will not be drawn. See Barsuite 13/14 which tests it.

ACDS 17th Jan 2006

Xlabels on Column chart - were slipped one label to the right. Also the labels should always
centre-align in the case of an isometric chart. Fixed.

Column chart - scalar data (a simple line of towers) should make a shelf just deep enough
for the bars, not a proper Y-axis. Fixed.

Indexed data - was rebasing the X-values to 100 as well as the y-values in an xy-plot. Fixed.

12th Dec 2005

ScatterPlot - now accepts a category variable on the X-axis (so you can plot Yield vs Farm) for
both integer and floating-point y-values. Moot point whether we need category data on the
y-axis also here!

CloudChart - accepts category data on the x and y axes (but not the z-axis).

14th Dec 2005

Label formatter - for historical reasons this signals wrapping with 'XXXXXXXX;' but it now tolerates
formats like 'xxxxxxxxx
' in addition (a newline embedded in the string simply embeds a
newline in the output as before).

DrawMultiple - no longer does BoxPlot as a type. The new argument style for BoxPlot would really
mess up the overloads required. Skip for now - removed from Desktop sample set!

NewCell - was resetting the scale every cell in a cellular plot, giving some very interesting
artwork in the Wise Eel's Bridge example. Fixed.

KeyDefinition struct - now defaults FillStyle to Solid if omitted from the constructor.

15th Dec 2005

Tracechart - notices XYPlot style now. Allows X-values as first element of array.

16th Dec 2005

Autorange - with XAxis style 'Date,Time' we were dividing the specified Xrange by 24, so a range
like 35414.5 35419 was ending up as dates around 1904. Fixed.

ACDS 5th Jan 2006

Baseline - was not being applied consistently on both chart orientations. Also the interaction
with intercept axes was not well-defined. Now the rule is:

- A baseline is an explicit instruction, so use it if given
- Failing that, if there is an intercept axis, use that as the baseline
- N.B. Top or Right XYaxis counts as a special intercept setting here!
- Otherwise use Zero (or the extreme ticks) to run the bars from

Duration formatting - X or Y style 'Duration' will trigger base-60 formatting. No assumptions
are made about the units, except that base 60 is used for magnitudes and : as the separator.
Use ValueTagStyles.Duration to have the same formatting applied to the value labels.

Piecharts - with VML extrusion the sorting for 'Farthest first' failed when the last segment
wrapped over from 5:00 to the end. Fixed. Also JavaScript handlers set for specific segments
were not re-targetted correctly (simple vectors of hints etc were OK). Fixed.

Multi-threading - in some cases it was possible for two instances of SharpPlot to interfere
when running on the same process in different threads. This has now been fixed.

ACDS 6th Dec 2005

HBars - barcharts which could go either left or right from a centre axis got badly confused
when the user had given text value labels. Now the missing value boolean is passed down along
with ALL the bars (one each for left and right) so everything is compressed in synch.

ACDS 1st Nov 2005

YCaptions - were wrapped when 'atend' using the margin width, even when you specified an
explicit Y-axis position. This case now looks at the nearer edge and allows twice this
distance as the wrapping width.

Captions, labels, headings and footers all have a "NoWrap" style added so that the user can
turn off automatic wrapping if it becomes a nuisance.

Labels on the top axis of a pair of Duplicate Xaxes were not 'thinned' to match the labels
on the lower axis. Also the tickmarks could get stuck to the lower axis for horizontal
barcharts with duplicate Xaxes. Fixed.

ACDS 15th Sept 2005

Tickmarks - both axes tidied up at the ends for the 'exploded' case or any other example when
there is not a crossing axis or overhanging axis line available. In all these cases the
first or last tickmark moves inward by half the line-weight to make a clean join.

ACDS 30th August 2005

BoxPlot - reworked to match the style of Grapl. Rather than setting up the criteria as
categories with SplitBy we now pass them in directly as arguments. Much simpler to
see what is going on and should be a lot easier to code. Several examples changed
to match and a lot more tests added.

ACDS 29th Aug 2005

Autoranging - we are careful not to generate half-integer ticks for integer data that spans
a small range (say 3 2 2 4 3) - this now extends to powers of 10 in the obvious way.

ACDS 19th August 2005

Value tags - tags with style 'inside' on horizontal barcharts were misplaced. This error was
introduced when porting from GraplNet to SharpPlot and only applies to tags on bars with
negative values. Fixed.

HBars - horizontal barcharts with ALL -ve values and a 'free' X-Axis extended the bar to
the zero-point rather than the rightmost tickmark. Fixed.

ACDS 15th August 2005

Key frame - keys with an explicit frame and style 'boxed' now draw around the text, which
is wrapped into the width available if required. Autofit works as before, but may be
constrained differently, as the wrapped text may force more vertical space to be used.
You can still use the key format picture to set a smaller width.

ACDS 26th July 2005

Wrapping text - YLabels and YCaption (Atend style) now wrap automatically into the
available margin width if no formatter is given. All calls to xfmt now have a
placeholder for the default width, generally set to 0 to preserve old behaviour. The
only other auto-wraps are headings, subheads, footnotes and the 'atend' Xcaption
where the width is also known.

YLabels - moved a little right when set 'between' tick marks which improves the visual
style of horizontal barcharts and also allows a touch more wrapping width.

Headings - were actually centering between the Y-axis and the right edge of the frame.
They should centre over the chart (the X-Axis) which normally looks close enough that
the discrepancy was never spotted. Until now. Note that headings wrap across the
entire page (less a small gutter) but the subhead wraps within the axes as it may
be dropped down within the chart area.

Value tags - can now be 'angled' (default rotation at 34deg) and left-aligned
at the data point (or running from the centre of the top of the bar). Multi-line
tags are stacked 'upwards' to sit nicely above the data here.

ACDS 13th July 2005

Formatters - numeric and text pictures both now use the ~ to suppress the
matching digit in the input.

Dates - date formatter accepts newlines (dodges the limitation in the .Net ToString method) and also
we tolerate dates as vectors of 19530321 numbers as well as OLE dates. Many timeseries still use this
style for the date column.

ACDS 7th July 2005

The new KeyNudge setting was not noticed by keys with style 'InLine'
which is one of the more useful places! Fixed. Charts with a mix of
lines and markers and the 'Vertical' key style drew a spurious line
through the marker-only keys. Fixed.

DrawLineGraph failed to handle hyperlinks correctly with line array with
all 0's and missingvalue = 0. Fixed.

Tips on markers were wrong if line array contains one value (so just 1
marker is displayed and hence no line is drawn) Fixed.

AddHyperlinks - It was not possible to keep 'normal'
cursor for certain bars/markers, but have a hand cursor show over bars
with JavaScript actions. Now SharpPlot accepts a hyperlink of one or
more blanks to mean 'show the hand' and an empty link to mean 'do
nothing'. This allows the application to pass an array of links, some of
which cause hands to appear and some of which don't.

If an array of data has only a single sample, then the xlabel is
displayed 3 times (replicated incorrectly for the ticks at the origin
and the end of the axis). Fixed.

It was not possible to center line chart markers between ticks as for
bar charts. This is best done by setting the IndexOrigin to 0.5 so that
the nominal X-axis places the points at 0.5 1.5 .... n.5 rather than 1 2
3 .... n. This required the IndexOrigin to be double, not int. Fixed.

Text measurement was failing to handle long strings of '&amp;#1234;'
with no intervening 'normal' characters. This messed up key placement
with korean text which contains nothing but coded characters. Fixed.

The trendline doesn't look good if there are only a few markers
(typically less than 5) as it tends to plateau at all the points. The
flexibility is now adjusted to give the same visual effect as the
numbers of points is reduced.

Using custom tick lengths with barcharts eliminated the tickmark at the
origin. Only noticeable for the 'clipped' YStyle as otherwise the axis
extends down to the length of the longest tick anyway. Fixed.
Ticks on bar chart were failing to cancel prior effect settings, so a
shadowed heading was resulting in shadowed ticks. Fixed.

ACDS 6th July 2005

Frame, key, notes - a round-cornered box with a gradient fill broke the raster rendering
as it must be given an explicit bounding-box for the gradient. Fixed.

Segmented lines - in linegraphs with missing values, it is possible to have isolated points.
These are harmless in all formats except EMF where they invalidate the previous line-segment.
These are now checked for and not drawn.

ACDS 6th April 2005


SharpPlot 3.71 User Manual: Licensing

Licensing

Dyalog Ltd. acquired Causeway Graphical Systems and their suite of products in 2007.

SharpPlot is used by a significant number of important clients, and will continue to be supported and enhanced by Dyalog for the foreseeable future.

Pricing

A single perpetual developer licence costs £600, which includes a one-year support for helpdesk, bug fixing and updates.

Further annual maintenance subscription costs £150. Developers may purchase it at any time and are not required to renew it every year.

Contact

For further information, please contact sales@dyalog.com or call our UK office on +44 (0)1256 830030.

Dyalog Ltd,
Minchens Court,
Minchens Lane,
Bramley,
Hampshire
RG26 5BH,
United Kingdom.


SharpPlot 3.71 User Manual: APL paragraphs

APL paragraphs

Here’s the definition of the sample paragraphs used in a couple of SharpLeaf tutorials

   aplparas = new string[]{"The mathematical notation for manipulating arrays which "+
            "developed into the APL programming language was developed by Iverson at "+
            "Harvard University starting in 1957, and published in his A Programming "+
            "Language in 1962. The preface states its premise:","Applied mathematics "+
            "is largely concerned with the design and analysis of explicit procedures "+
            "for calculating the exact or approximate values of various functions. "+
            "Such explicit procedures are called algorithms or programs. Because an "+
            "effective notation for the description of programs exhibits considerable "+
            "syntactic structure, it is called a programming language.","In 1960, he "+
            "began work for IBM and, working with Adin Falkoff, created APL based on "+
            "the notation he had developed. This notation was used inside IBM for "+
            "short research reports on computer systems, such as the Burroughs B5000 "+
            "and its stack mechanism when stack machines versus register machines were "+
            "being evaluated by IBM for upcoming computers.","Also in 1960, Iverson "+
            "used his notation in a draft of the chapter \"A Programming Language\", "+
            "written for a book he was writing with Fred Brooks, Automatic Data "+
            "Processing, which would be published in 1963.","As early as 1962, the "+
            "first attempt to use the notation to describe a complete computer system "+
            "happened after Falkoff discussed with Dr. William C. Carter his work in "+
            "the standardization of the instruction set for the machines that later "+
            "became the IBM System/360 family.","In 1963, Herbert Hellerman, working "+
            "at the IBM Systems Research Institute, implemented a part of the notation "+
            "on an IBM 1620 computer, and it was used by students in a special high "+
            "school course on calculating transcendental functions by series "+
            "summation. Students tested their code in Hellerman's lab. This "+
            "implementation of a portion of the notation was called PAT (Personalized "+
            "Array Translator).","In 1963, Falkoff, Iverson, and Edward H. Sussenguth "+
            "Jr., all working at IBM, used the notation for a formal description of "+
            "the IBM System/360 series machine architecture and functionality, which "+
            "resulted in a paper published in IBM Systems Journal in 1964. After this "+
            "was published, the team turned their attention to an implementation of "+
            "the notation on a computer system. One of the motivations for this focus "+
            "of implementation was the interest of John L. Lawrence who had new duties "+
            "with Science Research Associates, an educational company bought by IBM in "+
            "1964. Lawrence asked Iverson and his group to help utilize the language "+
            "as a tool for the development and use of computers in education.","After "+
            "Lawrence M. Breed and Philip S. Abrams of Stanford University joined the "+
            "team at IBM Research, they continued their prior work on an "+
            "implementation programmed in FORTRAN IV for a portion of the notation was "+
            "done for the IBM 7090 computer running under the IBSYS operating system. "+
            "This work was finished in late 1965 and later known as IVSYS (Iverson "+
            "System). The basis of this implementation was described in detail by "+
            "Abrams in a Stanford University Technical Report, \"An Interpreter for "+
            "Iverson Notation\" in 1966. Like Hellerman's PAT system earlier, this "+
            "implementation did not include the APL character set but used special "+
            "English reserved words for functions and operators. The system was later "+
            "adapted for a time-sharing system and, by November 1966, it had been "+
            "reprogrammed for the IBM/360 Model 50 computer running in a time sharing "+
            "mode and was used internally at IBM.","IBM typeballs (one OCR) with clip, "+
            "€2 coin for scale","A key development in the ability to use APL "+
            "effectively, before the widespread use of CRT terminals, was the "+
            "development of a special IBM Selectric typewriter interchangeable "+
            "typeball with all the special APL characters on it. This was used on "+
            "paper printing terminal workstations using the Selectric typewriter and "+
            "typeball mechanism, such as the IBM 1050 and IBM 2741 terminal. Keycaps "+
            "could be placed over the normal keys to show which APL characters would "+
            "be entered and typed when that key was struck. For the first time, a "+
            "programmer could actually type in and see real APL characters as used in "+
            "Iverson's notation and not be forced to use awkward English keyword "+
            "representations of them. Falkoff and Iverson had the special APL "+
            "Selectric typeballs, 987 and 988, designed in late 1964, although no APL "+
            "computer system was available to use them. Iverson cited Falkoff as the "+
            "inspiration for the idea of using an IBM Selectric typeball for the APL "+
            "character set.","A programmer's view of the IBM 2741 keyboard layout with "+
            "the APL typeball print head inserted","Some APL symbols, even with the "+
            "APL characters on the typeball, still had to be typed in by over-striking "+
            "two existing typeball characters. An example would be the \"grade up\" "+
            "character, which had to be made from a \"delta\" (shift-H) and a "+
            "\"Sheffer stroke\" (shift-M). This was necessary because the APL "+
            "character set was larger than the 88 characters allowed on the Selectric "+
            "typeball.","The first APL interactive login and creation of an APL "+
            "workspace was in 1966 by Larry Breed using an IBM 1050 terminal at the "+
            "IBM Mohansic Labs near Thomas J. Watson Research Center, the home of APL, "+
            "in Yorktown Heights, New York.","IBM was chiefly responsible for the "+
            "introduction of APL to the marketplace. APL was first available in 1967 "+
            "for the IBM 1130 as APL\\1130. It would run in as little as 8k 16-bit "+
            "words of memory, and used a dedicated 1 megabyte hard disk."};