Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Web.DataVisualization / Common / ChartTypes / DoughnutChart.cs
1 //-------------------------------------------------------------
2 // <copyright company=\92Microsoft Corporation\92>
3 //   Copyright © Microsoft Corporation. All Rights Reserved.
4 // </copyright>
5 //-------------------------------------------------------------
6 // @owner=alexgor, deliant
7 //=================================================================
8 //  File:               DoughnutChart.cs
9 //
10 //  Namespace:  System.Web.UI.DataVisualization.Charting.ChartTypes
11 //
12 //      Classes:        DoughnutChart
13 //
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.
17 //
18 //      Reviewed:       GS - Aug 8, 2002
19 //                              AG - Aug 8, 2002
20 //              AG - Microsoft 6, 2007
21 //
22 //===================================================================
23
24 #region Used namespaces
25
26 using System;
27 using System.Drawing;
28
29 #endregion
30
31 #if Microsoft_CONTROL
32         namespace System.Windows.Forms.DataVisualization.Charting.ChartTypes
33 #else
34         namespace System.Web.UI.DataVisualization.Charting.ChartTypes
35 #endif
36 {
37         /// <summary>
38     /// DoughnutChart class provide only the behaviour information for the 
39     /// Doughnut chart, all the drawing routines are located in the PieChart 
40     /// base class.
41         /// </summary>
42         internal class DoughnutChart : PieChart
43         {
44                 #region IChartType interface implementation
45
46                 /// <summary>
47                 /// Chart type name
48                 /// </summary>
49                 override public string Name                     { get{ return ChartTypeNames.Doughnut;}}
50
51                 /// <summary>
52                 /// Gets chart type image.
53                 /// </summary>
54                 /// <param name="registry">Chart types registry object.</param>
55                 /// <returns>Chart type image.</returns>
56                 override public System.Drawing.Image GetImage(ChartTypeRegistry registry)
57                 {
58                         return (System.Drawing.Image)registry.ResourceManager.GetObject(this.Name + "ChartType");
59                 }
60
61                 /// <summary>
62                 /// True if chart type is stacked
63                 /// </summary>
64                 override public bool Stacked            { get{ return false;}}
65
66                 /// <summary>
67                 /// True if chart type supports axeses
68                 /// </summary>
69                 override public bool RequireAxes        { get{ return false;} }
70
71                 /// <summary>
72                 /// True if chart type supports logarithmic axes
73                 /// </summary>
74                 override public bool SupportLogarithmicAxes     { get{ return false;} }
75
76                 /// <summary>
77                 /// True if chart type requires to switch the value (Y) axes position
78                 /// </summary>
79                 override public bool SwitchValueAxes    { get{ return false;} }
80
81                 /// <summary>
82                 /// True if chart series can be placed side-by-side.
83                 /// </summary>
84                 override public bool SideBySideSeries { get{ return false;} }
85
86                 /// <summary>
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.)
90                 /// </summary>
91                 override public bool ZeroCrossing { get{ return false;} }
92
93                 /// <summary>
94                 /// True if each data point of a chart must be represented in the legend
95                 /// </summary>
96                 override public bool DataPointsInLegend { get{ return true;} }
97
98                 /// <summary>
99                 /// Indicates that extra Y values are connected to the scale of the Y axis
100                 /// </summary>
101                 override public bool ExtraYValuesConnectedToYAxis{ get { return false; } }
102
103                 /// <summary>
104                 /// True if palette colors should be applied for each data paint.
105                 /// Otherwise the color is applied to the series.
106                 /// </summary>
107                 override public bool ApplyPaletteColorsToPoints { get { return true; } }
108
109                 /// <summary>
110                 /// How to draw series/points in legend:
111                 /// Filled rectangle, Line or Marker
112                 /// </summary>
113                 /// <param name="series">Legend item series.</param>
114                 /// <returns>Legend item style.</returns>
115                 override public LegendImageStyle GetLegendImageStyle(Series series)
116                 {
117                         return LegendImageStyle.Rectangle;
118                 }
119
120                 /// <summary>
121                 /// Number of supported Y value(s) per point 
122                 /// </summary>
123                 override public int YValuesPerPoint{ get { return 1; } }
124
125                 /// <summary>
126                 /// Chart is Doughnut or Pie type
127                 /// </summary>
128                 override public bool Doughnut{ get { return true; } }
129
130                 #endregion
131
132                 #region Methods
133
134                 /// <summary>
135                 /// Default constructor
136                 /// </summary>
137                 public DoughnutChart()
138                 {
139                 }
140
141                 #endregion
142         }
143 }