CustomAttributesRegistry.cs 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. //
  5. // Purpose: CustomPropertyRegistry contains information for all
  6. // chart custom properties. This informatin is used at
  7. // design-time to provide simple editors for the
  8. // CustomProperty property of the Series and DataPoint.
  9. // ---------------------------
  10. // Custom Properties Overview:
  11. // ---------------------------
  12. // :
  13. // Different chart types may have unique settings that only apply to
  14. // this chart type. For example, ‘Exploded’ attribute on the data point
  15. // only make sense in case of Pie and Doughnut chart types. Instead of
  16. // adding properties that only will work with specific chart types
  17. // CustomProperties were introduced.
  18. // :
  19. // Custom properties are implemented using the CustomProperties property
  20. // of both Series objects and their associated DataPoint objects. Here
  21. // is an example of setting data point custom attribute:
  22. // :
  23. // Chart1.Series["Default"].Points[0][CustomPropertyName.Exploded] = "true";
  24. // :
  25. // Custom attribute names are case-sensitive. You should be mindful of
  26. // this fact when formatting custom properties in code-behind. Further,
  27. // if the CustomProperty value contains a comma, then each comma must
  28. // be preceded by a '\' character to escape the comma. This is useful
  29. // when, for example, an RGB color value is set in your application.
  30. // In such cases, the setting of custom properties that contain commas
  31. // can either be done at runtime, or design-time.
  32. //
  33. using System;
  34. using System.Collections;
  35. using System.ComponentModel;
  36. using System.Drawing;
  37. using FastReport.DataVisualization.Charting.ChartTypes;
  38. namespace FastReport.DataVisualization.Charting.Utilities
  39. {
  40. #region Enumerations
  41. /// <summary>
  42. /// Circular chart drawing style.
  43. /// </summary>
  44. internal enum PolarDrawingStyles
  45. {
  46. /// <summary>
  47. /// Series are drawn as lines.
  48. /// </summary>
  49. Line,
  50. /// <summary>
  51. /// Series are drawn as markers.
  52. /// </summary>
  53. Marker
  54. }
  55. /// <summary>
  56. /// CircularAreaDrawingStyle
  57. /// </summary>
  58. internal enum CircularAreaDrawingStyles
  59. {
  60. /// <summary>
  61. /// Drawn as polygon
  62. /// </summary>
  63. Polygon,
  64. /// <summary>
  65. /// Drawn as circle
  66. /// </summary>
  67. Circle = 1,
  68. }
  69. /// <summary>
  70. /// Marker Style
  71. /// </summary>
  72. internal enum ErrorBarMarkerStyles
  73. {
  74. /// <summary>
  75. /// Marker disabled
  76. /// </summary>
  77. None = 0,
  78. /// <summary>
  79. /// The marker style is Square
  80. /// </summary>
  81. Square = 1,
  82. /// <summary>
  83. /// The marker style is Circle
  84. /// </summary>
  85. Circle = 2,
  86. /// <summary>
  87. /// The marker style is Diamond
  88. /// </summary>
  89. Diamond = 3,
  90. /// <summary>
  91. /// The marker style is Triangle
  92. /// </summary>
  93. Triangle = 4,
  94. /// <summary>
  95. /// The marker style is Cross
  96. /// </summary>
  97. Cross = 5,
  98. /// <summary>
  99. /// The marker style is 4 corner star
  100. /// </summary>
  101. Star4 = 6,
  102. /// <summary>
  103. /// The marker style is 5 corner star
  104. /// </summary>
  105. Star5 = 7,
  106. /// <summary>
  107. /// The marker style is 6 corner star
  108. /// </summary>
  109. Star6 = 8,
  110. /// <summary>
  111. /// The marker style is 10 corner star
  112. /// </summary>
  113. Star10 = 9,
  114. /// <summary>
  115. /// Line marker
  116. /// </summary>
  117. Line = 10
  118. };
  119. /// <summary>
  120. /// AxisName of stock chart markers
  121. /// </summary>
  122. internal enum StockShowOpenCloseTypes
  123. {
  124. /// <summary>
  125. /// Open and Close markers are shown.
  126. /// </summary>
  127. Both,
  128. /// <summary>
  129. /// Only Open markers are shown.
  130. /// </summary>
  131. Open,
  132. /// <summary>
  133. /// Only Close markers are shown.
  134. /// </summary>
  135. Close,
  136. }
  137. /// <summary>
  138. /// IsEmpty point value attribute
  139. /// </summary>
  140. internal enum EmptyPointTypes
  141. {
  142. /// <summary>
  143. /// Average of two neighbor points is used.
  144. /// </summary>
  145. Average,
  146. /// <summary>
  147. /// Zero value is used
  148. /// </summary>
  149. Zero
  150. }
  151. /// <summary>
  152. /// Stock chart point labels attribute
  153. /// </summary>
  154. internal enum StockLabelValueTypes
  155. {
  156. /// <summary>
  157. /// High Y value is used to generate point label.
  158. /// </summary>
  159. High,
  160. /// <summary>
  161. /// Low Y value is used to generate point label.
  162. /// </summary>
  163. Low,
  164. /// <summary>
  165. /// Open Y value is used to generate point label.
  166. /// </summary>
  167. Open,
  168. /// <summary>
  169. /// Close Y value is used to generate point label.
  170. /// </summary>
  171. Close,
  172. }
  173. /// <summary>
  174. /// Data point label alignment.
  175. /// </summary>
  176. [Flags]
  177. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")]
  178. internal enum LabelAlignments
  179. {
  180. /// <summary>
  181. /// Automatic position.
  182. /// </summary>
  183. Auto = 0,
  184. /// <summary>
  185. /// Label aligned on the top of the marker.
  186. /// </summary>
  187. Top = 1,
  188. /// <summary>
  189. /// Label aligned on the bottom of the marker.
  190. /// </summary>
  191. Bottom = 2,
  192. /// <summary>
  193. /// Label aligned on the right of the marker.
  194. /// </summary>
  195. Right = 4,
  196. /// <summary>
  197. /// Label aligned on the left of the marker.
  198. /// </summary>
  199. Left = 8,
  200. /// <summary>
  201. /// Label aligned on the top-left of the marker.
  202. /// </summary>
  203. TopLeft = 16,
  204. /// <summary>
  205. /// Label aligned on the top-right of the marker.
  206. /// </summary>
  207. TopRight = 32,
  208. /// <summary>
  209. /// Label aligned on the bottom-left of the marker.
  210. /// </summary>
  211. BottomLeft = 64,
  212. /// <summary>
  213. /// Label aligned on the bottom-right of the marker.
  214. /// </summary>
  215. BottomRight = 128,
  216. /// <summary>
  217. /// Label aligned in the center of the marker.
  218. /// </summary>
  219. Center = 256,
  220. }
  221. #endregion //Enumerations
  222. /// <summary>
  223. /// CustomPropertyName class contains constant strings defining
  224. /// names of all custom properties used in the chart.
  225. /// </summary>
  226. internal static class CustomPropertyName
  227. {
  228. #region Common Custom Properties Names
  229. internal const string DrawSideBySide = "DrawSideBySide";
  230. internal const string EmptyPointValue = "EmptyPointValue";
  231. internal const string IsXAxisQuantitative = "IsXAxisQuantitative";
  232. internal const string BarLabelStyle = "BarLabelStyle";
  233. internal const string StackedGroupName = "StackedGroupName";
  234. internal const string DrawingStyle = "DrawingStyle";
  235. internal const string PointWidth = "PointWidth";
  236. internal const string PixelPointWidth = "PixelPointWidth";
  237. internal const string MinPixelPointWidth = "MinPixelPointWidth";
  238. internal const string MaxPixelPointWidth = "MaxPixelPointWidth";
  239. internal const string PriceUpColor = "PriceUpColor";
  240. internal const string PriceDownColor = "PriceDownColor";
  241. internal const string LabelValueType = "LabelValueType";
  242. internal const string OpenCloseStyle = "OpenCloseStyle";
  243. internal const string ShowOpenClose = "ShowOpenClose";
  244. internal const string BubbleScaleMin = "BubbleScaleMin";
  245. internal const string BubbleScaleMax = "BubbleScaleMax";
  246. internal const string BubbleMaxSize = "BubbleMaxSize";
  247. internal const string BubbleMinSize = "BubbleMinSize";
  248. internal const string BubbleUseSizeForLabel = "BubbleUseSizeForLabel";
  249. internal const string PieDrawingStyle = "PieDrawingStyle";
  250. internal const string CollectedStyle = "CollectedStyle";
  251. internal const string CollectedThreshold = "CollectedThreshold";
  252. internal const string CollectedThresholdUsePercent = "CollectedThresholdUsePercent";
  253. internal const string CollectedSliceExploded = "CollectedSliceExploded";
  254. internal const string CollectedLabel = "CollectedLabel";
  255. internal const string CollectedLegendText = "CollectedLegendText";
  256. internal const string CollectedToolTip = "CollectedToolTip";
  257. internal const string CollectedColor = "CollectedColor";
  258. internal const string CollectedChartShowLegend = "CollectedChartShowLegend";
  259. internal const string CollectedChartShowLabels = "CollectedChartShowLabels";
  260. internal const string PieStartAngle = "PieStartAngle";
  261. internal const string Exploded = "Exploded";
  262. internal const string LabelsRadialLineSize = "LabelsRadialLineSize";
  263. internal const string LabelsHorizontalLineSize = "LabelsHorizontalLineSize";
  264. internal const string PieLabelStyle = "PieLabelStyle";
  265. internal const string MinimumRelativePieSize = "MinimumRelativePieSize";
  266. internal const string _3DLabelLineSize = "3DLabelLineSize";
  267. internal const string PieLineColor = "PieLineColor";
  268. internal const string PieAutoAxisLabels = "AutoAxisLabels";
  269. internal const string DoughnutRadius = "DoughnutRadius";
  270. internal const string LabelStyle = "LabelStyle";
  271. internal const string ShowMarkerLines = "ShowMarkerLines";
  272. internal const string LineTension = "LineTension";
  273. internal const string PixelPointDepth = "PixelPointDepth";
  274. internal const string PixelPointGapDepth = "PixelPointGapDepth";
  275. internal const string PermittedPixelError = "PermittedPixelError";
  276. internal const string CircularLabelsStyle = "CircularLabelsStyle";
  277. internal const string PolarDrawingStyle = "PolarDrawingStyle";
  278. internal const string AreaDrawingStyle = "AreaDrawingStyle";
  279. internal const string RadarDrawingStyle = "RadarDrawingStyle";
  280. internal const string BoxPlotPercentile = "BoxPlotPercentile";
  281. internal const string BoxPlotWhiskerPercentile = "BoxPlotWhiskerPercentile";
  282. internal const string BoxPlotShowAverage = "BoxPlotShowAverage";
  283. internal const string BoxPlotShowMedian = "BoxPlotShowMedian";
  284. internal const string BoxPlotShowUnusualValues = "BoxPlotShowUnusualValues";
  285. internal const string BoxPlotSeries = "BoxPlotSeries";
  286. internal const string ErrorBarStyle = "ErrorBarStyle";
  287. internal const string ErrorBarCenterMarkerStyle = "ErrorBarCenterMarkerStyle";
  288. internal const string ErrorBarSeries = "ErrorBarSeries";
  289. internal const string ErrorBarType = "ErrorBarType";
  290. internal const string UsedYValueHigh = "UsedYValueHigh";
  291. internal const string UsedYValueLow = "UsedYValueLow";
  292. internal const string BoxSize = "BoxSize";
  293. internal const string ProportionalSymbols = "ProportionalSymbols";
  294. internal const string ReversalAmount = "ReversalAmount";
  295. internal const string UsedYValue = "UsedYValue";
  296. internal const string NumberOfLinesInBreak = "NumberOfLinesInBreak";
  297. internal const string FunnelLabelStyle = "FunnelLabelStyle";
  298. internal const string FunnelNeckWidth = "FunnelNeckWidth";
  299. internal const string FunnelNeckHeight = "FunnelNeckHeight";
  300. internal const string FunnelMinPointHeight = "FunnelMinPointHeight";
  301. internal const string Funnel3DRotationAngle = "Funnel3DRotationAngle";
  302. internal const string FunnelPointGap = "FunnelPointGap";
  303. internal const string Funnel3DDrawingStyle = "Funnel3DDrawingStyle";
  304. internal const string FunnelStyle = "FunnelStyle";
  305. internal const string FunnelInsideLabelAlignment = "FunnelInsideLabelAlignment";
  306. internal const string FunnelOutsideLabelPlacement = "FunnelOutsideLabelPlacement";
  307. internal const string CalloutLineColor = "CalloutLineColor";
  308. internal const string PyramidLabelStyle = "PyramidLabelStyle";
  309. internal const string PyramidMinPointHeight = "PyramidMinPointHeight";
  310. internal const string Pyramid3DRotationAngle = "Pyramid3DRotationAngle";
  311. internal const string PyramidPointGap = "PyramidPointGap";
  312. internal const string Pyramid3DDrawingStyle = "Pyramid3DDrawingStyle";
  313. internal const string PyramidInsideLabelAlignment = "PyramidInsideLabelAlignment";
  314. internal const string PyramidOutsideLabelPlacement = "PyramidOutsideLabelPlacement";
  315. internal const string PyramidValueType = "PyramidValueType";
  316. #endregion // Common Custom Properties Names
  317. }
  318. /// <summary>
  319. /// CustomPropertyRegistry contains information for all chart
  320. /// custom properties. This data is exposed through the
  321. /// ‘registeredCustomProperties’ field which is an ArrayList
  322. /// containing CustomPropertyInfo classes.
  323. /// </summary>
  324. internal class CustomPropertyRegistry : IServiceProvider
  325. {
  326. #region Fields
  327. // List of registered properties
  328. internal ArrayList registeredCustomProperties = new ArrayList();
  329. // Defines maximum value which can be set to the attribute which uses pixels
  330. internal static int MaxValueOfPixelAttribute = 10000;
  331. internal static System.Collections.Generic.List<SeriesChartType> IsXAxisQuantitativeChartTypes =
  332. new System.Collections.Generic.List<SeriesChartType >(
  333. new SeriesChartType[] {
  334. SeriesChartType.Line,
  335. SeriesChartType.FastLine,
  336. SeriesChartType.Spline,
  337. SeriesChartType.Point,
  338. SeriesChartType.FastPoint,
  339. SeriesChartType.Bubble,
  340. SeriesChartType.RangeColumn,
  341. SeriesChartType.RangeBar,
  342. });
  343. #endregion
  344. #region Constructor and Services
  345. /// <summary>
  346. /// Custom properties registry public constructor.
  347. /// </summary>
  348. public CustomPropertyRegistry()
  349. {
  350. // Register properties used in the chart
  351. RegisterProperties();
  352. }
  353. /// <summary>
  354. /// Returns custom properties registry service object.
  355. /// </summary>
  356. /// <param name="serviceType">Service type to get.</param>
  357. /// <returns>Custom properties registry service.</returns>
  358. [EditorBrowsableAttribute(EditorBrowsableState.Never)]
  359. object IServiceProvider.GetService(Type serviceType)
  360. {
  361. if(serviceType == typeof(CustomPropertyRegistry))
  362. {
  363. return this;
  364. }
  365. throw (new ArgumentException(SR.ExceptionCustomAttributesRegistryUnsupportedType( serviceType.ToString()) ));
  366. }
  367. #endregion
  368. #region Properties Regestering methods
  369. /// <summary>
  370. /// This method registers all standard custom properties used in
  371. /// the chart and provides all the additional information like
  372. /// description, value validation and scenarios where custom
  373. /// attribute can be used.
  374. /// </summary>
  375. private void RegisterProperties()
  376. {
  377. SeriesChartType[] chartTypes = null;
  378. CustomPropertyInfo attrInfo = null;
  379. //***********************************************************************
  380. //** DrawSideBySide properties
  381. //***********************************************************************
  382. chartTypes = new SeriesChartType[] {
  383. SeriesChartType.Bar,
  384. SeriesChartType.Column,
  385. SeriesChartType.RangeColumn,
  386. SeriesChartType.BoxPlot,
  387. SeriesChartType.RangeBar,
  388. SeriesChartType.ErrorBar,
  389. };
  390. // "DrawSideBySide" attribute
  391. attrInfo = new CustomPropertyInfo(
  392. CustomPropertyName.DrawSideBySide,
  393. typeof(AxisEnabled),
  394. "Auto",
  395. SR.DescriptionCustomAttributeDrawSideBySide,
  396. chartTypes,
  397. true,
  398. false);
  399. registeredCustomProperties.Add( attrInfo );
  400. //***********************************************************************
  401. //** IsXAxisQuantitative properties
  402. //***********************************************************************
  403. registeredCustomProperties.Add(new CustomPropertyInfo(
  404. CustomPropertyName.IsXAxisQuantitative,
  405. typeof(bool),
  406. "false",
  407. SR.DescriptionCustomAttributeIsXAxisQuantitive,
  408. IsXAxisQuantitativeChartTypes.ToArray(),
  409. true,
  410. false));
  411. //***********************************************************************
  412. //** EmptyPointValue properties
  413. //***********************************************************************
  414. chartTypes = new SeriesChartType[] {
  415. SeriesChartType.Point,
  416. SeriesChartType.Bubble,
  417. SeriesChartType.Line,
  418. SeriesChartType.Spline,
  419. SeriesChartType.StepLine,
  420. SeriesChartType.Column,
  421. SeriesChartType.RangeColumn,
  422. SeriesChartType.RangeBar,
  423. SeriesChartType.Radar,
  424. SeriesChartType.Range,
  425. SeriesChartType.SplineRange,
  426. SeriesChartType.Polar,
  427. SeriesChartType.Area,
  428. SeriesChartType.SplineArea,
  429. SeriesChartType.Bar,
  430. };
  431. registeredCustomProperties.Add( new CustomPropertyInfo(
  432. CustomPropertyName.EmptyPointValue,
  433. typeof(EmptyPointTypes),
  434. "Average",
  435. SR.DescriptionCustomAttributeEmptyPointValue,
  436. chartTypes,
  437. true,
  438. false) );
  439. //***********************************************************************
  440. //** Bar label styles properties
  441. //***********************************************************************
  442. chartTypes = new SeriesChartType[] {
  443. SeriesChartType.StackedBar,
  444. SeriesChartType.StackedBar100,
  445. SeriesChartType.RangeBar,
  446. };
  447. // "BarLabelStyle" attribute
  448. attrInfo = new CustomPropertyInfo(
  449. CustomPropertyName.BarLabelStyle,
  450. typeof(BarValueLabelDrawingStyle),
  451. "Center",
  452. SR.DescriptionCustomAttributeBarLabelStyle,
  453. chartTypes,
  454. true,
  455. true);
  456. registeredCustomProperties.Add( attrInfo );
  457. //***********************************************************************
  458. //** Stacked Column/Bar properties
  459. //***********************************************************************
  460. chartTypes = new SeriesChartType[] {
  461. SeriesChartType.StackedBar,
  462. SeriesChartType.StackedBar100,
  463. SeriesChartType.StackedColumn,
  464. SeriesChartType.StackedColumn100,
  465. };
  466. // "StackedGroupName" attribute
  467. attrInfo = new CustomPropertyInfo(
  468. CustomPropertyName.StackedGroupName,
  469. typeof(string),
  470. string.Empty,
  471. SR.DescriptionCustomAttributeStackedGroupName,
  472. chartTypes,
  473. true,
  474. false);
  475. registeredCustomProperties.Add(attrInfo);
  476. //***********************************************************************
  477. //** Bar label styles properties
  478. //***********************************************************************
  479. chartTypes = new SeriesChartType[] {
  480. SeriesChartType.Bar,
  481. };
  482. // "BarLabelStyle" attribute
  483. attrInfo = new CustomPropertyInfo(
  484. CustomPropertyName.BarLabelStyle,
  485. typeof(BarValueLabelDrawingStyle),
  486. "Outside",
  487. SR.DescriptionCustomAttributeBarLabelStyle,
  488. chartTypes,
  489. true,
  490. true);
  491. registeredCustomProperties.Add( attrInfo );
  492. //***********************************************************************
  493. //** Bar and Columnt chart types properties
  494. //***********************************************************************
  495. chartTypes = new SeriesChartType[] {
  496. SeriesChartType.Bar,
  497. SeriesChartType.Column,
  498. SeriesChartType.StackedBar,
  499. SeriesChartType.StackedBar100,
  500. SeriesChartType.StackedColumn,
  501. SeriesChartType.StackedColumn100,
  502. SeriesChartType.RangeBar,
  503. SeriesChartType.RangeColumn,
  504. };
  505. // "DrawingStyle" attribute
  506. attrInfo = new CustomPropertyInfo(
  507. CustomPropertyName.DrawingStyle,
  508. typeof(BarDrawingStyle),
  509. "Default",
  510. SR.DescriptionCustomAttributeDrawingStyle,
  511. chartTypes,
  512. true,
  513. true);
  514. registeredCustomProperties.Add( attrInfo );
  515. //***********************************************************************
  516. //** Chart types point width properties
  517. //***********************************************************************
  518. chartTypes = new SeriesChartType[] {
  519. SeriesChartType.Bar,
  520. SeriesChartType.Candlestick,
  521. SeriesChartType.Column,
  522. SeriesChartType.StackedBar,
  523. SeriesChartType.StackedBar100,
  524. SeriesChartType.StackedColumn,
  525. SeriesChartType.StackedColumn100,
  526. SeriesChartType.Stock,
  527. SeriesChartType.BoxPlot,
  528. SeriesChartType.ErrorBar,
  529. SeriesChartType.RangeBar,
  530. SeriesChartType.RangeColumn,
  531. };
  532. // "PointWidth" attribute
  533. attrInfo = new CustomPropertyInfo(
  534. CustomPropertyName.PointWidth,
  535. typeof(float),
  536. 0.8f,
  537. SR.DescriptionCustomAttributePointWidth,
  538. chartTypes,
  539. true,
  540. false);
  541. attrInfo.MinValue = 0f;
  542. attrInfo.MaxValue = 2f;
  543. registeredCustomProperties.Add( attrInfo );
  544. // "PixelPointWidth" attribute
  545. attrInfo = new CustomPropertyInfo(
  546. CustomPropertyName.PixelPointWidth,
  547. typeof(int),
  548. 0,
  549. SR.DescriptionCustomAttributePixelPointWidth,
  550. chartTypes,
  551. true,
  552. false);
  553. attrInfo.MinValue = 0;
  554. attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
  555. registeredCustomProperties.Add( attrInfo );
  556. // "MinPixelPointWidth" attribute
  557. attrInfo = new CustomPropertyInfo(
  558. CustomPropertyName.MinPixelPointWidth,
  559. typeof(int),
  560. 0,
  561. SR.DescriptionCustomAttributeMinPixelPointWidth,
  562. chartTypes,
  563. true,
  564. false);
  565. attrInfo.MinValue = 0;
  566. attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
  567. registeredCustomProperties.Add( attrInfo );
  568. // "MaxPixelPointWidth" attribute
  569. attrInfo = new CustomPropertyInfo(
  570. CustomPropertyName.MaxPixelPointWidth,
  571. typeof(int),
  572. 0,
  573. SR.DescriptionCustomAttributeMaxPixelPointWidth,
  574. chartTypes,
  575. true,
  576. false);
  577. attrInfo.MinValue = 0;
  578. attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
  579. registeredCustomProperties.Add( attrInfo );
  580. //***********************************************************************
  581. //** CandleStick chart types properties
  582. //***********************************************************************
  583. chartTypes = new SeriesChartType[] { SeriesChartType.Candlestick };
  584. // "PriceUpColor" attribute
  585. attrInfo = new CustomPropertyInfo(
  586. CustomPropertyName.PriceUpColor,
  587. typeof(Color),
  588. "",
  589. SR.DescriptionCustomAttributeCandlePriceUpColor,
  590. chartTypes,
  591. true,
  592. true);
  593. registeredCustomProperties.Add( attrInfo );
  594. // "PriceDownColor" attribute
  595. attrInfo = new CustomPropertyInfo(
  596. CustomPropertyName.PriceDownColor,
  597. typeof(Color),
  598. "",
  599. SR.DescriptionCustomAttributePriceDownColor,
  600. chartTypes,
  601. true,
  602. true);
  603. registeredCustomProperties.Add( attrInfo );
  604. //***********************************************************************
  605. //** Stock and CandleStick chart types properties
  606. //***********************************************************************
  607. chartTypes = new SeriesChartType[] { SeriesChartType.Stock, SeriesChartType.Candlestick };
  608. // "LabelValueType" attribute
  609. attrInfo = new CustomPropertyInfo(
  610. CustomPropertyName.LabelValueType,
  611. typeof(StockLabelValueTypes),
  612. "Close",
  613. SR.DescriptionCustomAttributeLabelValueType,
  614. chartTypes,
  615. true,
  616. true);
  617. registeredCustomProperties.Add( attrInfo );
  618. //***********************************************************************
  619. //** Stock chart types properties
  620. //***********************************************************************
  621. chartTypes = new SeriesChartType[] { SeriesChartType.Stock };
  622. // "OpenCloseStyle" attribute
  623. attrInfo = new CustomPropertyInfo(
  624. CustomPropertyName.OpenCloseStyle,
  625. typeof(StockOpenCloseMarkStyle),
  626. "Line",
  627. SR.DescriptionCustomAttributeOpenCloseStyle,
  628. chartTypes,
  629. true,
  630. true);
  631. registeredCustomProperties.Add( attrInfo );
  632. // "ShowOpenClose" attribute
  633. attrInfo = new CustomPropertyInfo(
  634. CustomPropertyName.ShowOpenClose,
  635. typeof(StockShowOpenCloseTypes),
  636. "Both",
  637. SR.DescriptionCustomAttributeShowOpenClose,
  638. chartTypes,
  639. true,
  640. true);
  641. registeredCustomProperties.Add( attrInfo );
  642. //***********************************************************************
  643. //** Bubble chart types properties
  644. //***********************************************************************
  645. chartTypes = new SeriesChartType[] { SeriesChartType.Bubble };
  646. // "BubbleScaleMin" attribute
  647. attrInfo = new CustomPropertyInfo(
  648. CustomPropertyName.BubbleScaleMin,
  649. typeof(float),
  650. 0f,
  651. SR.DescriptionCustomAttributeBubbleScaleMin,
  652. chartTypes,
  653. true,
  654. false);
  655. registeredCustomProperties.Add( attrInfo );
  656. // "BubbleScaleMax" attribute
  657. attrInfo = new CustomPropertyInfo(
  658. CustomPropertyName.BubbleScaleMax,
  659. typeof(float),
  660. 0f,
  661. SR.DescriptionCustomAttributeBubbleScaleMax,
  662. chartTypes,
  663. true,
  664. false);
  665. registeredCustomProperties.Add( attrInfo );
  666. // "BubbleMaxSize" attribute
  667. attrInfo = new CustomPropertyInfo(
  668. CustomPropertyName.BubbleMaxSize,
  669. typeof(float),
  670. 15f,
  671. SR.DescriptionCustomAttributeBubbleMaxSize,
  672. chartTypes,
  673. true,
  674. false);
  675. attrInfo.MinValue = 0f;
  676. attrInfo.MaxValue = 100f;
  677. registeredCustomProperties.Add( attrInfo );
  678. // "BubbleMinSize" attribute of the Bubble chart
  679. attrInfo = new CustomPropertyInfo(
  680. CustomPropertyName.BubbleMinSize,
  681. typeof(float),
  682. 3f,
  683. SR.DescriptionCustomAttributeBubbleMaxSize,
  684. chartTypes,
  685. true,
  686. false);
  687. attrInfo.MinValue = 0f;
  688. attrInfo.MaxValue = 100f;
  689. registeredCustomProperties.Add( attrInfo );
  690. // "BubbleUseSizeForLabel" attribute
  691. attrInfo = new CustomPropertyInfo(
  692. CustomPropertyName.BubbleUseSizeForLabel,
  693. typeof(bool),
  694. false,
  695. SR.DescriptionCustomAttributeBubbleUseSizeForLabel,
  696. chartTypes,
  697. true,
  698. false);
  699. registeredCustomProperties.Add( attrInfo );
  700. //***********************************************************************
  701. //** Pie and Doughnut chart types properties
  702. //***********************************************************************
  703. chartTypes = new SeriesChartType[] {
  704. SeriesChartType.Pie,
  705. SeriesChartType.Doughnut
  706. };
  707. // "PieDrawingStyle" attribute
  708. attrInfo = new CustomPropertyInfo(
  709. CustomPropertyName.PieDrawingStyle,
  710. typeof(PieDrawingStyle),
  711. "Default",
  712. SR.DescriptionCustomAttributePieDrawingStyle,
  713. chartTypes,
  714. true,
  715. false);
  716. attrInfo.AppliesTo3D = false;
  717. registeredCustomProperties.Add( attrInfo );
  718. // "CollectedThreshold" attribute of the Pie chart
  719. attrInfo = new CustomPropertyInfo(
  720. CustomPropertyName.CollectedThreshold,
  721. typeof(double),
  722. 0.0,
  723. SR.DescriptionCustomAttributeCollectedThreshold,
  724. chartTypes,
  725. true,
  726. false);
  727. attrInfo.MinValue = 0.0;
  728. attrInfo.MaxValue = double.MaxValue;
  729. registeredCustomProperties.Add( attrInfo );
  730. // "CollectedThresholdUsePercent" attribute of the Pie chart
  731. attrInfo = new CustomPropertyInfo(
  732. CustomPropertyName.CollectedThresholdUsePercent,
  733. typeof(bool),
  734. true,
  735. SR.DescriptionCustomAttributeCollectedThresholdUsePercent,
  736. chartTypes,
  737. true,
  738. false);
  739. registeredCustomProperties.Add( attrInfo );
  740. // "CollectedSliceExploded" attribute of the Pie chart
  741. attrInfo = new CustomPropertyInfo(
  742. CustomPropertyName.CollectedSliceExploded,
  743. typeof(bool),
  744. false,
  745. SR.DescriptionCustomAttributeCollectedSliceExploded,
  746. chartTypes,
  747. true,
  748. false);
  749. registeredCustomProperties.Add( attrInfo );
  750. // "CollectedLabel" attribute of the Pie chart
  751. attrInfo = new CustomPropertyInfo(
  752. CustomPropertyName.CollectedLabel,
  753. typeof(string),
  754. string.Empty,
  755. SR.DescriptionCustomAttributeCollectedLabel,
  756. chartTypes,
  757. true,
  758. false);
  759. registeredCustomProperties.Add( attrInfo );
  760. // "CollectedLegendText" attribute of the Pie chart
  761. attrInfo = new CustomPropertyInfo(
  762. CustomPropertyName.CollectedLegendText,
  763. typeof(string),
  764. SR.DescriptionCustomAttributeCollectedLegendDefaultText,
  765. SR.DescriptionCustomAttributeCollectedLegendText,
  766. chartTypes,
  767. true,
  768. false);
  769. registeredCustomProperties.Add( attrInfo );
  770. // "CollectedToolTip" attribute of the Pie chart
  771. attrInfo = new CustomPropertyInfo(
  772. CustomPropertyName.CollectedToolTip,
  773. typeof(string),
  774. string.Empty,
  775. SR.DescriptionCustomAttributeCollectedToolTip,
  776. chartTypes,
  777. true,
  778. false);
  779. registeredCustomProperties.Add( attrInfo );
  780. // "CollectedColor" attribute of the Pie chart
  781. attrInfo = new CustomPropertyInfo(
  782. CustomPropertyName.CollectedColor,
  783. typeof(Color),
  784. "",
  785. SR.DescriptionCustomAttributeCollectedColor,
  786. chartTypes,
  787. true,
  788. false);
  789. registeredCustomProperties.Add( attrInfo );
  790. // "PieStartAngle" attribute of the Pie chart
  791. attrInfo = new CustomPropertyInfo(
  792. CustomPropertyName.PieStartAngle,
  793. typeof(int),
  794. 0,
  795. SR.DescriptionCustomAttributePieStartAngle,
  796. chartTypes,
  797. true,
  798. false);
  799. attrInfo.MinValue = 0;
  800. attrInfo.MaxValue = 360;
  801. registeredCustomProperties.Add( attrInfo );
  802. // "Exploded" attribute of the Pie chart
  803. registeredCustomProperties.Add( new CustomPropertyInfo(
  804. CustomPropertyName.Exploded,
  805. typeof(bool),
  806. false,
  807. SR.DescriptionCustomAttributePieDonutExploded,
  808. chartTypes,
  809. false,
  810. true) );
  811. // "LabelsRadialLineSize" attribute of the Pie chart
  812. attrInfo = new CustomPropertyInfo(
  813. CustomPropertyName.LabelsRadialLineSize,
  814. typeof(float),
  815. 1f,
  816. SR.DescriptionCustomAttributeLabelsRadialLineSize,
  817. chartTypes,
  818. true,
  819. true);
  820. attrInfo.AppliesTo3D = false;
  821. attrInfo.MinValue = 0f;
  822. attrInfo.MaxValue = 100f;
  823. registeredCustomProperties.Add( attrInfo );
  824. // "LabelsHorizontalLineSize" attribute of the Pie chart
  825. attrInfo = new CustomPropertyInfo(
  826. CustomPropertyName.LabelsHorizontalLineSize,
  827. typeof(float),
  828. 1f,
  829. SR.DescriptionCustomAttributeLabelsHorizontalLineSize,
  830. chartTypes,
  831. true,
  832. true);
  833. attrInfo.AppliesTo3D = false;
  834. attrInfo.MinValue = 0f;
  835. attrInfo.MaxValue = 100f;
  836. registeredCustomProperties.Add( attrInfo );
  837. // "PieLabelStyle" attribute of the Pie chart
  838. registeredCustomProperties.Add( new CustomPropertyInfo(
  839. CustomPropertyName.PieLabelStyle,
  840. typeof(PieLabelStyle),
  841. "Inside",
  842. SR.DescriptionCustomAttributePieLabelStyle,
  843. chartTypes,
  844. true,
  845. true) );
  846. // "MinimumRelativePieSize" attribute of the Pie chart
  847. attrInfo = new CustomPropertyInfo(
  848. CustomPropertyName.MinimumRelativePieSize,
  849. typeof(float),
  850. 30f,
  851. SR.DescriptionCustomAttributeMinimumRelativePieSize,
  852. chartTypes,
  853. true,
  854. false);
  855. attrInfo.MinValue = 10f;
  856. attrInfo.MaxValue = 70f;
  857. registeredCustomProperties.Add( attrInfo );
  858. // "3DLabelLineSize" attribute of the Pie chart
  859. attrInfo = new CustomPropertyInfo(
  860. CustomPropertyName._3DLabelLineSize,
  861. typeof(float),
  862. 100f,
  863. SR.DescriptionCustomAttribute_3DLabelLineSize,
  864. chartTypes,
  865. true,
  866. false);
  867. attrInfo.AppliesTo2D = false;
  868. attrInfo.MinValue = 30f;
  869. attrInfo.MaxValue = 200f;
  870. registeredCustomProperties.Add( attrInfo );
  871. // "PieLineColor" attribute of the Pie chart
  872. attrInfo = new CustomPropertyInfo(
  873. CustomPropertyName.PieLineColor,
  874. typeof(Color),
  875. "",
  876. SR.DescriptionCustomAttributePieLineColor,
  877. chartTypes,
  878. true,
  879. true);
  880. registeredCustomProperties.Add( attrInfo );
  881. //***********************************************************************
  882. //** Doughnut chart types properties
  883. //***********************************************************************
  884. // "DoughnutRadius" attribute of the Pie chart
  885. attrInfo = new CustomPropertyInfo(
  886. CustomPropertyName.DoughnutRadius,
  887. typeof(float),
  888. 60f,
  889. SR.DescriptionCustomAttributeDoughnutRadius,
  890. new SeriesChartType[] { SeriesChartType.Doughnut },
  891. true,
  892. false);
  893. attrInfo.MinValue = 0f;
  894. attrInfo.MaxValue = 99f;
  895. registeredCustomProperties.Add( attrInfo );
  896. //***********************************************************************
  897. //** Other
  898. //***********************************************************************
  899. // "LabelStyle" attribute
  900. chartTypes = new SeriesChartType[] {
  901. SeriesChartType.Point,
  902. SeriesChartType.Column,
  903. SeriesChartType.Bubble,
  904. SeriesChartType.Line,
  905. SeriesChartType.Spline,
  906. SeriesChartType.StepLine,
  907. SeriesChartType.Area,
  908. SeriesChartType.SplineArea,
  909. SeriesChartType.Range,
  910. SeriesChartType.SplineRange,
  911. SeriesChartType.Radar,
  912. SeriesChartType.Polar,
  913. };
  914. registeredCustomProperties.Add( new CustomPropertyInfo(
  915. CustomPropertyName.LabelStyle,
  916. typeof(LabelAlignments),
  917. "Auto",
  918. SR.DescriptionCustomAttributeLabelStyle,
  919. chartTypes,
  920. true,
  921. true) );
  922. // "ShowMarkerLines" attribute
  923. chartTypes = new SeriesChartType[] {
  924. SeriesChartType.Line,
  925. SeriesChartType.Spline,
  926. SeriesChartType.StepLine,
  927. SeriesChartType.Area,
  928. SeriesChartType.SplineArea,
  929. SeriesChartType.Range,
  930. SeriesChartType.SplineRange
  931. };
  932. attrInfo = new CustomPropertyInfo(
  933. CustomPropertyName.ShowMarkerLines,
  934. typeof(bool),
  935. false,
  936. SR.DescriptionCustomAttributeShowMarkerLines,
  937. chartTypes,
  938. true,
  939. true);
  940. attrInfo.AppliesTo2D = false;
  941. registeredCustomProperties.Add( attrInfo );
  942. // "LineTension" attribute
  943. chartTypes = new SeriesChartType[] {
  944. SeriesChartType.Spline,
  945. SeriesChartType.SplineArea,
  946. SeriesChartType.SplineRange
  947. };
  948. attrInfo = new CustomPropertyInfo(
  949. CustomPropertyName.LineTension,
  950. typeof(float),
  951. 0.5f,
  952. SR.DescriptionCustomAttributeLineTension,
  953. chartTypes,
  954. true,
  955. false);
  956. attrInfo.MinValue = 0f;
  957. attrInfo.MaxValue = 2f;
  958. registeredCustomProperties.Add( attrInfo );
  959. // "PixelPointDepth" attribute
  960. chartTypes = new SeriesChartType[] {
  961. SeriesChartType.Area,
  962. SeriesChartType.Bar,
  963. SeriesChartType.Bubble,
  964. SeriesChartType.Candlestick,
  965. SeriesChartType.Column,
  966. SeriesChartType.Line,
  967. SeriesChartType.Point,
  968. SeriesChartType.Spline,
  969. SeriesChartType.SplineArea,
  970. SeriesChartType.StackedArea,
  971. SeriesChartType.StackedArea100,
  972. SeriesChartType.StackedBar,
  973. SeriesChartType.StackedBar100,
  974. SeriesChartType.StackedColumn,
  975. SeriesChartType.StackedColumn100,
  976. SeriesChartType.StepLine,
  977. SeriesChartType.Stock,
  978. SeriesChartType.ThreeLineBreak,
  979. SeriesChartType.BoxPlot,
  980. SeriesChartType.ErrorBar,
  981. SeriesChartType.RangeBar,
  982. SeriesChartType.Kagi,
  983. SeriesChartType.PointAndFigure,
  984. SeriesChartType.Range,
  985. SeriesChartType.RangeColumn,
  986. SeriesChartType.Renko,
  987. SeriesChartType.SplineRange,
  988. SeriesChartType.FastLine,
  989. };
  990. attrInfo = new CustomPropertyInfo(
  991. CustomPropertyName.PixelPointDepth,
  992. typeof(int),
  993. 0,
  994. SR.DescriptionCustomAttributePixelPointDepth,
  995. chartTypes,
  996. true,
  997. false);
  998. attrInfo.MinValue = 0;
  999. attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
  1000. attrInfo.AppliesTo2D = false;
  1001. registeredCustomProperties.Add( attrInfo );
  1002. // "PixelPointGapDepth" attribute
  1003. attrInfo = new CustomPropertyInfo(
  1004. CustomPropertyName.PixelPointGapDepth,
  1005. typeof(int),
  1006. 0,
  1007. SR.DescriptionCustomAttributePixelPointGapDepth,
  1008. chartTypes,
  1009. true,
  1010. false);
  1011. attrInfo.MinValue = 0;
  1012. attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
  1013. attrInfo.AppliesTo2D = false;
  1014. registeredCustomProperties.Add( attrInfo );
  1015. //***********************************************************************
  1016. //** FastLine chart type properties
  1017. //***********************************************************************
  1018. chartTypes = new SeriesChartType[] {
  1019. SeriesChartType.FastLine,
  1020. SeriesChartType.FastPoint,
  1021. };
  1022. /* NOTE: This is an internal attribute
  1023. *
  1024. // "PermittedPixelError" attribute
  1025. attrInfo = new CustomPropertyInfo(
  1026. CustomPropertyName.PixelPointGapDepth,
  1027. typeof(float),
  1028. 1f,
  1029. "Gets or sets the acceptable error in pixels for the data point filtering algorithm.",
  1030. chartTypes,
  1031. true,
  1032. false);
  1033. attrInfo.MinValue = 0f;
  1034. attrInfo.MaxValue = 1f;
  1035. registeredCustomProperties.Add( attrInfo );
  1036. */
  1037. //***********************************************************************
  1038. //** Polar chart type properties
  1039. //***********************************************************************
  1040. chartTypes = new SeriesChartType[] {
  1041. SeriesChartType.Polar
  1042. };
  1043. // "AreaDrawingStyle" attribute
  1044. attrInfo = new CustomPropertyInfo(
  1045. CustomPropertyName.AreaDrawingStyle,
  1046. typeof(CircularAreaDrawingStyles),
  1047. "Circle",
  1048. SR.DescriptionCustomAttributePolarAreaDrawingStyle,
  1049. chartTypes,
  1050. true,
  1051. false);
  1052. registeredCustomProperties.Add( attrInfo );
  1053. // "CircularLabelsStyle" attribute
  1054. attrInfo = new CustomPropertyInfo(
  1055. CustomPropertyName.CircularLabelsStyle,
  1056. typeof(CircularAxisLabelsStyle),
  1057. "Auto",
  1058. SR.DescriptionCustomAttributePolarCircularLabelsStyle,
  1059. chartTypes,
  1060. true,
  1061. false);
  1062. registeredCustomProperties.Add( attrInfo );
  1063. // "PolarDrawingStyle" attribute
  1064. attrInfo = new CustomPropertyInfo(
  1065. CustomPropertyName.PolarDrawingStyle,
  1066. typeof(PolarDrawingStyles),
  1067. "Line",
  1068. SR.DescriptionCustomAttributePolarDrawingStyle,
  1069. chartTypes,
  1070. true,
  1071. false);
  1072. registeredCustomProperties.Add( attrInfo );
  1073. //***********************************************************************
  1074. //** Radar chart type properties
  1075. //***********************************************************************
  1076. chartTypes = new SeriesChartType[] {
  1077. SeriesChartType.Radar
  1078. };
  1079. // "AreaDrawingStyle" attribute
  1080. attrInfo = new CustomPropertyInfo(
  1081. CustomPropertyName.AreaDrawingStyle,
  1082. typeof(CircularAreaDrawingStyles),
  1083. "Circle",
  1084. SR.DescriptionCustomAttributeRadarAreaDrawingStyle,
  1085. chartTypes,
  1086. true,
  1087. false);
  1088. registeredCustomProperties.Add( attrInfo );
  1089. // "CircularLabelsStyle" attribute
  1090. attrInfo = new CustomPropertyInfo(
  1091. CustomPropertyName.CircularLabelsStyle,
  1092. typeof(CircularAxisLabelsStyle),
  1093. "Auto",
  1094. SR.DescriptionCustomAttributeRadarCircularLabelsStyle,
  1095. chartTypes,
  1096. true,
  1097. false);
  1098. registeredCustomProperties.Add( attrInfo );
  1099. // "RadarDrawingStyle" attribute
  1100. attrInfo = new CustomPropertyInfo(
  1101. CustomPropertyName.RadarDrawingStyle,
  1102. typeof(RadarDrawingStyle),
  1103. "Area",
  1104. SR.DescriptionCustomAttributeRadarDrawingStyle,
  1105. chartTypes,
  1106. true,
  1107. false);
  1108. registeredCustomProperties.Add( attrInfo );
  1109. //***********************************************************************
  1110. //** BoxPlot chart type properties
  1111. //***********************************************************************
  1112. chartTypes = new SeriesChartType[] {
  1113. SeriesChartType.BoxPlot
  1114. };
  1115. // "BoxPlotPercentile" attribute
  1116. attrInfo = new CustomPropertyInfo(
  1117. CustomPropertyName.BoxPlotPercentile,
  1118. typeof(float),
  1119. 25f,
  1120. SR.DescriptionCustomAttributeBoxPlotPercentile,
  1121. chartTypes,
  1122. true,
  1123. false);
  1124. attrInfo.MinValue = 0f;
  1125. attrInfo.MaxValue = 1000f;
  1126. registeredCustomProperties.Add( attrInfo );
  1127. // "BoxPlotWhiskerPercentile" attribute
  1128. attrInfo = new CustomPropertyInfo(
  1129. CustomPropertyName.BoxPlotWhiskerPercentile,
  1130. typeof(float),
  1131. 10f,
  1132. SR.DescriptionCustomAttributeBoxPlotWhiskerPercentile,
  1133. chartTypes,
  1134. true,
  1135. false);
  1136. attrInfo.MinValue = 0f;
  1137. attrInfo.MaxValue = 1000f;
  1138. registeredCustomProperties.Add( attrInfo );
  1139. // "BoxPlotShowAverage" attribute
  1140. attrInfo = new CustomPropertyInfo(
  1141. CustomPropertyName.BoxPlotShowAverage,
  1142. typeof(bool),
  1143. true,
  1144. SR.DescriptionCustomAttributeBoxPlotShowAverage,
  1145. chartTypes,
  1146. true,
  1147. false);
  1148. registeredCustomProperties.Add( attrInfo );
  1149. // "BoxPlotShowMedian" attribute
  1150. attrInfo = new CustomPropertyInfo(
  1151. CustomPropertyName.BoxPlotShowMedian,
  1152. typeof(bool),
  1153. true,
  1154. SR.DescriptionCustomAttributeBoxPlotShowMedian,
  1155. chartTypes,
  1156. true,
  1157. false);
  1158. registeredCustomProperties.Add( attrInfo );
  1159. // "BoxPlotShowUnusualValues" attribute
  1160. attrInfo = new CustomPropertyInfo(
  1161. CustomPropertyName.BoxPlotShowUnusualValues,
  1162. typeof(bool),
  1163. false,
  1164. SR.DescriptionCustomAttributeBoxPlotShowUnusualValues,
  1165. chartTypes,
  1166. true,
  1167. false);
  1168. registeredCustomProperties.Add( attrInfo );
  1169. // "BoxPlotSeries" attribute
  1170. attrInfo = new CustomPropertyInfo(
  1171. CustomPropertyName.BoxPlotSeries,
  1172. typeof(string),
  1173. "",
  1174. SR.DescriptionCustomAttributeBoxPlotSeries,
  1175. chartTypes,
  1176. true,
  1177. false);
  1178. registeredCustomProperties.Add( attrInfo );
  1179. //***********************************************************************
  1180. //** ErrorBar chart type properties
  1181. //***********************************************************************
  1182. chartTypes = new SeriesChartType[] {
  1183. SeriesChartType.ErrorBar
  1184. };
  1185. // "ErrorBarStyle" attribute
  1186. attrInfo = new CustomPropertyInfo(
  1187. CustomPropertyName.ErrorBarStyle,
  1188. typeof(ErrorBarStyle),
  1189. "Both",
  1190. SR.DescriptionCustomAttributeErrorBarStyle,
  1191. chartTypes,
  1192. true,
  1193. true);
  1194. registeredCustomProperties.Add( attrInfo );
  1195. // "ErrorBarCenterMarkerStyle" attribute
  1196. attrInfo = new CustomPropertyInfo(
  1197. CustomPropertyName.ErrorBarCenterMarkerStyle,
  1198. typeof(ErrorBarMarkerStyles),
  1199. "Line",
  1200. SR.DescriptionCustomAttributeErrorBarCenterMarkerStyle,
  1201. chartTypes,
  1202. true,
  1203. true);
  1204. registeredCustomProperties.Add( attrInfo );
  1205. // "ErrorBarSeries" attribute
  1206. attrInfo = new CustomPropertyInfo(
  1207. CustomPropertyName.ErrorBarSeries,
  1208. typeof(string),
  1209. "",
  1210. SR.DescriptionCustomAttributeErrorBarSeries,
  1211. chartTypes,
  1212. true,
  1213. false);
  1214. registeredCustomProperties.Add( attrInfo );
  1215. // "ErrorBarType" attribute
  1216. attrInfo = new CustomPropertyInfo(
  1217. CustomPropertyName.ErrorBarType,
  1218. typeof(string),
  1219. String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}({1:N0})", ErrorBarType.StandardError, ErrorBarChart.DefaultErrorBarTypeValue(ErrorBarType.StandardError)),
  1220. SR.DescriptionCustomAttributeErrorBarType,
  1221. chartTypes,
  1222. true,
  1223. false);
  1224. registeredCustomProperties.Add( attrInfo );
  1225. //***********************************************************************
  1226. //** PointAndFigure chart types properties
  1227. //***********************************************************************
  1228. chartTypes = new SeriesChartType[] { SeriesChartType.PointAndFigure };
  1229. // "UsedYValueHigh" attribute
  1230. attrInfo = new CustomPropertyInfo(
  1231. CustomPropertyName.UsedYValueHigh,
  1232. typeof(int),
  1233. 0,
  1234. SR.DescriptionCustomAttributeUsedYValueHigh,
  1235. chartTypes,
  1236. true,
  1237. false);
  1238. attrInfo.MinValue = 0;
  1239. attrInfo.MaxValue = 20;
  1240. registeredCustomProperties.Add( attrInfo );
  1241. // "UsedYValueLow" attribute
  1242. attrInfo = new CustomPropertyInfo(
  1243. CustomPropertyName.UsedYValueLow,
  1244. typeof(int),
  1245. 1,
  1246. SR.DescriptionCustomAttributeUsedYValueLow,
  1247. chartTypes,
  1248. true,
  1249. false);
  1250. attrInfo.MinValue = 0;
  1251. attrInfo.MaxValue = 20;
  1252. registeredCustomProperties.Add( attrInfo );
  1253. // "PriceUpColor" attribute
  1254. attrInfo = new CustomPropertyInfo(
  1255. CustomPropertyName.PriceUpColor,
  1256. typeof(Color),
  1257. "",
  1258. SR.DescriptionCustomAttributeBarsPriceUpColor,
  1259. chartTypes,
  1260. true,
  1261. false);
  1262. registeredCustomProperties.Add( attrInfo );
  1263. // "BoxSize" attribute
  1264. attrInfo = new CustomPropertyInfo(
  1265. CustomPropertyName.BoxSize,
  1266. typeof(string),
  1267. "4%",
  1268. SR.DescriptionCustomAttributePointFigureBoxSize,
  1269. chartTypes,
  1270. true,
  1271. false);
  1272. registeredCustomProperties.Add( attrInfo );
  1273. // "ProportionalSymbols" attribute
  1274. attrInfo = new CustomPropertyInfo(
  1275. CustomPropertyName.ProportionalSymbols,
  1276. typeof(bool),
  1277. true,
  1278. SR.DescriptionCustomAttributeProportionalSymbols,
  1279. chartTypes,
  1280. true,
  1281. false);
  1282. registeredCustomProperties.Add( attrInfo );
  1283. // "ReversalAmount" attribute
  1284. attrInfo = new CustomPropertyInfo(
  1285. CustomPropertyName.ReversalAmount,
  1286. typeof(int),
  1287. "3",
  1288. SR.DescriptionCustomAttributeReversalAmount,
  1289. chartTypes,
  1290. true,
  1291. false);
  1292. registeredCustomProperties.Add( attrInfo );
  1293. //***********************************************************************
  1294. //** Kagi chart types properties
  1295. //***********************************************************************
  1296. chartTypes = new SeriesChartType[] { SeriesChartType.Kagi };
  1297. // "UsedYValue" attribute
  1298. attrInfo = new CustomPropertyInfo(
  1299. CustomPropertyName.UsedYValue,
  1300. typeof(int),
  1301. 0,
  1302. SR.DescriptionCustomAttributeUsedYValue,
  1303. chartTypes,
  1304. true,
  1305. false);
  1306. attrInfo.MinValue = 0;
  1307. attrInfo.MaxValue = 20;
  1308. registeredCustomProperties.Add( attrInfo );
  1309. // "PriceUpColor" attribute
  1310. attrInfo = new CustomPropertyInfo(
  1311. CustomPropertyName.PriceUpColor,
  1312. typeof(Color),
  1313. "",
  1314. SR.DescriptionCustomAttributeBarsPriceUpColor,
  1315. chartTypes,
  1316. true,
  1317. false);
  1318. registeredCustomProperties.Add( attrInfo );
  1319. // "ReversalAmount" attribute
  1320. attrInfo = new CustomPropertyInfo(
  1321. CustomPropertyName.ReversalAmount,
  1322. typeof(string),
  1323. "3%",
  1324. SR.DescriptionCustomAttributeKagiReversalAmount,
  1325. chartTypes,
  1326. true,
  1327. false);
  1328. registeredCustomProperties.Add( attrInfo );
  1329. //***********************************************************************
  1330. //** Renko chart types properties
  1331. //***********************************************************************
  1332. chartTypes = new SeriesChartType[] { SeriesChartType.Renko };
  1333. // "UsedYValue" attribute
  1334. attrInfo = new CustomPropertyInfo(
  1335. CustomPropertyName.UsedYValue,
  1336. typeof(int),
  1337. 0,
  1338. SR.DescriptionCustomAttributeRenkoUsedYValue,
  1339. chartTypes,
  1340. true,
  1341. false);
  1342. attrInfo.MinValue = 0;
  1343. attrInfo.MaxValue = 20;
  1344. registeredCustomProperties.Add( attrInfo );
  1345. // "PriceUpColor" attribute
  1346. attrInfo = new CustomPropertyInfo(
  1347. CustomPropertyName.PriceUpColor,
  1348. typeof(Color),
  1349. "",
  1350. SR.DescriptionCustomAttributeBarsPriceUpColor,
  1351. chartTypes,
  1352. true,
  1353. false);
  1354. registeredCustomProperties.Add( attrInfo );
  1355. // "BoxSize" attribute
  1356. attrInfo = new CustomPropertyInfo(
  1357. CustomPropertyName.BoxSize,
  1358. typeof(string),
  1359. "4%",
  1360. SR.DescriptionCustomAttributeBoxSize,
  1361. chartTypes,
  1362. true,
  1363. false);
  1364. registeredCustomProperties.Add( attrInfo );
  1365. //***********************************************************************
  1366. //** ThreeLineBreak chart types properties
  1367. //***********************************************************************
  1368. chartTypes = new SeriesChartType[] { SeriesChartType.ThreeLineBreak };
  1369. // "UsedYValue" attribute
  1370. attrInfo = new CustomPropertyInfo(
  1371. CustomPropertyName.UsedYValue,
  1372. typeof(int),
  1373. 0,
  1374. SR.DescriptionCustomAttributeThreeLineBreakUsedYValue,
  1375. chartTypes,
  1376. true,
  1377. false);
  1378. attrInfo.MinValue = 0;
  1379. attrInfo.MaxValue = 20;
  1380. registeredCustomProperties.Add( attrInfo );
  1381. // "PriceUpColor" attribute
  1382. attrInfo = new CustomPropertyInfo(
  1383. CustomPropertyName.PriceUpColor,
  1384. typeof(Color),
  1385. "",
  1386. SR.DescriptionCustomAttributeBarsPriceUpColor,
  1387. chartTypes,
  1388. true,
  1389. false);
  1390. registeredCustomProperties.Add( attrInfo );
  1391. // "NumberOfLinesInBreak" attribute
  1392. attrInfo = new CustomPropertyInfo(
  1393. CustomPropertyName.NumberOfLinesInBreak,
  1394. typeof(int),
  1395. 3,
  1396. SR.DescriptionCustomAttributeNumberOfLinesInBreak,
  1397. chartTypes,
  1398. true,
  1399. false);
  1400. registeredCustomProperties.Add( attrInfo );
  1401. //***********************************************************************
  1402. //** Funnel chart types properties
  1403. //***********************************************************************
  1404. chartTypes = new SeriesChartType[] { SeriesChartType.Funnel };
  1405. // "FunnelLabelStyle" attribute
  1406. attrInfo = new CustomPropertyInfo(
  1407. CustomPropertyName.FunnelLabelStyle,
  1408. typeof(FunnelLabelStyle),
  1409. "OutsideInColumn",
  1410. SR.DescriptionCustomAttributeFunnelLabelStyle,
  1411. chartTypes,
  1412. true,
  1413. true);
  1414. registeredCustomProperties.Add( attrInfo );
  1415. // "FunnelNeckWidth" attribute
  1416. attrInfo = new CustomPropertyInfo(
  1417. CustomPropertyName.FunnelNeckWidth,
  1418. typeof(float),
  1419. 5f,
  1420. SR.DescriptionCustomAttributeFunnelNeckWidth,
  1421. chartTypes,
  1422. true,
  1423. false);
  1424. attrInfo.MinValue = 0f;
  1425. attrInfo.MaxValue = 100f;
  1426. registeredCustomProperties.Add( attrInfo );
  1427. // "FunnelNeckHeight" attribute
  1428. attrInfo = new CustomPropertyInfo(
  1429. CustomPropertyName.FunnelNeckHeight,
  1430. typeof(float),
  1431. 5f,
  1432. SR.DescriptionCustomAttributeFunnelNeckHeight,
  1433. chartTypes,
  1434. true,
  1435. false);
  1436. attrInfo.MinValue = 0f;
  1437. attrInfo.MaxValue = 100f;
  1438. registeredCustomProperties.Add( attrInfo );
  1439. // "FunnelMinPointHeight" attribute
  1440. attrInfo = new CustomPropertyInfo(
  1441. CustomPropertyName.FunnelMinPointHeight,
  1442. typeof(float),
  1443. 0f,
  1444. SR.DescriptionCustomAttributeFunnelMinPointHeight,
  1445. chartTypes,
  1446. true,
  1447. false);
  1448. attrInfo.MinValue = 0f;
  1449. attrInfo.MaxValue = 100f;
  1450. registeredCustomProperties.Add( attrInfo );
  1451. // "Funnel3DRotationAngle" attribute
  1452. attrInfo = new CustomPropertyInfo(
  1453. CustomPropertyName.Funnel3DRotationAngle,
  1454. typeof(float),
  1455. 5f,
  1456. SR.DescriptionCustomAttributeFunnel3DRotationAngle,
  1457. chartTypes,
  1458. true,
  1459. false);
  1460. attrInfo.AppliesTo2D = false;
  1461. attrInfo.MinValue = -10f;
  1462. attrInfo.MaxValue = 10f;
  1463. registeredCustomProperties.Add( attrInfo );
  1464. // "FunnelPointGap" attribute
  1465. attrInfo = new CustomPropertyInfo(
  1466. CustomPropertyName.FunnelPointGap,
  1467. typeof(float),
  1468. 0f,
  1469. SR.DescriptionCustomAttributeFunnelPointGap,
  1470. chartTypes,
  1471. true,
  1472. false);
  1473. attrInfo.MinValue = 0f;
  1474. attrInfo.MaxValue = 100f;
  1475. registeredCustomProperties.Add( attrInfo );
  1476. // "Funnel3DDrawingStyle" attribute
  1477. attrInfo = new CustomPropertyInfo(
  1478. CustomPropertyName.Funnel3DDrawingStyle,
  1479. typeof(Funnel3DDrawingStyle),
  1480. "CircularBase",
  1481. SR.DescriptionCustomAttributeFunnel3DDrawingStyle,
  1482. chartTypes,
  1483. true,
  1484. false);
  1485. attrInfo.AppliesTo2D = false;
  1486. registeredCustomProperties.Add( attrInfo );
  1487. // "FunnelStyle" attribute
  1488. attrInfo = new CustomPropertyInfo(
  1489. CustomPropertyName.FunnelStyle,
  1490. typeof(FunnelStyle),
  1491. "YIsHeight",
  1492. SR.DescriptionCustomAttributeFunnelStyle,
  1493. chartTypes,
  1494. true,
  1495. false);
  1496. registeredCustomProperties.Add( attrInfo );
  1497. // "FunnelInsideLabelAlignment" attribute
  1498. attrInfo = new CustomPropertyInfo(
  1499. CustomPropertyName.FunnelInsideLabelAlignment,
  1500. typeof(FunnelLabelVerticalAlignment),
  1501. "Center",
  1502. SR.DescriptionCustomAttributeFunnelInsideLabelAlignment,
  1503. chartTypes,
  1504. true,
  1505. true);
  1506. registeredCustomProperties.Add( attrInfo );
  1507. // "FunnelOutsideLabelPlacement" attribute
  1508. attrInfo = new CustomPropertyInfo(
  1509. CustomPropertyName.FunnelOutsideLabelPlacement,
  1510. typeof(FunnelLabelPlacement),
  1511. "Right",
  1512. SR.DescriptionCustomAttributeFunnelOutsideLabelPlacement,
  1513. chartTypes,
  1514. true,
  1515. true);
  1516. registeredCustomProperties.Add( attrInfo );
  1517. // "CalloutLineColor" attribute
  1518. attrInfo = new CustomPropertyInfo(
  1519. CustomPropertyName.CalloutLineColor,
  1520. typeof(Color),
  1521. "Black",
  1522. SR.DescriptionCustomAttributeCalloutLineColor,
  1523. chartTypes,
  1524. true,
  1525. true);
  1526. registeredCustomProperties.Add( attrInfo );
  1527. //***********************************************************************
  1528. //** Pyramid chart types properties
  1529. //***********************************************************************
  1530. chartTypes = new SeriesChartType[] { SeriesChartType.Pyramid };
  1531. // "PyramidLabelStyle" attribute
  1532. attrInfo = new CustomPropertyInfo(
  1533. CustomPropertyName.PyramidLabelStyle,
  1534. typeof(FunnelLabelStyle),
  1535. "OutsideInColumn",
  1536. SR.DescriptionCustomAttributePyramidLabelStyle,
  1537. chartTypes,
  1538. true,
  1539. true);
  1540. registeredCustomProperties.Add( attrInfo );
  1541. // "PyramidMinPointHeight" attribute
  1542. attrInfo = new CustomPropertyInfo(
  1543. CustomPropertyName.PyramidMinPointHeight,
  1544. typeof(float),
  1545. 0f,
  1546. SR.DescriptionCustomAttributePyramidMinPointHeight,
  1547. chartTypes,
  1548. true,
  1549. false);
  1550. attrInfo.MinValue = 0f;
  1551. attrInfo.MaxValue = 100f;
  1552. registeredCustomProperties.Add( attrInfo );
  1553. // "Pyramid3DRotationAngle" attribute
  1554. attrInfo = new CustomPropertyInfo(
  1555. CustomPropertyName.Pyramid3DRotationAngle,
  1556. typeof(float),
  1557. 5f,
  1558. SR.DescriptionCustomAttributePyramid3DRotationAngle,
  1559. chartTypes,
  1560. true,
  1561. false);
  1562. attrInfo.AppliesTo2D = false;
  1563. attrInfo.MinValue = -10f;
  1564. attrInfo.MaxValue = 10f;
  1565. registeredCustomProperties.Add( attrInfo );
  1566. // "PyramidPointGap" attribute
  1567. attrInfo = new CustomPropertyInfo(
  1568. CustomPropertyName.PyramidPointGap,
  1569. typeof(float),
  1570. 0f,
  1571. SR.DescriptionCustomAttributePyramidPointGap,
  1572. chartTypes,
  1573. true,
  1574. false);
  1575. attrInfo.MinValue = 0f;
  1576. attrInfo.MaxValue = 100f;
  1577. registeredCustomProperties.Add( attrInfo );
  1578. // "Pyramid3DDrawingStyle" attribute
  1579. attrInfo = new CustomPropertyInfo(
  1580. CustomPropertyName.Pyramid3DDrawingStyle,
  1581. typeof(Funnel3DDrawingStyle),
  1582. "SquareBase",
  1583. SR.DescriptionCustomAttributePyramid3DDrawingStyle,
  1584. chartTypes,
  1585. true,
  1586. false);
  1587. attrInfo.AppliesTo2D = false;
  1588. registeredCustomProperties.Add( attrInfo );
  1589. // "PyramidInsideLabelAlignment" attribute
  1590. attrInfo = new CustomPropertyInfo(
  1591. CustomPropertyName.PyramidInsideLabelAlignment,
  1592. typeof(FunnelLabelVerticalAlignment),
  1593. "Center",
  1594. SR.DescriptionCustomAttributePyramidInsideLabelAlignment,
  1595. chartTypes,
  1596. true,
  1597. true);
  1598. registeredCustomProperties.Add( attrInfo );
  1599. // "PyramidOutsideLabelPlacement" attribute
  1600. attrInfo = new CustomPropertyInfo(
  1601. CustomPropertyName.PyramidOutsideLabelPlacement,
  1602. typeof(FunnelLabelPlacement),
  1603. "Right",
  1604. SR.DescriptionCustomAttributePyramidOutsideLabelPlacement,
  1605. chartTypes,
  1606. true,
  1607. true);
  1608. registeredCustomProperties.Add( attrInfo );
  1609. // "CalloutLineColor" attribute
  1610. attrInfo = new CustomPropertyInfo(
  1611. CustomPropertyName.CalloutLineColor,
  1612. typeof(Color),
  1613. "Black",
  1614. SR.DescriptionCustomAttributeCalloutLineColor,
  1615. chartTypes,
  1616. true,
  1617. true);
  1618. registeredCustomProperties.Add( attrInfo );
  1619. // "PyramidValueType" attribute
  1620. attrInfo = new CustomPropertyInfo(
  1621. CustomPropertyName.PyramidValueType,
  1622. typeof(PyramidValueType),
  1623. "Linear",
  1624. SR.DescriptionCustomAttributePyramidValueType,
  1625. chartTypes,
  1626. true,
  1627. false);
  1628. registeredCustomProperties.Add( attrInfo );
  1629. }
  1630. #endregion // Attributes Regestering methods
  1631. #region Registry methods
  1632. /// <summary>
  1633. /// Adds custom attribute information into the registry.
  1634. /// </summary>
  1635. /// <param name="customPropertyInfo">Custom attribute information.</param>
  1636. public void Register(CustomPropertyInfo customPropertyInfo)
  1637. {
  1638. // Add custom attribute information to the hash table
  1639. registeredCustomProperties.Add(customPropertyInfo);
  1640. }
  1641. #endregion
  1642. }
  1643. /// <summary>
  1644. /// CustomPropertyInfo class stores information about single
  1645. /// custom attribute. It includes Name, Description, Default
  1646. /// Value, any restrictions and the conditions when it can
  1647. /// be used.
  1648. ///
  1649. /// Most of the custom attribute can only be used when specific
  1650. /// chart type is selected. Some of the properties only work
  1651. /// in 2D or 3D mode and some can be applied to the whole
  1652. /// series or data points only.
  1653. /// </summary>
  1654. internal class CustomPropertyInfo
  1655. {
  1656. #region Public Fields
  1657. /// <summary>
  1658. /// Attribute name.
  1659. /// </summary>
  1660. public string Name = String.Empty;
  1661. /// <summary>
  1662. /// Attribute value type.
  1663. /// </summary>
  1664. public Type ValueType = typeof(int);
  1665. /// <summary>
  1666. /// Attribute default value.
  1667. /// </summary>
  1668. public object DefaultValue = null;
  1669. /// <summary>
  1670. /// Attribute description.
  1671. /// </summary>
  1672. public string Description = String.Empty;
  1673. /// <summary>
  1674. /// Array of chart type supported by the attribute
  1675. /// </summary>
  1676. public SeriesChartType[] AppliesToChartType = null;
  1677. /// <summary>
  1678. /// Indicates that attribute can be applied on series.
  1679. /// </summary>
  1680. public bool AppliesToSeries = true;
  1681. /// <summary>
  1682. /// Indicates that attribute can be applied on data point.
  1683. /// </summary>
  1684. public bool AppliesToDataPoint = true;
  1685. /// <summary>
  1686. /// Indicates that attribute can be applied on 3D chart type.
  1687. /// </summary>
  1688. public bool AppliesTo3D = true;
  1689. /// <summary>
  1690. /// Indicates that attribute can be applied on 2D chart type.
  1691. /// </summary>
  1692. public bool AppliesTo2D = true;
  1693. /// <summary>
  1694. /// Attribute minimum value.
  1695. /// </summary>
  1696. public object MinValue = null;
  1697. /// <summary>
  1698. /// Attribute maximum value.
  1699. /// </summary>
  1700. public object MaxValue = null;
  1701. #endregion // Public Fields
  1702. #region Constructor
  1703. /// <summary>
  1704. /// Public constructor.
  1705. /// </summary>
  1706. /// <param name="name">Attribute name</param>
  1707. /// <param name="valueType">Attribute value type.</param>
  1708. /// <param name="defaultValue">Attribute default value.</param>
  1709. /// <param name="description">Attribute description.</param>
  1710. /// <param name="appliesToChartType">Array of chart types where attribute used.</param>
  1711. /// <param name="appliesToSeries">True if properties can be set in series.</param>
  1712. /// <param name="appliesToDataPoint">True if properties can be set in data point.</param>
  1713. public CustomPropertyInfo(
  1714. string name,
  1715. Type valueType,
  1716. object defaultValue,
  1717. string description,
  1718. SeriesChartType[] appliesToChartType,
  1719. bool appliesToSeries,
  1720. bool appliesToDataPoint)
  1721. {
  1722. this.Name = name;
  1723. this.ValueType = valueType;
  1724. this.DefaultValue = defaultValue;
  1725. this.Description = description;
  1726. this.AppliesToChartType = appliesToChartType;
  1727. this.AppliesToSeries = appliesToSeries;
  1728. this.AppliesToDataPoint = appliesToDataPoint;
  1729. }
  1730. #endregion // Constructor
  1731. }
  1732. }