First commit

Send all results
This commit is contained in:
2020-09-04 12:49:15 +05:00
commit 330a2ccfda
2819 changed files with 226201 additions and 0 deletions

View File

@@ -0,0 +1,232 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
#if !WINDOWS_PHONE
using System.ComponentModel;
#endif
namespace PdfSharp.Charting
{
/// <summary>
/// This class represents an axis in a chart.
/// </summary>
public class Axis : ChartObject
{
/// <summary>
/// Initializes a new instance of the Axis class with the specified parent.
/// </summary>
internal Axis(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new Axis Clone()
{
return (Axis)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
Axis axis = (Axis)base.DeepCopy();
if (axis._title != null)
{
axis._title = axis._title.Clone();
axis._title._parent = axis;
}
if (axis._tickLabels != null)
{
axis._tickLabels = axis._tickLabels.Clone();
axis._tickLabels._parent = axis;
}
if (axis._lineFormat != null)
{
axis._lineFormat = axis._lineFormat.Clone();
axis._lineFormat._parent = axis;
}
if (axis._majorGridlines != null)
{
axis._majorGridlines = axis._majorGridlines.Clone();
axis._majorGridlines._parent = axis;
}
if (axis._minorGridlines != null)
{
axis._minorGridlines = axis._minorGridlines.Clone();
axis._minorGridlines._parent = axis;
}
return axis;
}
#endregion
#region Properties
/// <summary>
/// Gets the title of the axis.
/// </summary>
public AxisTitle Title
{
get { return _title ?? (_title = new AxisTitle(this)); }
}
internal AxisTitle _title;
/// <summary>
/// Gets or sets the minimum value of the axis.
/// </summary>
public double MinimumScale
{
get { return _minimumScale; }
set { _minimumScale = value; }
}
internal double _minimumScale = double.NaN;
/// <summary>
/// Gets or sets the maximum value of the axis.
/// </summary>
public double MaximumScale
{
get { return _maximumScale; }
set { _maximumScale = value; }
}
internal double _maximumScale = double.NaN;
/// <summary>
/// Gets or sets the interval of the primary tick.
/// </summary>
public double MajorTick
{
get { return _majorTick; }
set { _majorTick = value; }
}
internal double _majorTick = double.NaN;
/// <summary>
/// Gets or sets the interval of the secondary tick.
/// </summary>
public double MinorTick
{
get { return _minorTick; }
set { _minorTick = value; }
}
internal double _minorTick = double.NaN;
/// <summary>
/// Gets or sets the type of the primary tick mark.
/// </summary>
public TickMarkType MajorTickMark
{
get { return _majorTickMark; }
set
{
if (!Enum.IsDefined(typeof(TickMarkType), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(TickMarkType));
_majorTickMark = value;
_majorTickMarkInitialized = true;
}
}
internal TickMarkType _majorTickMark;
internal bool _majorTickMarkInitialized;
/// <summary>
/// Gets or sets the type of the secondary tick mark.
/// </summary>
public TickMarkType MinorTickMark
{
get { return _minorTickMark; }
set
{
if (!Enum.IsDefined(typeof(TickMarkType), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(TickMarkType));
_minorTickMark = value;
_minorTickMarkInitialized = true;
}
}
internal TickMarkType _minorTickMark;
internal bool _minorTickMarkInitialized;
/// <summary>
/// Gets the label of the primary tick.
/// </summary>
public TickLabels TickLabels
{
get { return _tickLabels ?? (_tickLabels = new TickLabels(this)); }
}
internal TickLabels _tickLabels;
/// <summary>
/// Gets the format of the axis line.
/// </summary>
public LineFormat LineFormat
{
get { return _lineFormat ?? (_lineFormat = new LineFormat(this)); }
}
internal LineFormat _lineFormat;
/// <summary>
/// Gets the primary gridline object.
/// </summary>
public Gridlines MajorGridlines
{
get { return _majorGridlines ?? (_majorGridlines = new Gridlines(this)); }
}
internal Gridlines _majorGridlines;
/// <summary>
/// Gets the secondary gridline object.
/// </summary>
public Gridlines MinorGridlines
{
get { return _minorGridlines ?? (_minorGridlines = new Gridlines(this)); }
}
internal Gridlines _minorGridlines;
/// <summary>
/// Gets or sets, whether the axis has a primary gridline object.
/// </summary>
public bool HasMajorGridlines
{
get { return _hasMajorGridlines; }
set { _hasMajorGridlines = value; }
}
internal bool _hasMajorGridlines;
/// <summary>
/// Gets or sets, whether the axis has a secondary gridline object.
/// </summary>
public bool HasMinorGridlines
{
get { return _hasMinorGridlines; }
set { _hasMinorGridlines = value; }
}
internal bool _hasMinorGridlines;
#endregion
}
}

View File

@@ -0,0 +1,125 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the title of an axis.
/// </summary>
public class AxisTitle : ChartObject
{
/// <summary>
/// Initializes a new instance of the AxisTitle class.
/// </summary>
public AxisTitle()
{ }
/// <summary>
/// Initializes a new instance of the AxisTitle class with the specified parent.
/// </summary>
internal AxisTitle(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new AxisTitle Clone()
{
return (AxisTitle)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
AxisTitle axisTitle = (AxisTitle)base.DeepCopy();
if (axisTitle._font != null)
{
axisTitle._font = axisTitle._font.Clone();
axisTitle._font._parent = axisTitle;
}
return axisTitle;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets the caption of the title.
/// </summary>
public string Caption
{
get { return _caption; }
set { _caption = value; }
}
internal string _caption = String.Empty;
/// <summary>
/// Gets the font of the title.
/// </summary>
public Font Font
{
get { return _font ?? (_font = new Font(this)); }
}
internal Font _font;
/// <summary>
/// Gets or sets the orientation of the caption.
/// </summary>
public double Orientation
{
get { return _orientation; }
set { _orientation = value; }
}
internal double _orientation;
/// <summary>
/// Gets or sets the horizontal alignment of the caption.
/// </summary>
public HorizontalAlignment Alignment
{
get { return _alignment; }
set { _alignment = value; }
}
internal HorizontalAlignment _alignment;
/// <summary>
/// Gets or sets the vertical alignment of the caption.
/// </summary>
public VerticalAlignment VerticalAlignment
{
get { return _verticalAlignment; }
set { _verticalAlignment = value; }
}
internal VerticalAlignment _verticalAlignment;
#endregion
}
}

View File

@@ -0,0 +1,241 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Represents charts with different types.
/// </summary>
public class Chart : DocumentObject
{
/// <summary>
/// Initializes a new instance of the Chart class.
/// </summary>
public Chart()
{ }
/// <summary>
/// Initializes a new instance of the Chart class with the specified parent.
/// </summary>
internal Chart(DocumentObject parent) : base(parent) { }
/// <summary>
/// Initializes a new instance of the Chart class with the specified chart type.
/// </summary>
public Chart(ChartType type)
: this()
{
Type = type;
}
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new Chart Clone()
{
return (Chart)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
Chart chart = (Chart)base.DeepCopy();
if (chart._xAxis != null)
{
chart._xAxis = chart._xAxis.Clone();
chart._xAxis._parent = chart;
}
if (chart._yAxis != null)
{
chart._yAxis = chart._yAxis.Clone();
chart._yAxis._parent = chart;
}
if (chart._zAxis != null)
{
chart._zAxis = chart._zAxis.Clone();
chart._zAxis._parent = chart;
}
if (chart._seriesCollection != null)
{
chart._seriesCollection = chart._seriesCollection.Clone();
chart._seriesCollection._parent = chart;
}
if (chart._xValues != null)
{
chart._xValues = chart._xValues.Clone();
chart._xValues._parent = chart;
}
if (chart._plotArea != null)
{
chart._plotArea = chart._plotArea.Clone();
chart._plotArea._parent = chart;
}
if (chart._dataLabel != null)
{
chart._dataLabel = chart._dataLabel.Clone();
chart._dataLabel._parent = chart;
}
return chart;
}
/// <summary>
/// Determines the type of the given axis.
/// </summary>
internal string CheckAxis(Axis axis)
{
if ((_xAxis != null) && (axis == _xAxis))
return "xaxis";
if ((_yAxis != null) && (axis == _yAxis))
return "yaxis";
if ((_zAxis != null) && (axis == _zAxis))
return "zaxis";
return "";
}
#endregion
#region Properties
/// <summary>
/// Gets or sets the base type of the chart.
/// ChartType of the series can be overwritten.
/// </summary>
public ChartType Type
{
get { return _type; }
set { _type = value; }
}
internal ChartType _type;
/// <summary>
/// Gets or sets the font for the chart. This will be the default font for all objects which are
/// part of the chart.
/// </summary>
public Font Font
{
get { return _font ?? (_font = new Font(this)); }
}
internal Font _font;
/// <summary>
/// Gets the legend of the chart.
/// </summary>
public Legend Legend
{
get { return _legend ?? (_legend = new Legend(this)); }
}
internal Legend _legend;
/// <summary>
/// Gets the X-Axis of the Chart.
/// </summary>
public Axis XAxis
{
get { return _xAxis ?? (_xAxis = new Axis(this)); }
}
internal Axis _xAxis;
/// <summary>
/// Gets the Y-Axis of the Chart.
/// </summary>
public Axis YAxis
{
get { return _yAxis ?? (_yAxis = new Axis(this)); }
}
internal Axis _yAxis;
/// <summary>
/// Gets the Z-Axis of the Chart.
/// </summary>
public Axis ZAxis
{
get { return _zAxis ?? (_zAxis = new Axis(this)); }
}
internal Axis _zAxis;
/// <summary>
/// Gets the collection of the data series.
/// </summary>
public SeriesCollection SeriesCollection
{
get { return _seriesCollection ?? (_seriesCollection = new SeriesCollection(this)); }
}
internal SeriesCollection _seriesCollection;
/// <summary>
/// Gets the collection of the values written on the X-Axis.
/// </summary>
public XValues XValues
{
get { return _xValues ?? (_xValues = new XValues(this)); }
}
internal XValues _xValues;
/// <summary>
/// Gets the plot (drawing) area of the chart.
/// </summary>
public PlotArea PlotArea
{
get { return _plotArea ?? (_plotArea = new PlotArea(this)); }
}
internal PlotArea _plotArea;
/// <summary>
/// Gets or sets a value defining how blanks in the data series should be shown.
/// </summary>
public BlankType DisplayBlanksAs
{
get { return _displayBlanksAs; }
set { _displayBlanksAs = value; }
}
internal BlankType _displayBlanksAs;
/// <summary>
/// Gets the DataLabel of the chart.
/// </summary>
public DataLabel DataLabel
{
get { return _dataLabel ?? (_dataLabel = new DataLabel(this)); }
}
internal DataLabel _dataLabel;
/// <summary>
/// Gets or sets whether the chart has a DataLabel.
/// </summary>
public bool HasDataLabel
{
get { return _hasDataLabel; }
set { _hasDataLabel = value; }
}
internal bool _hasDataLabel;
#endregion
}
}

View File

@@ -0,0 +1,228 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System.Collections.Generic;
using PdfSharp.Drawing;
using PdfSharp.Charting.Renderers;
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the frame which holds one or more charts.
/// </summary>
public class ChartFrame
{
/// <summary>
/// Initializes a new instance of the ChartFrame class.
/// </summary>
public ChartFrame()
{ }
/// <summary>
/// Initializes a new instance of the ChartFrame class with the specified rectangle.
/// </summary>
public ChartFrame(XRect rect)
{
_location = rect.Location;
_size = rect.Size;
}
/// <summary>
/// Gets or sets the location of the ChartFrame.
/// </summary>
public XPoint Location
{
get { return _location; }
set { _location = value; }
}
XPoint _location;
/// <summary>
/// Gets or sets the size of the ChartFrame.
/// </summary>
public XSize Size
{
get { return _size; }
set { _size = value; }
}
XSize _size;
/// <summary>
/// Adds a chart to the ChartFrame.
/// </summary>
public void Add(Chart chart)
{
if (_chartList == null)
_chartList = new List<Chart>();
_chartList.Add(chart);
}
/// <summary>
/// Draws all charts inside the ChartFrame.
/// </summary>
public void Draw(XGraphics gfx)
{
// Draw frame of ChartFrame. First shadow frame.
const int dx = 5;
const int dy = 5;
gfx.DrawRoundedRectangle(XBrushes.Gainsboro,
_location.X + dx, _location.Y + dy,
_size.Width, _size.Height, 20, 20);
XRect chartRect = new XRect(_location.X, _location.Y, _size.Width, _size.Height);
XLinearGradientBrush brush = new XLinearGradientBrush(chartRect, XColor.FromArgb(0xFFD0DEEF), XColors.White,
XLinearGradientMode.Vertical);
XPen penBorder = new XPen(XColors.SteelBlue, 2.5);
gfx.DrawRoundedRectangle(penBorder, brush,
_location.X, _location.Y, _size.Width, _size.Height,
15, 15);
XGraphicsState state = gfx.Save();
gfx.TranslateTransform(_location.X, _location.Y);
// Calculate rectangle for all charts. Y-Position will be moved for each chart.
int charts = _chartList.Count;
const uint dxChart = 20;
const uint dyChart = 20;
const uint dyBetweenCharts = 30;
XRect rect = new XRect(dxChart, dyChart,
_size.Width - 2 * dxChart,
(_size.Height - (charts - 1) * dyBetweenCharts - 2 * dyChart) / charts);
// draw each chart in list
foreach (Chart chart in _chartList)
{
RendererParameters parms = new RendererParameters(gfx, rect);
parms.DrawingItem = chart;
ChartRenderer renderer = GetChartRenderer(chart, parms);
renderer.Init();
renderer.Format();
renderer.Draw();
rect.Y += rect.Height + dyBetweenCharts;
}
gfx.Restore(state);
// // Calculate rectangle for all charts. Y-Position will be moved for each chart.
// int charts = chartList.Count;
// uint dxChart = 0;
// uint dyChart = 0;
// uint dyBetweenCharts = 0;
// XRect rect = new XRect(dxChart, dyChart,
// size.Width - 2 * dxChart,
// (size.Height - (charts - 1) * dyBetweenCharts - 2 * dyChart) / charts);
//
// // draw each chart in list
// foreach (Chart chart in chartList)
// {
// RendererParameters parms = new RendererParameters(gfx, rect);
// parms.DrawingItem = chart;
//
// ChartRenderer renderer = GetChartRenderer(chart, parms);
// renderer.Init();
// renderer.Format();
// renderer.Draw();
//
// rect.Y += rect.Height + dyBetweenCharts;
// }
}
/// <summary>
/// Draws first chart only.
/// </summary>
public void DrawChart(XGraphics gfx)
{
XGraphicsState state = gfx.Save();
gfx.TranslateTransform(_location.X, _location.Y);
if (_chartList.Count > 0)
{
XRect chartRect = new XRect(0, 0, _size.Width, _size.Height);
Chart chart = (Chart)_chartList[0];
RendererParameters parms = new RendererParameters(gfx, chartRect);
parms.DrawingItem = chart;
ChartRenderer renderer = GetChartRenderer(chart, parms);
renderer.Init();
renderer.Format();
renderer.Draw();
}
gfx.Restore(state);
}
/// <summary>
/// Returns the chart renderer appropriate for the chart.
/// </summary>
private ChartRenderer GetChartRenderer(Chart chart, RendererParameters parms)
{
ChartType chartType = chart.Type;
bool useCombinationRenderer = false;
foreach (Series series in chart._seriesCollection)
{
if (series._chartType != chartType)
{
useCombinationRenderer = true;
break;
}
}
if (useCombinationRenderer)
return new CombinationChartRenderer(parms);
switch (chartType)
{
case ChartType.Line:
return new LineChartRenderer(parms);
case ChartType.Column2D:
case ChartType.ColumnStacked2D:
return new ColumnChartRenderer(parms);
case ChartType.Bar2D:
case ChartType.BarStacked2D:
return new BarChartRenderer(parms);
case ChartType.Area2D:
return new AreaChartRenderer(parms);
case ChartType.Pie2D:
case ChartType.PieExploded2D:
return new PieChartRenderer(parms);
}
return null;
}
/// <summary>
/// Holds the charts which will be drawn inside the ChartFrame.
/// </summary>
List<Chart> _chartList;
}
}

View File

@@ -0,0 +1,48 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Base class for all chart classes.
/// </summary>
public class ChartObject : DocumentObject
{
/// <summary>
/// Initializes a new instance of the ChartObject class.
/// </summary>
public ChartObject()
{ }
/// <summary>
/// Initializes a new instance of the ChartObject class with the specified parent.
/// </summary>
internal ChartObject(DocumentObject parent) : base(parent) { }
}
}

View File

@@ -0,0 +1,134 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
#if !WINDOWS_PHONE
using System.ComponentModel;
#endif
namespace PdfSharp.Charting
{
/// <summary>
/// Represents a DataLabel of a Series
/// </summary>
public class DataLabel : DocumentObject
{
/// <summary>
/// Initializes a new instance of the DataLabel class.
/// </summary>
public DataLabel()
{ }
/// <summary>
/// Initializes a new instance of the DataLabel class with the specified parent.
/// </summary>
internal DataLabel(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new DataLabel Clone()
{
return (DataLabel)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
DataLabel dataLabel = (DataLabel)base.DeepCopy();
if (dataLabel._font != null)
{
dataLabel._font = dataLabel._font.Clone();
dataLabel._font._parent = dataLabel;
}
return dataLabel;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets a numeric format string for the DataLabel.
/// </summary>
public string Format
{
get { return _format; }
set { _format = value; }
}
internal string _format = String.Empty;
/// <summary>
/// Gets the Font for the DataLabel.
/// </summary>
public Font Font
{
get { return _font ?? (_font = new Font(this)); }
}
internal Font _font;
/// <summary>
/// Gets or sets the position of the DataLabel.
/// </summary>
public DataLabelPosition Position
{
get { return (DataLabelPosition)_position; }
set
{
if (!Enum.IsDefined(typeof(DataLabelPosition), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(DataLabelPosition));
_position = value;
_positionInitialized = true;
}
}
internal DataLabelPosition _position;
internal bool _positionInitialized;
/// <summary>
/// Gets or sets the type of the DataLabel.
/// </summary>
public DataLabelType Type
{
get { return _type; }
set
{
if (!Enum.IsDefined(typeof(DataLabelType), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(DataLabelType));
_type = value;
_typeInitialized = true;
}
}
internal DataLabelType _type;
internal bool _typeInitialized;
#endregion
}
}

View File

@@ -0,0 +1,87 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Base class for all chart classes.
/// </summary>
public class DocumentObject
{
/// <summary>
/// Initializes a new instance of the DocumentObject class.
/// </summary>
public DocumentObject()
{ }
/// <summary>
/// Initializes a new instance of the DocumentObject class with the specified parent.
/// </summary>
public DocumentObject(DocumentObject parent)
{
_parent = parent;
}
#region Methods
/// <summary>
/// Creates a deep copy of the DocumentObject. The parent of the new object is null.
/// </summary>
public object Clone()
{
return DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected virtual object DeepCopy()
{
DocumentObject value = (DocumentObject)MemberwiseClone();
value._parent = null;
return value;
}
#endregion
#region Properties
/// <summary>
/// Gets the parent object.
/// </summary>
public DocumentObject Parent
{
get { return _parent; }
}
/// <summary>
///
/// </summary>
/*protected*/
internal DocumentObject _parent;
#endregion
}
}

View File

@@ -0,0 +1,261 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
namespace PdfSharp.Charting
{
/// <summary>
/// Base class of all collections.
/// </summary>
public abstract class DocumentObjectCollection : DocumentObject, IList
{
/// <summary>
/// Initializes a new instance of the DocumentObjectCollection class.
/// </summary>
internal DocumentObjectCollection()
{
_elements = new List<DocumentObject>();
}
/// <summary>
/// Initializes a new instance of the DocumentObjectCollection class with the specified parent.
/// </summary>
internal DocumentObjectCollection(DocumentObject parent)
: base(parent)
{
_elements = new List<DocumentObject>();
}
/// <summary>
/// Gets the element at the specified index.
/// </summary>
public virtual DocumentObject this[int index]
{
get { return _elements[index]; }
internal set { _elements[index] = value; }
}
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new DocumentObjectCollection Clone()
{
return (DocumentObjectCollection)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
DocumentObjectCollection coll = (DocumentObjectCollection)base.DeepCopy();
int count = Count;
coll._elements = new List<DocumentObject>(count);
for (int index = 0; index < count; ++index)
coll._elements.Add((DocumentObject)this[index].Clone());
return coll;
}
/// <summary>
/// Copies the Array_List or a portion of it to a one-dimensional array.
/// </summary>
public void CopyTo(Array array, int index)
{
throw new NotImplementedException("TODO");
//elements.CopyTo(array, index);
}
/// <summary>
/// Removes all elements from the collection.
/// </summary>
public void Clear()
{
_elements.Clear();
}
/// <summary>
/// Inserts an element into the collection at the specified position.
/// </summary>
public virtual void InsertObject(int index, DocumentObject val)
{
_elements.Insert(index, val);
}
/// <summary>
/// Searches for the specified object and returns the zero-based index of the first occurrence.
/// </summary>
public int IndexOf(DocumentObject val)
{
return _elements.IndexOf(val);
}
/// <summary>
/// Removes the element at the specified index.
/// </summary>
public void RemoveObjectAt(int index)
{
_elements.RemoveAt(index);
}
/// <summary>
/// Adds the specified document object to the collection.
/// </summary>
public virtual void Add(DocumentObject value)
{
if (value != null)
value._parent = this;
_elements.Add(value);
}
#endregion
#region Properties
/// <summary>
/// Gets the number of elements actually contained in the collection.
/// </summary>
public int Count
{
get { return _elements.Count; }
}
/// <summary>
/// Gets the first value in the collection, if there is any, otherwise null.
/// </summary>
public DocumentObject First
{
get
{
if (Count > 0)
return this[0];
return null;
}
}
/// <summary>
/// Gets the last element or null, if no such element exists.
/// </summary>
public DocumentObject LastObject
{
get
{
int count = _elements.Count;
if (count > 0)
return (DocumentObject)_elements[count - 1];
return null;
}
}
#endregion
#region IList
bool IList.IsReadOnly
{
get { return false; }
}
bool IList.IsFixedSize
{
get { return false; }
}
object IList.this[int index]
{
get { return _elements[index]; }
set { _elements[index] = (DocumentObject)value; }
}
void IList.RemoveAt(int index)
{
throw new NotImplementedException("IList.RemoveAt");
// TODO: Add DocumentObjectCollection.RemoveAt implementation
}
void IList.Insert(int index, object value)
{
throw new NotImplementedException("IList.Insert");
// TODO: Add DocumentObjectCollection.Insert implementation
}
void IList.Remove(object value)
{
throw new NotImplementedException("IList.Remove");
// TODO: Add DocumentObjectCollection.Remove implementation
}
bool IList.Contains(object value)
{
throw new NotImplementedException("IList.Contains");
// TODO: Add DocumentObjectCollection.Contains implementation
//return false;
}
int System.Collections.IList.IndexOf(object value)
{
throw new NotImplementedException("IList.IndexOf");
// TODO: Add DocumentObjectCollection.System.Collections.IList.IndexOf implementation
//return 0;
}
int IList.Add(object value)
{
throw new NotImplementedException("IList.Add");
// TODO: Add DocumentObjectCollection.Add implementation
//return 0;
}
#endregion
#region ICollection
bool ICollection.IsSynchronized
{
get { return false; }
}
object ICollection.SyncRoot
{
get { return null; }
}
#endregion
/// <summary>
/// Returns an enumerator that iterates through a collection.
/// </summary>
/// <returns>
/// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
/// </returns>
public IEnumerator GetEnumerator()
{
return _elements.GetEnumerator();
}
List<DocumentObject> _elements;
}
}

View File

@@ -0,0 +1,82 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using PdfSharp.Drawing;
namespace PdfSharp.Charting
{
/// <summary>
/// Defines the background filling of the shape.
/// </summary>
public class FillFormat : DocumentObject
{
/// <summary>
/// Initializes a new instance of the FillFormat class.
/// </summary>
public FillFormat()
{ }
/// <summary>
/// Initializes a new instance of the FillFormat class with the specified parent.
/// </summary>
internal FillFormat(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new FillFormat Clone()
{
return (FillFormat)DeepCopy();
}
#endregion
#region Properties
/// <summary>
/// Gets or sets the color of the filling.
/// </summary>
public XColor Color
{
get { return _color; }
set { _color = value; }
}
internal XColor _color = XColor.Empty;
/// <summary>
/// Gets or sets a value indicating whether the background color should be visible.
/// </summary>
public bool Visible
{
get { return _visible; }
set { _visible = value; }
}
internal bool _visible;
#endregion
}
}

View File

@@ -0,0 +1,169 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
using PdfSharp.Drawing;
namespace PdfSharp.Charting
{
/// <summary>
/// Font represents the formatting of characters in a paragraph.
/// </summary>
public sealed class Font : DocumentObject
{
/// <summary>
/// Initializes a new instance of the Font class that can be used as a template.
/// </summary>
public Font()
{ }
/// <summary>
/// Initializes a new instance of the Font class with the specified parent.
/// </summary>
internal Font(DocumentObject parent)
: base(parent)
{ }
/// <summary>
/// Initializes a new instance of the Font class with the specified name and size.
/// </summary>
public Font(string name, XUnit size)
: this()
{
_name = name;
_size = size;
}
#region Methods
/// <summary>
/// Creates a copy of the Font.
/// </summary>
public new Font Clone()
{
return (Font)DeepCopy();
}
#endregion
#region Properties
/// <summary>
/// Gets or sets the name of the font.
/// </summary>
public string Name
{
get { return _name; }
set { _name = value; }
}
internal string _name = String.Empty;
/// <summary>
/// Gets or sets the size of the font.
/// </summary>
public XUnit Size
{
get { return _size; }
set { _size = value; }
}
internal XUnit _size;
/// <summary>
/// Gets or sets the bold property.
/// </summary>
public bool Bold
{
get { return _bold; }
set { _bold = value; }
}
internal bool _bold;
/// <summary>
/// Gets or sets the italic property.
/// </summary>
public bool Italic
{
get { return _italic; }
set { _italic = value; }
}
internal bool _italic;
/// <summary>
/// Gets or sets the underline property.
/// </summary>
public Underline Underline
{
get { return _underline; }
set { _underline = value; }
}
internal Underline _underline;
/// <summary>
/// Gets or sets the color property.
/// </summary>
public XColor Color
{
get { return _color; }
set { _color = value; }
}
internal XColor _color = XColor.Empty;
/// <summary>
/// Gets or sets the superscript property.
/// </summary>
public bool Superscript
{
get { return _superscript; }
set
{
if (_superscript != value)
{
_superscript = value;
_subscript = false;
}
}
}
internal bool _superscript;
/// <summary>
/// Gets or sets the subscript property.
/// </summary>
public bool Subscript
{
get { return _subscript; }
set
{
if (_subscript != value)
{
_subscript = value;
_superscript = false;
}
}
}
internal bool _subscript;
#endregion
}
}

View File

@@ -0,0 +1,85 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the gridlines on the axes.
/// </summary>
public class Gridlines : ChartObject
{
/// <summary>
/// Initializes a new instance of the Gridlines class.
/// </summary>
public Gridlines()
{ }
/// <summary>
/// Initializes a new instance of the Gridlines class with the specified parent.
/// </summary>
internal Gridlines(DocumentObject parent)
: base(parent)
{ }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new Gridlines Clone()
{
return (Gridlines)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
Gridlines gridlines = (Gridlines)base.DeepCopy();
if (gridlines._lineFormat != null)
{
gridlines._lineFormat = gridlines._lineFormat.Clone();
gridlines._lineFormat._parent = gridlines;
}
return gridlines;
}
#endregion
#region Properties
/// <summary>
/// Gets the line format of the grid.
/// </summary>
public LineFormat LineFormat
{
get { return _lineFormat ?? (_lineFormat = new LineFormat(this)); }
}
internal LineFormat _lineFormat;
#endregion
}
}

View File

@@ -0,0 +1,117 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
#if !WINDOWS_PHONE
using System.ComponentModel;
#endif
namespace PdfSharp.Charting
{
/// <summary>
/// Represents a legend of a chart.
/// </summary>
public class Legend : ChartObject
{
/// <summary>
/// Initializes a new instance of the Legend class.
/// </summary>
public Legend()
{ }
/// <summary>
/// Initializes a new instance of the Legend class with the specified parent.
/// </summary>
internal Legend(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new Legend Clone()
{
return (Legend)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
Legend legend = (Legend)base.DeepCopy();
if (legend._lineFormat != null)
{
legend._lineFormat = legend._lineFormat.Clone();
legend._lineFormat._parent = legend;
}
if (legend._font != null)
{
legend._font = legend._font.Clone();
legend._font._parent = legend;
}
return legend;
}
#endregion
#region Properties
/// <summary>
/// Gets the line format of the legend's border.
/// </summary>
public LineFormat LineFormat
{
get { return _lineFormat ?? (_lineFormat = new LineFormat(this)); }
}
internal LineFormat _lineFormat;
/// <summary>
/// Gets the font of the legend.
/// </summary>
public Font Font
{
get { return _font ?? (_font = new Font(this)); }
}
internal Font _font;
/// <summary>
/// Gets or sets the docking type.
/// </summary>
public DockingType Docking
{
get { return _docking; }
set
{
if (!Enum.IsDefined(typeof(DockingType), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(DockingType));
_docking = value;
}
}
internal DockingType _docking;
#endregion
}
}

View File

@@ -0,0 +1,112 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using PdfSharp.Drawing;
namespace PdfSharp.Charting
{
/// <summary>
/// Defines the format of a line in a shape object.
/// </summary>
public class LineFormat : DocumentObject
{
/// <summary>
/// Initializes a new instance of the LineFormat class.
/// </summary>
public LineFormat()
{ }
/// <summary>
/// Initializes a new instance of the LineFormat class with the specified parent.
/// </summary>
internal LineFormat(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new LineFormat Clone()
{
return (LineFormat)DeepCopy();
}
#endregion
#region Properties
/// <summary>
/// Gets or sets a value indicating whether the line should be visible.
/// </summary>
public bool Visible
{
get { return _visible; }
set { _visible = value; }
}
internal bool _visible;
/// <summary>
/// Gets or sets the width of the line in XUnit.
/// </summary>
public XUnit Width
{
get { return _width; }
set { _width = value; }
}
internal XUnit _width;
/// <summary>
/// Gets or sets the color of the line.
/// </summary>
public XColor Color
{
get { return _color; }
set { _color = value; }
}
internal XColor _color = XColor.Empty;
/// <summary>
/// Gets or sets the dash style of the line.
/// </summary>
public XDashStyle DashStyle
{
get { return _dashStyle; }
set { _dashStyle = value; }
}
internal XDashStyle _dashStyle;
/// <summary>
/// Gets or sets the style of the line.
/// </summary>
public LineStyle Style
{
get { return _style; }
set { _style = value; }
}
internal LineStyle _style;
#endregion
}
}

View File

@@ -0,0 +1,48 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// The Pdf-Sharp-Charting-String-Resources.
/// </summary>
// ReSharper disable once InconsistentNaming
internal class PSCSR
{
internal static string InvalidChartTypeForCombination(ChartType chartType)
{
return string.Format("ChartType '{0}' not valid for combination of charts.", chartType.ToString());
}
internal static string PercentNotSupportedByColumnDataLabel
{
get { return "Column data label cannot be set to 'Percent'"; }
}
}
}

View File

@@ -0,0 +1,139 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using PdfSharp.Drawing;
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the area where the actual chart is drawn.
/// </summary>
public class PlotArea : ChartObject
{
/// <summary>
/// Initializes a new instance of the PlotArea class.
/// </summary>
internal PlotArea()
{ }
/// <summary>
/// Initializes a new instance of the PlotArea class with the specified parent.
/// </summary>
internal PlotArea(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new PlotArea Clone()
{
return (PlotArea)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
PlotArea plotArea = (PlotArea)base.DeepCopy();
if (plotArea._lineFormat != null)
{
plotArea._lineFormat = plotArea._lineFormat.Clone();
plotArea._lineFormat._parent = plotArea;
}
if (plotArea._fillFormat != null)
{
plotArea._fillFormat = plotArea._fillFormat.Clone();
plotArea._fillFormat._parent = plotArea;
}
return plotArea;
}
#endregion
#region Properties
/// <summary>
/// Gets the line format of the plot area's border.
/// </summary>
public LineFormat LineFormat
{
get { return _lineFormat ?? (_lineFormat = new LineFormat(this)); }
}
internal LineFormat _lineFormat;
/// <summary>
/// Gets the background filling of the plot area.
/// </summary>
public FillFormat FillFormat
{
get { return _fillFormat ?? (_fillFormat = new FillFormat(this)); }
}
internal FillFormat _fillFormat;
/// <summary>
/// Gets or sets the left padding of the area.
/// </summary>
public XUnit LeftPadding
{
get { return _leftPadding; }
set { _leftPadding = value; }
}
internal XUnit _leftPadding;
/// <summary>
/// Gets or sets the right padding of the area.
/// </summary>
public XUnit RightPadding
{
get { return _rightPadding; }
set { _rightPadding = value; }
}
internal XUnit _rightPadding;
/// <summary>
/// Gets or sets the top padding of the area.
/// </summary>
public XUnit TopPadding
{
get { return _topPadding; }
set { _topPadding = value; }
}
internal XUnit _topPadding;
/// <summary>
/// Gets or sets the bottom padding of the area.
/// </summary>
public XUnit BottomPadding
{
get { return _bottomPadding; }
set { _bottomPadding = value; }
}
internal XUnit _bottomPadding;
#endregion
}
}

View File

@@ -0,0 +1,121 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Represents a formatted value on the data series.
/// </summary>
public class Point : ChartObject
{
/// <summary>
/// Initializes a new instance of the Point class.
/// </summary>
internal Point()
{ }
/// <summary>
/// Initializes a new instance of the Point class with a real value.
/// </summary>
public Point(double value)
: this()
{
Value = value;
}
/// <summary>
/// Initializes a new instance of the Point class with a real value.
/// </summary>
public Point(string value)
: this()
{
// = "34.5 23.9"
Value = 0;
}
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new Point Clone()
{
return (Point)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
Point point = (Point)base.DeepCopy();
if (point._lineFormat != null)
{
point._lineFormat = point._lineFormat.Clone();
point._lineFormat._parent = point;
}
if (point._fillFormat != null)
{
point._fillFormat = point._fillFormat.Clone();
point._fillFormat._parent = point;
}
return point;
}
#endregion
#region Properties
/// <summary>
/// Gets the line format of the data point's border.
/// </summary>
public LineFormat LineFormat
{
get { return _lineFormat ?? (_lineFormat = new LineFormat(this)); }
}
internal LineFormat _lineFormat;
/// <summary>
/// Gets the filling format of the data point.
/// </summary>
public FillFormat FillFormat
{
get { return _fillFormat ?? (_fillFormat = new FillFormat(this)); }
}
internal FillFormat _fillFormat;
/// <summary>
/// The actual value of the data point.
/// </summary>
public double Value
{
get { return _value; }
set { _value = value; }
}
internal double _value;
#endregion
}
}

View File

@@ -0,0 +1,246 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
using PdfSharp.Drawing;
#if !SILVERLIGHT
using System.ComponentModel;
#endif
namespace PdfSharp.Charting
{
/// <summary>
/// Represents a series of data on the chart.
/// </summary>
public class Series : ChartObject
{
/// <summary>
/// Initializes a new instance of the Series class.
/// </summary>
public Series()
{ }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new Series Clone()
{
return (Series)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
Series series = (Series)base.DeepCopy();
if (series._seriesElements != null)
{
series._seriesElements = series._seriesElements.Clone();
series._seriesElements._parent = series;
}
if (series._lineFormat != null)
{
series._lineFormat = series._lineFormat.Clone();
series._lineFormat._parent = series;
}
if (series._fillFormat != null)
{
series._fillFormat = series._fillFormat.Clone();
series._fillFormat._parent = series;
}
if (series._dataLabel != null)
{
series._dataLabel = series._dataLabel.Clone();
series._dataLabel._parent = series;
}
return series;
}
/// <summary>
/// Adds a blank to the series.
/// </summary>
public void AddBlank()
{
Elements.AddBlank();
}
/// <summary>
/// Adds a real value to the series.
/// </summary>
public Point Add(double value)
{
return Elements.Add(value);
}
/// <summary>
/// Adds an array of real values to the series.
/// </summary>
public void Add(params double[] values)
{
Elements.Add(values);
}
#endregion
#region Properties
/// <summary>
/// The actual value container of the series.
/// </summary>
public SeriesElements Elements
{
get { return _seriesElements ?? (_seriesElements = new SeriesElements(this)); }
}
internal SeriesElements _seriesElements;
/// <summary>
/// Gets or sets the name of the series which will be used in the legend.
/// </summary>
public string Name
{
get { return _name; }
set { _name = value; }
}
internal string _name = String.Empty;
/// <summary>
/// Gets the line format of the border of each data.
/// </summary>
public LineFormat LineFormat
{
get { return _lineFormat ?? (_lineFormat = new LineFormat(this)); }
}
internal LineFormat _lineFormat;
/// <summary>
/// Gets the background filling of the data.
/// </summary>
public FillFormat FillFormat
{
get { return _fillFormat ?? (_fillFormat = new FillFormat(this)); }
}
internal FillFormat _fillFormat;
/// <summary>
/// Gets or sets the size of the marker in a line chart.
/// </summary>
public XUnit MarkerSize
{
get { return _markerSize; }
set { _markerSize = value; }
}
internal XUnit _markerSize;
/// <summary>
/// Gets or sets the style of the marker in a line chart.
/// </summary>
public MarkerStyle MarkerStyle
{
get { return _markerStyle; }
set
{
if (!Enum.IsDefined(typeof(MarkerStyle), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(MarkerStyle));
_markerStyle = value;
_markerStyleInitialized = true;
}
}
internal MarkerStyle _markerStyle;
internal bool _markerStyleInitialized;
/// <summary>
/// Gets or sets the foreground color of the marker in a line chart.
/// </summary>
public XColor MarkerForegroundColor
{
get { return _markerForegroundColor; }
set { _markerForegroundColor = value; }
}
internal XColor _markerForegroundColor = XColor.Empty;
/// <summary>
/// Gets or sets the background color of the marker in a line chart.
/// </summary>
public XColor MarkerBackgroundColor
{
get { return _markerBackgroundColor; }
set { _markerBackgroundColor = value; }
}
internal XColor _markerBackgroundColor = XColor.Empty;
/// <summary>
/// Gets or sets the chart type of the series if it's intended to be different than the
/// global chart type.
/// </summary>
public ChartType ChartType
{
get { return _chartType; }
set
{
if (!Enum.IsDefined(typeof(ChartType), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(ChartType));
_chartType = value;
}
}
internal ChartType _chartType;
/// <summary>
/// Gets the DataLabel of the series.
/// </summary>
public DataLabel DataLabel
{
get { return _dataLabel ?? (_dataLabel = new DataLabel(this)); }
}
internal DataLabel _dataLabel;
/// <summary>
/// Gets or sets whether the series has a DataLabel.
/// </summary>
public bool HasDataLabel
{
get { return _hasDataLabel; }
set { _hasDataLabel = value; }
}
internal bool _hasDataLabel;
/// <summary>
/// Gets the element count of the series.
/// </summary>
public int Count
{
get
{
return _seriesElements != null ? _seriesElements.Count : 0;
}
}
#endregion
}
}

View File

@@ -0,0 +1,78 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// The collection of data series.
/// </summary>
public class SeriesCollection : DocumentObjectCollection
{
/// <summary>
/// Initializes a new instance of the SeriesCollection class.
/// </summary>
internal SeriesCollection()
{ }
/// <summary>
/// Initializes a new instance of the SeriesCollection class with the specified parent.
/// </summary>
internal SeriesCollection(DocumentObject parent) : base(parent) { }
/// <summary>
/// Gets a series by its index.
/// </summary>
public new Series this[int index]
{
get { return base[index] as Series; }
}
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new SeriesCollection Clone()
{
return (SeriesCollection)DeepCopy();
}
/// <summary>
/// Adds a new series to the collection.
/// </summary>
public Series AddSeries()
{
Series series = new Series();
// Initialize chart type for each new series.
series._chartType = ((Chart)_parent)._type;
Add(series);
return series;
}
#endregion
}
}

View File

@@ -0,0 +1,93 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the collection of the values in a data series.
/// </summary>
public class SeriesElements : DocumentObjectCollection
{
/// <summary>
/// Initializes a new instance of the SeriesElements class.
/// </summary>
internal SeriesElements()
{ }
/// <summary>
/// Initializes a new instance of the SeriesElements class with the specified parent.
/// </summary>
internal SeriesElements(DocumentObject parent) : base(parent) { }
/// <summary>
/// Gets a point by its index.
/// </summary>
public new Point this[int index]
{
get { return (Point)base[index]; }
}
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new SeriesElements Clone()
{
return (SeriesElements)DeepCopy();
}
/// <summary>
/// Adds a blank to the series.
/// </summary>
public void AddBlank()
{
base.Add(null);
}
/// <summary>
/// Adds a new point with a real value to the series.
/// </summary>
public Point Add(double value)
{
Point point = new Point(value);
Add(point);
return point;
}
/// <summary>
/// Adds an array of new points with real values to the series.
/// </summary>
public void Add(params double[] values)
{
foreach (double val in values)
Add(val);
}
#endregion
}
}

View File

@@ -0,0 +1,95 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the format of the label of each value on the axis.
/// </summary>
public class TickLabels : ChartObject
{
/// <summary>
/// Initializes a new instance of the TickLabels class.
/// </summary>
public TickLabels()
{ }
/// <summary>
/// Initializes a new instance of the TickLabels class with the specified parent.
/// </summary>
internal TickLabels(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new TickLabels Clone()
{
return (TickLabels)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
TickLabels tickLabels = (TickLabels)base.DeepCopy();
if (tickLabels._font != null)
{
tickLabels._font = tickLabels._font.Clone();
tickLabels._font._parent = tickLabels;
}
return tickLabels;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets the label's number format.
/// </summary>
public string Format
{
get { return _format; }
set { _format = value; }
}
internal string _format = String.Empty;
/// <summary>
/// Gets the font of the label.
/// </summary>
public Font Font
{
get { return _font ?? (_font = new Font(this)); }
}
internal Font _font;
#endregion
}
}

View File

@@ -0,0 +1,127 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System.Collections;
namespace PdfSharp.Charting
{
/// <summary>
/// Represents a series of data on the X-Axis.
/// </summary>
public class XSeries : ChartObject
{
/// <summary>
/// Initializes a new instance of the XSeries class.
/// </summary>
public XSeries()
{
_xSeriesElements = new XSeriesElements();
}
/// <summary>
/// Gets the xvalue at the specified index.
/// </summary>
public XValue this[int index]
{
get { return (XValue)_xSeriesElements[index]; }
}
/// <summary>
/// The actual value container of the XSeries.
/// </summary>
protected XSeriesElements _xSeriesElements;
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new XSeries Clone()
{
return (XSeries)DeepCopy();
}
/// <summary>
/// Implements the deep copy of the object.
/// </summary>
protected override object DeepCopy()
{
XSeries xSeries = (XSeries)base.DeepCopy();
if (xSeries._xSeriesElements != null)
{
xSeries._xSeriesElements = xSeries._xSeriesElements.Clone();
xSeries._xSeriesElements._parent = xSeries;
}
return xSeries;
}
/// <summary>
/// Adds a blank to the XSeries.
/// </summary>
public void AddBlank()
{
_xSeriesElements.AddBlank();
}
/// <summary>
/// Adds a value to the XSeries.
/// </summary>
public XValue Add(string value)
{
return _xSeriesElements.Add(value);
}
/// <summary>
/// Adds an array of values to the XSeries.
/// </summary>
public void Add(params string[] values)
{
_xSeriesElements.Add(values);
}
/// <summary>
/// Gets the enumerator.
/// </summary>
/// <returns></returns>
public IEnumerator GetEnumerator()
{
return _xSeriesElements.GetEnumerator();
}
#endregion
#region Properties
/// <summary>
/// Gets the number of xvalues actually contained in the xseries.
/// </summary>
public int Count
{
get { return _xSeriesElements.Count; }
}
#endregion
}
}

View File

@@ -0,0 +1,80 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the collection of the value in an XSeries.
/// </summary>
public class XSeriesElements : DocumentObjectCollection
{
/// <summary>
/// Initializes a new instance of the XSeriesElements class.
/// </summary>
public XSeriesElements()
{ }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new XSeriesElements Clone()
{
return (XSeriesElements)base.DeepCopy();
}
/// <summary>
/// Adds a blank to the XSeries.
/// </summary>
public void AddBlank()
{
base.Add(null);
}
/// <summary>
/// Adds a value to the XSeries.
/// </summary>
public XValue Add(string value)
{
XValue xValue = new XValue(value);
Add(xValue);
return xValue;
}
/// <summary>
/// Adds an array of values to the XSeries.
/// </summary>
public void Add(params string[] values)
{
foreach (string val in values)
Add(val);
}
#endregion
}
}

View File

@@ -0,0 +1,72 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the actual value on the XSeries.
/// </summary>
public class XValue : ChartObject
{
/// <summary>
/// Initializes a new instance of the XValue class.
/// </summary>
internal XValue()
{ }
/// <summary>
/// Initializes a new instance of the XValue class with the specified value.
/// </summary>
public XValue(string value)
: this()
{
if (value == null)
throw new ArgumentNullException("value");
_value = value;
}
/// <summary>
/// The actual value of the XValue.
/// </summary>
internal string _value;
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new XValue Clone()
{
return (XValue)DeepCopy();
}
#endregion
}
}

View File

@@ -0,0 +1,76 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Represents the collection of values on the X-Axis.
/// </summary>
public class XValues : DocumentObjectCollection
{
/// <summary>
/// Initializes a new instance of the XValues class.
/// </summary>
public XValues()
{ }
/// <summary>
/// Initializes a new instance of the XValues class with the specified parent.
/// </summary>
internal XValues(DocumentObject parent) : base(parent) { }
#region Methods
/// <summary>
/// Creates a deep copy of this object.
/// </summary>
public new XValues Clone()
{
return (XValues)DeepCopy();
}
/// <summary>
/// Gets an XSeries by its index.
/// </summary>
public new XSeries this[int index]
{
get { return base[index] as XSeries; }
}
/// <summary>
/// Adds a new XSeries to the collection.
/// </summary>
public XSeries AddXSeries()
{
XSeries xSeries = new XSeries();
Add(xSeries);
return xSeries;
}
#endregion
}
}

View File

@@ -0,0 +1,52 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Determines how null values will be handled in a chart.
/// </summary>
public enum BlankType
{
/// <summary>
/// Null value is not plotted.
/// </summary>
NotPlotted,
/// <summary>
/// Null value will be interpolated.
/// </summary>
Interpolated,
/// <summary>
/// Null value will be handled as zero.
/// </summary>
Zero
}
}

View File

@@ -0,0 +1,77 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Specifies with type of chart will be drawn.
/// </summary>
public enum ChartType
{
/// <summary>
/// A line chart.
/// </summary>
Line,
/// <summary>
/// A clustered 2d column chart.
/// </summary>
Column2D,
/// <summary>
/// A stacked 2d column chart.
/// </summary>
ColumnStacked2D,
/// <summary>
/// A 2d area chart.
/// </summary>
Area2D,
/// <summary>
/// A clustered 2d bar chart.
/// </summary>
Bar2D,
/// <summary>
/// A stacked 2d bar chart.
/// </summary>
BarStacked2D,
/// <summary>
/// A 2d pie chart.
/// </summary>
Pie2D,
/// <summary>
/// An exploded 2d pie chart.
/// </summary>
PieExploded2D,
}
}

View File

@@ -0,0 +1,57 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Determines where the data label will be positioned.
/// </summary>
public enum DataLabelPosition
{
/// <summary>
/// DataLabel will be centered inside the bar or pie.
/// </summary>
Center,
/// <summary>
/// Inside the bar or pie at the origin.
/// </summary>
InsideBase,
/// <summary>
/// Inside the bar or pie at the edge.
/// </summary>
InsideEnd,
/// <summary>
/// Outside the bar or pie.
/// </summary>
OutsideEnd
}
}

View File

@@ -0,0 +1,52 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Determines the type of the data label.
/// </summary>
public enum DataLabelType
{
/// <summary>
/// No DataLabel.
/// </summary>
None,
/// <summary>
/// Percentage of the data. For pie charts only.
/// </summary>
Percent,
/// <summary>
/// Value of the data.
/// </summary>
Value
}
}

View File

@@ -0,0 +1,54 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Specifies the legend's position inside the chart.
/// </summary>
public enum DockingType
{
/// <summary>
/// Above the chart.
/// </summary>
Top,
/// <summary>
/// Below the chart.
/// </summary>
Bottom,
/// <summary>
/// Left from the chart.
/// </summary>
Left,
/// <summary>
/// Right from the chart.
/// </summary>
Right
}
}

View File

@@ -0,0 +1,52 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
using System;
namespace PdfSharp.Charting
{
/// <summary>
/// Specifies the properties for the font.
/// FOR INTERNAL USE ONLY.
/// </summary>
[Flags]
enum FontProperties
{
None = 0x0000,
Name = 0x0001,
Size = 0x0002,
Bold = 0x0004,
Italic = 0x0008,
Underline = 0x0010,
Color = 0x0020,
Border = 0x0040,
Superscript = 0x0080,
Subscript = 0x0100,
}
}

View File

@@ -0,0 +1,52 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Used to determine the horizontal alignment of the axis title.
/// </summary>
public enum HorizontalAlignment
{
/// <summary>
/// Axis title will be left aligned.
/// </summary>
Left,
/// <summary>
/// Axis title will be right aligned.
/// </summary>
Right,
/// <summary>
/// Axis title will be centered.
/// </summary>
Center
}
}

View File

@@ -0,0 +1,42 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Specifies the line style of the LineFormat object.
/// </summary>
public enum LineStyle
{
/// <summary>
///
/// </summary>
Single
}
}

View File

@@ -0,0 +1,78 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Symbols of a data point in a line chart.
/// </summary>
public enum MarkerStyle
{
/// <summary>
///
/// </summary>
None,
/// <summary>
///
/// </summary>
Circle,
/// <summary>
///
/// </summary>
Dash,
/// <summary>
///
/// </summary>
Diamond,
/// <summary>
///
/// </summary>
Dot,
/// <summary>
///
/// </summary>
Plus,
/// <summary>
///
/// </summary>
Square,
/// <summary>
///
/// </summary>
Star,
/// <summary>
///
/// </summary>
Triangle,
/// <summary>
///
/// </summary>
X
}
}

View File

@@ -0,0 +1,57 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Determines the position where the Tickmarks will be rendered.
/// </summary>
public enum TickMarkType
{
/// <summary>
/// Tickmarks are not rendered.
/// </summary>
None,
/// <summary>
/// Tickmarks are rendered inside the plot area.
/// </summary>
Inside,
/// <summary>
/// Tickmarks are rendered outside the plot area.
/// </summary>
Outside,
/// <summary>
/// Tickmarks are rendered inside and outside the plot area.
/// </summary>
Cross
}
}

View File

@@ -0,0 +1,66 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Specifies the underline type for the font.
/// </summary>
public enum Underline
{
/// <summary>
///
/// </summary>
None,
/// <summary>
///
/// </summary>
Single,
/// <summary>
///
/// </summary>
Words,
/// <summary>
///
/// </summary>
Dotted,
/// <summary>
///
/// </summary>
Dash,
/// <summary>
///
/// </summary>
DotDash,
/// <summary>
///
/// </summary>
DotDotDash,
}
}

View File

@@ -0,0 +1,52 @@
#region PDFsharp Charting - A .NET charting library based on PDFsharp
//
// Authors:
// Niklas Schneider
//
// Copyright (c) 2005-2017 empira Software GmbH, Cologne Area (Germany)
//
// http://www.pdfsharp.com
// http://sourceforge.net/projects/pdfsharp
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion
namespace PdfSharp.Charting
{
/// <summary>
/// Used to determine the vertical alignment of the axis title.
/// </summary>
public enum VerticalAlignment
{
/// <summary>
/// Axis title will be top aligned.
/// </summary>
Top,
/// <summary>
/// Axis title will be centered.
/// </summary>
Center,
/// <summary>
/// Axis title will be bottom aligned.
/// </summary>
Bottom
}
}