1 //-------------------------------------------------------------
2 // <copyright company=
\92Microsoft Corporation
\92>
3 // Copyright © Microsoft Corporation. All Rights Reserved.
5 //-------------------------------------------------------------
6 // @owner=alexgor, deliant
7 //=================================================================
8 // File: DoughnutChart.cs
10 // Namespace: System.Web.UI.DataVisualization.Charting.ChartTypes
12 // Classes: DoughnutChart
14 // Purpose: DoughnutChart class provide only the behaviour
15 // information for the Doughnut chart, all the drawing
16 // routines are located in the PieChart base class.
18 // Reviewed: GS - Aug 8, 2002
20 // AG - Microsoft 6, 2007
22 //===================================================================
24 #region Used namespaces
32 namespace System.Windows.Forms.DataVisualization.Charting.ChartTypes
34 namespace System.Web.UI.DataVisualization.Charting.ChartTypes
38 /// DoughnutChart class provide only the behaviour information for the
39 /// Doughnut chart, all the drawing routines are located in the PieChart
42 internal class DoughnutChart : PieChart
44 #region IChartType interface implementation
49 override public string Name { get{ return ChartTypeNames.Doughnut;}}
52 /// Gets chart type image.
54 /// <param name="registry">Chart types registry object.</param>
55 /// <returns>Chart type image.</returns>
56 override public System.Drawing.Image GetImage(ChartTypeRegistry registry)
58 return (System.Drawing.Image)registry.ResourceManager.GetObject(this.Name + "ChartType");
62 /// True if chart type is stacked
64 override public bool Stacked { get{ return false;}}
67 /// True if chart type supports axeses
69 override public bool RequireAxes { get{ return false;} }
72 /// True if chart type supports logarithmic axes
74 override public bool SupportLogarithmicAxes { get{ return false;} }
77 /// True if chart type requires to switch the value (Y) axes position
79 override public bool SwitchValueAxes { get{ return false;} }
82 /// True if chart series can be placed side-by-side.
84 override public bool SideBySideSeries { get{ return false;} }
87 /// If the crossing value is auto Crossing value should be
88 /// automatically set to zero for some chart
89 /// types (Bar, column, area etc.)
91 override public bool ZeroCrossing { get{ return false;} }
94 /// True if each data point of a chart must be represented in the legend
96 override public bool DataPointsInLegend { get{ return true;} }
99 /// Indicates that extra Y values are connected to the scale of the Y axis
101 override public bool ExtraYValuesConnectedToYAxis{ get { return false; } }
104 /// True if palette colors should be applied for each data paint.
105 /// Otherwise the color is applied to the series.
107 override public bool ApplyPaletteColorsToPoints { get { return true; } }
110 /// How to draw series/points in legend:
111 /// Filled rectangle, Line or Marker
113 /// <param name="series">Legend item series.</param>
114 /// <returns>Legend item style.</returns>
115 override public LegendImageStyle GetLegendImageStyle(Series series)
117 return LegendImageStyle.Rectangle;
121 /// Number of supported Y value(s) per point
123 override public int YValuesPerPoint{ get { return 1; } }
126 /// Chart is Doughnut or Pie type
128 override public bool Doughnut{ get { return true; } }
135 /// Default constructor
137 public DoughnutChart()