1 //-------------------------------------------------------------
2 // <copyright company=
\92Microsoft Corporation
\92>
3 // Copyright © Microsoft Corporation. All Rights Reserved.
5 //-------------------------------------------------------------
6 // @owner=alexgor, deliant
7 //=================================================================
8 // File: CustomProperties.cs
10 // Namespace: System.Web.UI.WebControls[Windows.Forms].Charting.Utilities
12 // Classes: CustomPropertyRegistry, CustomPropertyInfo,
15 // Purpose: CustomPropertyRegistry contains information for all
16 // chart custom properties. This informatin is used at
17 // design-time to provide simple editors for the
18 // CustomProperty property of the Series and DataPoint.
20 // Custom Properties Overview:
21 // ---------------------------
23 // Different chart types may have unique settings that only apply to
24 // this chart type. For example,
\91Exploded
\92 attribute on the data point
25 // only make sense in case of Pie and Doughnut chart types. Instead of
26 // adding properties that only will work with specific chart types
27 // CustomProperties were introduced.
29 // Custom properties are implemented using the CustomProperties property
30 // of both Series objects and their associated DataPoint objects. Here
31 // is an example of setting data point custom attribute:
33 // Chart1.Series["Default"].Points[0][CustomPropertyName.Exploded] = "true";
35 // Custom attribute names are case-sensitive. You should be mindful of
36 // this fact when formatting custom properties in code-behind. Further,
37 // if the CustomProperty value contains a comma, then each comma must
38 // be preceded by a '\' character to escape the comma. This is useful
39 // when, for example, an RGB color value is set in your application.
40 // In such cases, the setting of custom properties that contain commas
41 // can either be done at runtime, or design-time.
43 // Reviewed: AG - Microsoft 5, 2007
45 //===================================================================
48 #region Used Namespaces
52 using System.Collections;
53 using System.ComponentModel;
54 using System.ComponentModel.Design;
57 using System.Windows.Forms.DataVisualization.Charting;
58 using System.Windows.Forms.DataVisualization.Charting.ChartTypes;
60 using System.Web.UI.DataVisualization.Charting;
61 using System.Web.UI.DataVisualization.Charting.ChartTypes;
67 namespace System.Windows.Forms.DataVisualization.Charting.Utilities
68 #else // Microsoft_CONTROL
69 namespace System.Web.UI.DataVisualization.Charting.Utilities
70 #endif // Microsoft_CONTROL
76 /// Circular chart drawing style.
78 internal enum PolarDrawingStyles
81 /// Series are drawn as lines.
85 /// Series are drawn as markers.
91 /// CircularAreaDrawingStyle
93 internal enum CircularAreaDrawingStyles
109 internal enum ErrorBarMarkerStyles
117 /// The marker style is Square
122 /// The marker style is Circle
127 /// The marker style is Diamond
132 /// The marker style is Triangle
137 /// The marker style is Cross
142 /// The marker style is 4 corner star
147 /// The marker style is 5 corner star
152 /// The marker style is 6 corner star
157 /// The marker style is 10 corner star
169 /// AxisName of stock chart markers
171 internal enum StockShowOpenCloseTypes
174 /// Open and Close markers are shown.
179 /// Only Open markers are shown.
184 /// Only Close markers are shown.
191 /// IsEmpty point value attribute
193 internal enum EmptyPointTypes
196 /// Average of two neighbor points is used.
201 /// Zero value is used
207 /// Stock chart point labels attribute
209 internal enum StockLabelValueTypes
212 /// High Y value is used to generate point label.
217 /// Low Y value is used to generate point label.
222 /// Open Y value is used to generate point label.
227 /// Close Y value is used to generate point label.
233 /// Data point label alignment.
236 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")]
237 internal enum LabelAlignments
240 /// Automatic position.
244 /// Label aligned on the top of the marker.
248 /// Label aligned on the bottom of the marker.
252 /// Label aligned on the right of the marker.
256 /// Label aligned on the left of the marker.
260 /// Label aligned on the top-left of the marker.
264 /// Label aligned on the top-right of the marker.
268 /// Label aligned on the bottom-left of the marker.
272 /// Label aligned on the bottom-right of the marker.
276 /// Label aligned in the center of the marker.
281 #endregion //Enumerations
284 /// CustomPropertyName class contains constant strings defining
285 /// names of all custom properties used in the chart.
287 internal static class CustomPropertyName
289 #region Common Custom Properties Names
291 internal const string DrawSideBySide = "DrawSideBySide";
292 internal const string EmptyPointValue = "EmptyPointValue";
293 internal const string IsXAxisQuantitative = "IsXAxisQuantitative";
294 internal const string BarLabelStyle = "BarLabelStyle";
295 internal const string StackedGroupName = "StackedGroupName";
296 internal const string DrawingStyle = "DrawingStyle";
297 internal const string PointWidth = "PointWidth";
298 internal const string PixelPointWidth = "PixelPointWidth";
299 internal const string MinPixelPointWidth = "MinPixelPointWidth";
300 internal const string MaxPixelPointWidth = "MaxPixelPointWidth";
301 internal const string PriceUpColor = "PriceUpColor";
302 internal const string PriceDownColor = "PriceDownColor";
303 internal const string LabelValueType = "LabelValueType";
304 internal const string OpenCloseStyle = "OpenCloseStyle";
305 internal const string ShowOpenClose = "ShowOpenClose";
306 internal const string BubbleScaleMin = "BubbleScaleMin";
307 internal const string BubbleScaleMax = "BubbleScaleMax";
308 internal const string BubbleMaxSize = "BubbleMaxSize";
309 internal const string BubbleMinSize = "BubbleMinSize";
310 internal const string BubbleUseSizeForLabel = "BubbleUseSizeForLabel";
311 internal const string PieDrawingStyle = "PieDrawingStyle";
312 internal const string CollectedStyle = "CollectedStyle";
313 internal const string CollectedThreshold = "CollectedThreshold";
314 internal const string CollectedThresholdUsePercent = "CollectedThresholdUsePercent";
315 internal const string CollectedSliceExploded = "CollectedSliceExploded";
316 internal const string CollectedLabel = "CollectedLabel";
317 internal const string CollectedLegendText = "CollectedLegendText";
318 internal const string CollectedToolTip = "CollectedToolTip";
319 internal const string CollectedColor = "CollectedColor";
320 internal const string CollectedChartShowLegend = "CollectedChartShowLegend";
321 internal const string CollectedChartShowLabels = "CollectedChartShowLabels";
322 internal const string PieStartAngle = "PieStartAngle";
323 internal const string Exploded = "Exploded";
324 internal const string LabelsRadialLineSize = "LabelsRadialLineSize";
325 internal const string LabelsHorizontalLineSize = "LabelsHorizontalLineSize";
326 internal const string PieLabelStyle = "PieLabelStyle";
327 internal const string MinimumRelativePieSize = "MinimumRelativePieSize";
328 internal const string _3DLabelLineSize = "3DLabelLineSize";
329 internal const string PieLineColor = "PieLineColor";
330 internal const string PieAutoAxisLabels = "AutoAxisLabels";
331 internal const string DoughnutRadius = "DoughnutRadius";
332 internal const string LabelStyle = "LabelStyle";
333 internal const string ShowMarkerLines = "ShowMarkerLines";
334 internal const string LineTension = "LineTension";
335 internal const string PixelPointDepth = "PixelPointDepth";
336 internal const string PixelPointGapDepth = "PixelPointGapDepth";
337 internal const string PermittedPixelError = "PermittedPixelError";
338 internal const string CircularLabelsStyle = "CircularLabelsStyle";
339 internal const string PolarDrawingStyle = "PolarDrawingStyle";
340 internal const string AreaDrawingStyle = "AreaDrawingStyle";
341 internal const string RadarDrawingStyle = "RadarDrawingStyle";
342 internal const string BoxPlotPercentile = "BoxPlotPercentile";
343 internal const string BoxPlotWhiskerPercentile = "BoxPlotWhiskerPercentile";
344 internal const string BoxPlotShowAverage = "BoxPlotShowAverage";
345 internal const string BoxPlotShowMedian = "BoxPlotShowMedian";
346 internal const string BoxPlotShowUnusualValues = "BoxPlotShowUnusualValues";
347 internal const string BoxPlotSeries = "BoxPlotSeries";
348 internal const string ErrorBarStyle = "ErrorBarStyle";
349 internal const string ErrorBarCenterMarkerStyle = "ErrorBarCenterMarkerStyle";
350 internal const string ErrorBarSeries = "ErrorBarSeries";
351 internal const string ErrorBarType = "ErrorBarType";
352 internal const string UsedYValueHigh = "UsedYValueHigh";
353 internal const string UsedYValueLow = "UsedYValueLow";
354 internal const string BoxSize = "BoxSize";
355 internal const string ProportionalSymbols = "ProportionalSymbols";
356 internal const string ReversalAmount = "ReversalAmount";
357 internal const string UsedYValue = "UsedYValue";
358 internal const string NumberOfLinesInBreak = "NumberOfLinesInBreak";
359 internal const string FunnelLabelStyle = "FunnelLabelStyle";
360 internal const string FunnelNeckWidth = "FunnelNeckWidth";
361 internal const string FunnelNeckHeight = "FunnelNeckHeight";
362 internal const string FunnelMinPointHeight = "FunnelMinPointHeight";
363 internal const string Funnel3DRotationAngle = "Funnel3DRotationAngle";
364 internal const string FunnelPointGap = "FunnelPointGap";
365 internal const string Funnel3DDrawingStyle = "Funnel3DDrawingStyle";
366 internal const string FunnelStyle = "FunnelStyle";
367 internal const string FunnelInsideLabelAlignment = "FunnelInsideLabelAlignment";
368 internal const string FunnelOutsideLabelPlacement = "FunnelOutsideLabelPlacement";
369 internal const string CalloutLineColor = "CalloutLineColor";
370 internal const string PyramidLabelStyle = "PyramidLabelStyle";
371 internal const string PyramidMinPointHeight = "PyramidMinPointHeight";
372 internal const string Pyramid3DRotationAngle = "Pyramid3DRotationAngle";
373 internal const string PyramidPointGap = "PyramidPointGap";
374 internal const string Pyramid3DDrawingStyle = "Pyramid3DDrawingStyle";
375 internal const string PyramidInsideLabelAlignment = "PyramidInsideLabelAlignment";
376 internal const string PyramidOutsideLabelPlacement = "PyramidOutsideLabelPlacement";
377 internal const string PyramidValueType = "PyramidValueType";
379 #endregion // Common Custom Properties Names
383 /// CustomPropertyRegistry contains information for all chart
384 /// custom properties. This data is exposed through the
385 ///
\91registeredCustomProperties
\92 field which is an ArrayList
386 /// containing CustomPropertyInfo classes.
388 internal class CustomPropertyRegistry : IServiceProvider
392 // List of registered properties
393 internal ArrayList registeredCustomProperties = new ArrayList();
395 // Defines maximum value which can be set to the attribute which uses pixels
396 internal static int MaxValueOfPixelAttribute = 10000;
398 internal static System.Collections.Generic.List<SeriesChartType> IsXAxisQuantitativeChartTypes =
399 new System.Collections.Generic.List<SeriesChartType >(
400 new SeriesChartType[] {
401 SeriesChartType.Line,
402 SeriesChartType.FastLine,
403 SeriesChartType.Spline,
404 SeriesChartType.Point,
405 SeriesChartType.FastPoint,
406 SeriesChartType.Bubble,
407 SeriesChartType.RangeColumn,
408 SeriesChartType.RangeBar,
412 #region Constructor and Services
415 /// Custom properties registry public constructor.
417 public CustomPropertyRegistry()
419 // Register properties used in the chart
420 RegisterProperties();
424 /// Returns custom properties registry service object.
426 /// <param name="serviceType">Service type to get.</param>
427 /// <returns>Custom properties registry service.</returns>
428 [EditorBrowsableAttribute(EditorBrowsableState.Never)]
429 object IServiceProvider.GetService(Type serviceType)
431 if(serviceType == typeof(CustomPropertyRegistry))
435 throw (new ArgumentException(SR.ExceptionCustomAttributesRegistryUnsupportedType( serviceType.ToString()) ));
440 #region Properties Regestering methods
443 /// This method registers all standard custom properties used in
444 /// the chart and provides all the additional information like
445 /// description, value validation and scenarios where custom
446 /// attribute can be used.
448 private void RegisterProperties()
450 SeriesChartType[] chartTypes = null;
451 CustomPropertyInfo attrInfo = null;
453 //***********************************************************************
454 //** DrawSideBySide properties
455 //***********************************************************************
456 chartTypes = new SeriesChartType[] {
458 SeriesChartType.Column,
460 SeriesChartType.RangeColumn,
461 SeriesChartType.BoxPlot,
462 SeriesChartType.RangeBar,
463 SeriesChartType.ErrorBar,
466 // "DrawSideBySide" attribute
467 attrInfo = new CustomPropertyInfo(
468 CustomPropertyName.DrawSideBySide,
471 SR.DescriptionCustomAttributeDrawSideBySide,
475 registeredCustomProperties.Add( attrInfo );
477 //***********************************************************************
478 //** IsXAxisQuantitative properties
479 //***********************************************************************
480 registeredCustomProperties.Add(new CustomPropertyInfo(
481 CustomPropertyName.IsXAxisQuantitative,
484 SR.DescriptionCustomAttributeIsXAxisQuantitive,
485 IsXAxisQuantitativeChartTypes.ToArray(),
489 //***********************************************************************
490 //** EmptyPointValue properties
491 //***********************************************************************
492 chartTypes = new SeriesChartType[] {
493 SeriesChartType.Point,
494 SeriesChartType.Bubble,
495 SeriesChartType.Line,
496 SeriesChartType.Spline,
497 SeriesChartType.StepLine,
498 SeriesChartType.Column,
499 SeriesChartType.RangeColumn,
500 SeriesChartType.RangeBar,
501 SeriesChartType.Radar,
502 SeriesChartType.Range,
503 SeriesChartType.SplineRange,
504 SeriesChartType.Polar,
505 SeriesChartType.Area,
506 SeriesChartType.SplineArea,
509 registeredCustomProperties.Add( new CustomPropertyInfo(
510 CustomPropertyName.EmptyPointValue,
511 typeof(EmptyPointTypes),
513 SR.DescriptionCustomAttributeEmptyPointValue,
519 //***********************************************************************
520 //** Bar label styles properties
521 //***********************************************************************
522 chartTypes = new SeriesChartType[] {
523 SeriesChartType.StackedBar,
524 SeriesChartType.StackedBar100,
525 SeriesChartType.RangeBar,
527 // "BarLabelStyle" attribute
528 attrInfo = new CustomPropertyInfo(
529 CustomPropertyName.BarLabelStyle,
530 typeof(BarValueLabelDrawingStyle),
532 SR.DescriptionCustomAttributeBarLabelStyle,
536 registeredCustomProperties.Add( attrInfo );
540 //***********************************************************************
541 //** Stacked Column/Bar properties
542 //***********************************************************************
543 chartTypes = new SeriesChartType[] {
544 SeriesChartType.StackedBar,
545 SeriesChartType.StackedBar100,
546 SeriesChartType.StackedColumn,
547 SeriesChartType.StackedColumn100,
551 // "StackedGroupName" attribute
552 attrInfo = new CustomPropertyInfo(
553 CustomPropertyName.StackedGroupName,
556 SR.DescriptionCustomAttributeStackedGroupName,
560 registeredCustomProperties.Add(attrInfo);
564 //***********************************************************************
565 //** Bar label styles properties
566 //***********************************************************************
567 chartTypes = new SeriesChartType[] {
570 // "BarLabelStyle" attribute
571 attrInfo = new CustomPropertyInfo(
572 CustomPropertyName.BarLabelStyle,
573 typeof(BarValueLabelDrawingStyle),
575 SR.DescriptionCustomAttributeBarLabelStyle,
579 registeredCustomProperties.Add( attrInfo );
581 //***********************************************************************
582 //** Bar and Columnt chart types properties
583 //***********************************************************************
584 chartTypes = new SeriesChartType[] {
586 SeriesChartType.Column,
587 SeriesChartType.StackedBar,
588 SeriesChartType.StackedBar100,
589 SeriesChartType.StackedColumn,
590 SeriesChartType.StackedColumn100,
591 SeriesChartType.RangeBar,
592 SeriesChartType.RangeColumn,
595 // "DrawingStyle" attribute
596 attrInfo = new CustomPropertyInfo(
597 CustomPropertyName.DrawingStyle,
598 typeof(BarDrawingStyle),
600 SR.DescriptionCustomAttributeDrawingStyle,
604 registeredCustomProperties.Add( attrInfo );
606 //***********************************************************************
607 //** Chart types point width properties
608 //***********************************************************************
609 chartTypes = new SeriesChartType[] {
611 SeriesChartType.Candlestick,
612 SeriesChartType.Column,
613 SeriesChartType.StackedBar,
614 SeriesChartType.StackedBar100,
615 SeriesChartType.StackedColumn,
616 SeriesChartType.StackedColumn100,
617 SeriesChartType.Stock,
618 SeriesChartType.BoxPlot,
619 SeriesChartType.ErrorBar,
620 SeriesChartType.RangeBar,
621 SeriesChartType.RangeColumn,
623 // "PointWidth" attribute
624 attrInfo = new CustomPropertyInfo(
625 CustomPropertyName.PointWidth,
628 SR.DescriptionCustomAttributePointWidth,
632 attrInfo.MinValue = 0f;
633 attrInfo.MaxValue = 2f;
634 registeredCustomProperties.Add( attrInfo );
636 // "PixelPointWidth" attribute
637 attrInfo = new CustomPropertyInfo(
638 CustomPropertyName.PixelPointWidth,
641 SR.DescriptionCustomAttributePixelPointWidth,
645 attrInfo.MinValue = 0;
646 attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
647 registeredCustomProperties.Add( attrInfo );
649 // "MinPixelPointWidth" attribute
650 attrInfo = new CustomPropertyInfo(
651 CustomPropertyName.MinPixelPointWidth,
654 SR.DescriptionCustomAttributeMinPixelPointWidth,
658 attrInfo.MinValue = 0;
659 attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
660 registeredCustomProperties.Add( attrInfo );
662 // "MaxPixelPointWidth" attribute
663 attrInfo = new CustomPropertyInfo(
664 CustomPropertyName.MaxPixelPointWidth,
667 SR.DescriptionCustomAttributeMaxPixelPointWidth,
671 attrInfo.MinValue = 0;
672 attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
673 registeredCustomProperties.Add( attrInfo );
677 //***********************************************************************
678 //** CandleStick chart types properties
679 //***********************************************************************
680 chartTypes = new SeriesChartType[] { SeriesChartType.Candlestick };
682 // "PriceUpColor" attribute
683 attrInfo = new CustomPropertyInfo(
684 CustomPropertyName.PriceUpColor,
687 SR.DescriptionCustomAttributeCandlePriceUpColor,
691 registeredCustomProperties.Add( attrInfo );
693 // "PriceDownColor" attribute
694 attrInfo = new CustomPropertyInfo(
695 CustomPropertyName.PriceDownColor,
698 SR.DescriptionCustomAttributePriceDownColor,
702 registeredCustomProperties.Add( attrInfo );
705 //***********************************************************************
706 //** Stock and CandleStick chart types properties
707 //***********************************************************************
708 chartTypes = new SeriesChartType[] { SeriesChartType.Stock, SeriesChartType.Candlestick };
710 // "LabelValueType" attribute
711 attrInfo = new CustomPropertyInfo(
712 CustomPropertyName.LabelValueType,
713 typeof(StockLabelValueTypes),
715 SR.DescriptionCustomAttributeLabelValueType,
719 registeredCustomProperties.Add( attrInfo );
721 //***********************************************************************
722 //** Stock chart types properties
723 //***********************************************************************
724 chartTypes = new SeriesChartType[] { SeriesChartType.Stock };
726 // "OpenCloseStyle" attribute
727 attrInfo = new CustomPropertyInfo(
728 CustomPropertyName.OpenCloseStyle,
729 typeof(StockOpenCloseMarkStyle),
731 SR.DescriptionCustomAttributeOpenCloseStyle,
735 registeredCustomProperties.Add( attrInfo );
737 // "ShowOpenClose" attribute
738 attrInfo = new CustomPropertyInfo(
739 CustomPropertyName.ShowOpenClose,
740 typeof(StockShowOpenCloseTypes),
742 SR.DescriptionCustomAttributeShowOpenClose,
746 registeredCustomProperties.Add( attrInfo );
749 //***********************************************************************
750 //** Bubble chart types properties
751 //***********************************************************************
752 chartTypes = new SeriesChartType[] { SeriesChartType.Bubble };
754 // "BubbleScaleMin" attribute
755 attrInfo = new CustomPropertyInfo(
756 CustomPropertyName.BubbleScaleMin,
759 SR.DescriptionCustomAttributeBubbleScaleMin,
763 registeredCustomProperties.Add( attrInfo );
765 // "BubbleScaleMax" attribute
766 attrInfo = new CustomPropertyInfo(
767 CustomPropertyName.BubbleScaleMax,
770 SR.DescriptionCustomAttributeBubbleScaleMax,
774 registeredCustomProperties.Add( attrInfo );
776 // "BubbleMaxSize" attribute
777 attrInfo = new CustomPropertyInfo(
778 CustomPropertyName.BubbleMaxSize,
781 SR.DescriptionCustomAttributeBubbleMaxSize,
785 attrInfo.MinValue = 0f;
786 attrInfo.MaxValue = 100f;
787 registeredCustomProperties.Add( attrInfo );
789 // "BubbleMinSize" attribute of the Bubble chart
790 attrInfo = new CustomPropertyInfo(
791 CustomPropertyName.BubbleMinSize,
794 SR.DescriptionCustomAttributeBubbleMaxSize,
798 attrInfo.MinValue = 0f;
799 attrInfo.MaxValue = 100f;
800 registeredCustomProperties.Add( attrInfo );
802 // "BubbleUseSizeForLabel" attribute
803 attrInfo = new CustomPropertyInfo(
804 CustomPropertyName.BubbleUseSizeForLabel,
807 SR.DescriptionCustomAttributeBubbleUseSizeForLabel,
811 registeredCustomProperties.Add( attrInfo );
815 //***********************************************************************
816 //** Pie and Doughnut chart types properties
817 //***********************************************************************
818 chartTypes = new SeriesChartType[] {
820 SeriesChartType.Doughnut
824 // "PieDrawingStyle" attribute
825 attrInfo = new CustomPropertyInfo(
826 CustomPropertyName.PieDrawingStyle,
827 typeof(PieDrawingStyle),
829 SR.DescriptionCustomAttributePieDrawingStyle,
833 attrInfo.AppliesTo3D = false;
834 registeredCustomProperties.Add( attrInfo );
837 // "CollectedThreshold" attribute of the Pie chart
838 attrInfo = new CustomPropertyInfo(
839 CustomPropertyName.CollectedThreshold,
842 SR.DescriptionCustomAttributeCollectedThreshold,
846 attrInfo.MinValue = 0.0;
847 attrInfo.MaxValue = double.MaxValue;
848 registeredCustomProperties.Add( attrInfo );
850 // "CollectedThresholdUsePercent" attribute of the Pie chart
851 attrInfo = new CustomPropertyInfo(
852 CustomPropertyName.CollectedThresholdUsePercent,
855 SR.DescriptionCustomAttributeCollectedThresholdUsePercent,
859 registeredCustomProperties.Add( attrInfo );
861 // "CollectedSliceExploded" attribute of the Pie chart
862 attrInfo = new CustomPropertyInfo(
863 CustomPropertyName.CollectedSliceExploded,
866 SR.DescriptionCustomAttributeCollectedSliceExploded,
870 registeredCustomProperties.Add( attrInfo );
872 // "CollectedLabel" attribute of the Pie chart
873 attrInfo = new CustomPropertyInfo(
874 CustomPropertyName.CollectedLabel,
877 SR.DescriptionCustomAttributeCollectedLabel,
881 registeredCustomProperties.Add( attrInfo );
883 // "CollectedLegendText" attribute of the Pie chart
884 attrInfo = new CustomPropertyInfo(
885 CustomPropertyName.CollectedLegendText,
887 SR.DescriptionCustomAttributeCollectedLegendDefaultText,
888 SR.DescriptionCustomAttributeCollectedLegendText,
892 registeredCustomProperties.Add( attrInfo );
894 // "CollectedToolTip" attribute of the Pie chart
895 attrInfo = new CustomPropertyInfo(
896 CustomPropertyName.CollectedToolTip,
899 SR.DescriptionCustomAttributeCollectedToolTip,
903 registeredCustomProperties.Add( attrInfo );
905 // "CollectedColor" attribute of the Pie chart
906 attrInfo = new CustomPropertyInfo(
907 CustomPropertyName.CollectedColor,
910 SR.DescriptionCustomAttributeCollectedColor,
914 registeredCustomProperties.Add( attrInfo );
917 // "PieStartAngle" attribute of the Pie chart
918 attrInfo = new CustomPropertyInfo(
919 CustomPropertyName.PieStartAngle,
922 SR.DescriptionCustomAttributePieStartAngle,
926 attrInfo.MinValue = 0;
927 attrInfo.MaxValue = 360;
928 registeredCustomProperties.Add( attrInfo );
933 // "Exploded" attribute of the Pie chart
934 registeredCustomProperties.Add( new CustomPropertyInfo(
935 CustomPropertyName.Exploded,
938 SR.DescriptionCustomAttributePieDonutExploded,
943 // "LabelsRadialLineSize" attribute of the Pie chart
944 attrInfo = new CustomPropertyInfo(
945 CustomPropertyName.LabelsRadialLineSize,
948 SR.DescriptionCustomAttributeLabelsRadialLineSize,
952 attrInfo.AppliesTo3D = false;
953 attrInfo.MinValue = 0f;
954 attrInfo.MaxValue = 100f;
955 registeredCustomProperties.Add( attrInfo );
957 // "LabelsHorizontalLineSize" attribute of the Pie chart
958 attrInfo = new CustomPropertyInfo(
959 CustomPropertyName.LabelsHorizontalLineSize,
962 SR.DescriptionCustomAttributeLabelsHorizontalLineSize,
966 attrInfo.AppliesTo3D = false;
967 attrInfo.MinValue = 0f;
968 attrInfo.MaxValue = 100f;
969 registeredCustomProperties.Add( attrInfo );
972 // "PieLabelStyle" attribute of the Pie chart
973 registeredCustomProperties.Add( new CustomPropertyInfo(
974 CustomPropertyName.PieLabelStyle,
975 typeof(PieLabelStyle),
977 SR.DescriptionCustomAttributePieLabelStyle,
983 // "MinimumRelativePieSize" attribute of the Pie chart
984 attrInfo = new CustomPropertyInfo(
985 CustomPropertyName.MinimumRelativePieSize,
988 SR.DescriptionCustomAttributeMinimumRelativePieSize,
992 attrInfo.MinValue = 10f;
993 attrInfo.MaxValue = 70f;
994 registeredCustomProperties.Add( attrInfo );
996 // "3DLabelLineSize" attribute of the Pie chart
997 attrInfo = new CustomPropertyInfo(
998 CustomPropertyName._3DLabelLineSize,
1001 SR.DescriptionCustomAttribute_3DLabelLineSize,
1005 attrInfo.AppliesTo2D = false;
1006 attrInfo.MinValue = 30f;
1007 attrInfo.MaxValue = 200f;
1008 registeredCustomProperties.Add( attrInfo );
1010 // "PieLineColor" attribute of the Pie chart
1011 attrInfo = new CustomPropertyInfo(
1012 CustomPropertyName.PieLineColor,
1015 SR.DescriptionCustomAttributePieLineColor,
1019 registeredCustomProperties.Add( attrInfo );
1021 //***********************************************************************
1022 //** Doughnut chart types properties
1023 //***********************************************************************
1025 // "DoughnutRadius" attribute of the Pie chart
1026 attrInfo = new CustomPropertyInfo(
1027 CustomPropertyName.DoughnutRadius,
1030 SR.DescriptionCustomAttributeDoughnutRadius,
1031 new SeriesChartType[] { SeriesChartType.Doughnut },
1034 attrInfo.MinValue = 0f;
1035 attrInfo.MaxValue = 99f;
1036 registeredCustomProperties.Add( attrInfo );
1039 //***********************************************************************
1041 //***********************************************************************
1043 // "LabelStyle" attribute
1044 chartTypes = new SeriesChartType[] {
1045 SeriesChartType.Point,
1046 SeriesChartType.Column,
1047 SeriesChartType.Bubble,
1048 SeriesChartType.Line,
1049 SeriesChartType.Spline,
1050 SeriesChartType.StepLine,
1051 SeriesChartType.Area,
1052 SeriesChartType.SplineArea,
1053 SeriesChartType.Range,
1054 SeriesChartType.SplineRange,
1055 SeriesChartType.Radar,
1056 SeriesChartType.Polar,
1059 registeredCustomProperties.Add( new CustomPropertyInfo(
1060 CustomPropertyName.LabelStyle,
1061 typeof(LabelAlignments),
1063 SR.DescriptionCustomAttributeLabelStyle,
1068 // "ShowMarkerLines" attribute
1069 chartTypes = new SeriesChartType[] {
1070 SeriesChartType.Line,
1071 SeriesChartType.Spline,
1072 SeriesChartType.StepLine,
1073 SeriesChartType.Area,
1074 SeriesChartType.SplineArea,
1075 SeriesChartType.Range,
1076 SeriesChartType.SplineRange
1078 attrInfo = new CustomPropertyInfo(
1079 CustomPropertyName.ShowMarkerLines,
1082 SR.DescriptionCustomAttributeShowMarkerLines,
1086 attrInfo.AppliesTo2D = false;
1087 registeredCustomProperties.Add( attrInfo );
1089 // "LineTension" attribute
1090 chartTypes = new SeriesChartType[] {
1091 SeriesChartType.Spline,
1092 SeriesChartType.SplineArea,
1093 SeriesChartType.SplineRange
1095 attrInfo = new CustomPropertyInfo(
1096 CustomPropertyName.LineTension,
1099 SR.DescriptionCustomAttributeLineTension,
1103 attrInfo.MinValue = 0f;
1104 attrInfo.MaxValue = 2f;
1105 registeredCustomProperties.Add( attrInfo );
1107 // "PixelPointDepth" attribute
1108 chartTypes = new SeriesChartType[] {
1109 SeriesChartType.Area,
1110 SeriesChartType.Bar,
1111 SeriesChartType.Bubble,
1112 SeriesChartType.Candlestick,
1113 SeriesChartType.Column,
1114 SeriesChartType.Line,
1115 SeriesChartType.Point,
1116 SeriesChartType.Spline,
1117 SeriesChartType.SplineArea,
1118 SeriesChartType.StackedArea,
1119 SeriesChartType.StackedArea100,
1120 SeriesChartType.StackedBar,
1121 SeriesChartType.StackedBar100,
1122 SeriesChartType.StackedColumn,
1123 SeriesChartType.StackedColumn100,
1124 SeriesChartType.StepLine,
1125 SeriesChartType.Stock,
1127 SeriesChartType.ThreeLineBreak,
1128 SeriesChartType.BoxPlot,
1129 SeriesChartType.ErrorBar,
1130 SeriesChartType.RangeBar,
1131 SeriesChartType.Kagi,
1132 SeriesChartType.PointAndFigure,
1133 SeriesChartType.Range,
1134 SeriesChartType.RangeColumn,
1135 SeriesChartType.Renko,
1136 SeriesChartType.SplineRange,
1137 SeriesChartType.FastLine,
1139 attrInfo = new CustomPropertyInfo(
1140 CustomPropertyName.PixelPointDepth,
1143 SR.DescriptionCustomAttributePixelPointDepth,
1147 attrInfo.MinValue = 0;
1148 attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
1149 attrInfo.AppliesTo2D = false;
1150 registeredCustomProperties.Add( attrInfo );
1152 // "PixelPointGapDepth" attribute
1153 attrInfo = new CustomPropertyInfo(
1154 CustomPropertyName.PixelPointGapDepth,
1157 SR.DescriptionCustomAttributePixelPointGapDepth,
1161 attrInfo.MinValue = 0;
1162 attrInfo.MaxValue = CustomPropertyRegistry.MaxValueOfPixelAttribute;
1163 attrInfo.AppliesTo2D = false;
1164 registeredCustomProperties.Add( attrInfo );
1168 //***********************************************************************
1169 //** FastLine chart type properties
1170 //***********************************************************************
1171 chartTypes = new SeriesChartType[] {
1172 SeriesChartType.FastLine,
1173 SeriesChartType.FastPoint,
1176 /* NOTE: This is an internal attribute
1178 // "PermittedPixelError" attribute
1179 attrInfo = new CustomPropertyInfo(
1180 CustomPropertyName.PixelPointGapDepth,
1183 "Gets or sets the acceptable error in pixels for the data point filtering algorithm.",
1187 attrInfo.MinValue = 0f;
1188 attrInfo.MaxValue = 1f;
1189 registeredCustomProperties.Add( attrInfo );
1191 //***********************************************************************
1192 //** Polar chart type properties
1193 //***********************************************************************
1194 chartTypes = new SeriesChartType[] {
1195 SeriesChartType.Polar
1197 // "AreaDrawingStyle" attribute
1198 attrInfo = new CustomPropertyInfo(
1199 CustomPropertyName.AreaDrawingStyle,
1200 typeof(CircularAreaDrawingStyles),
1202 SR.DescriptionCustomAttributePolarAreaDrawingStyle,
1206 registeredCustomProperties.Add( attrInfo );
1208 // "CircularLabelsStyle" attribute
1209 attrInfo = new CustomPropertyInfo(
1210 CustomPropertyName.CircularLabelsStyle,
1211 typeof(CircularAxisLabelsStyle),
1213 SR.DescriptionCustomAttributePolarCircularLabelsStyle,
1217 registeredCustomProperties.Add( attrInfo );
1219 // "PolarDrawingStyle" attribute
1220 attrInfo = new CustomPropertyInfo(
1221 CustomPropertyName.PolarDrawingStyle,
1222 typeof(PolarDrawingStyles),
1224 SR.DescriptionCustomAttributePolarDrawingStyle,
1228 registeredCustomProperties.Add( attrInfo );
1232 //***********************************************************************
1233 //** Radar chart type properties
1234 //***********************************************************************
1235 chartTypes = new SeriesChartType[] {
1236 SeriesChartType.Radar
1238 // "AreaDrawingStyle" attribute
1239 attrInfo = new CustomPropertyInfo(
1240 CustomPropertyName.AreaDrawingStyle,
1241 typeof(CircularAreaDrawingStyles),
1243 SR.DescriptionCustomAttributeRadarAreaDrawingStyle,
1247 registeredCustomProperties.Add( attrInfo );
1249 // "CircularLabelsStyle" attribute
1250 attrInfo = new CustomPropertyInfo(
1251 CustomPropertyName.CircularLabelsStyle,
1252 typeof(CircularAxisLabelsStyle),
1254 SR.DescriptionCustomAttributeRadarCircularLabelsStyle,
1258 registeredCustomProperties.Add( attrInfo );
1260 // "RadarDrawingStyle" attribute
1261 attrInfo = new CustomPropertyInfo(
1262 CustomPropertyName.RadarDrawingStyle,
1263 typeof(RadarDrawingStyle),
1265 SR.DescriptionCustomAttributeRadarDrawingStyle,
1269 registeredCustomProperties.Add( attrInfo );
1272 //***********************************************************************
1273 //** BoxPlot chart type properties
1274 //***********************************************************************
1275 chartTypes = new SeriesChartType[] {
1276 SeriesChartType.BoxPlot
1278 // "BoxPlotPercentile" attribute
1279 attrInfo = new CustomPropertyInfo(
1280 CustomPropertyName.BoxPlotPercentile,
1283 SR.DescriptionCustomAttributeBoxPlotPercentile,
1287 attrInfo.MinValue = 0f;
1288 attrInfo.MaxValue = 1000f;
1289 registeredCustomProperties.Add( attrInfo );
1291 // "BoxPlotWhiskerPercentile" attribute
1292 attrInfo = new CustomPropertyInfo(
1293 CustomPropertyName.BoxPlotWhiskerPercentile,
1296 SR.DescriptionCustomAttributeBoxPlotWhiskerPercentile,
1300 attrInfo.MinValue = 0f;
1301 attrInfo.MaxValue = 1000f;
1302 registeredCustomProperties.Add( attrInfo );
1304 // "BoxPlotShowAverage" attribute
1305 attrInfo = new CustomPropertyInfo(
1306 CustomPropertyName.BoxPlotShowAverage,
1309 SR.DescriptionCustomAttributeBoxPlotShowAverage,
1313 registeredCustomProperties.Add( attrInfo );
1315 // "BoxPlotShowMedian" attribute
1316 attrInfo = new CustomPropertyInfo(
1317 CustomPropertyName.BoxPlotShowMedian,
1320 SR.DescriptionCustomAttributeBoxPlotShowMedian,
1324 registeredCustomProperties.Add( attrInfo );
1326 // "BoxPlotShowUnusualValues" attribute
1327 attrInfo = new CustomPropertyInfo(
1328 CustomPropertyName.BoxPlotShowUnusualValues,
1331 SR.DescriptionCustomAttributeBoxPlotShowUnusualValues,
1335 registeredCustomProperties.Add( attrInfo );
1337 // "BoxPlotSeries" attribute
1338 attrInfo = new CustomPropertyInfo(
1339 CustomPropertyName.BoxPlotSeries,
1342 SR.DescriptionCustomAttributeBoxPlotSeries,
1346 registeredCustomProperties.Add( attrInfo );
1348 //***********************************************************************
1349 //** ErrorBar chart type properties
1350 //***********************************************************************
1351 chartTypes = new SeriesChartType[] {
1352 SeriesChartType.ErrorBar
1354 // "ErrorBarStyle" attribute
1355 attrInfo = new CustomPropertyInfo(
1356 CustomPropertyName.ErrorBarStyle,
1357 typeof(ErrorBarStyle),
1359 SR.DescriptionCustomAttributeErrorBarStyle,
1363 registeredCustomProperties.Add( attrInfo );
1365 // "ErrorBarCenterMarkerStyle" attribute
1366 attrInfo = new CustomPropertyInfo(
1367 CustomPropertyName.ErrorBarCenterMarkerStyle,
1368 typeof(ErrorBarMarkerStyles),
1370 SR.DescriptionCustomAttributeErrorBarCenterMarkerStyle,
1374 registeredCustomProperties.Add( attrInfo );
1376 // "ErrorBarSeries" attribute
1377 attrInfo = new CustomPropertyInfo(
1378 CustomPropertyName.ErrorBarSeries,
1381 SR.DescriptionCustomAttributeErrorBarSeries,
1385 registeredCustomProperties.Add( attrInfo );
1387 // "ErrorBarType" attribute
1388 attrInfo = new CustomPropertyInfo(
1389 CustomPropertyName.ErrorBarType,
1391 String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}({1:N0})", ErrorBarType.StandardError, ErrorBarChart.DefaultErrorBarTypeValue(ErrorBarType.StandardError)),
1392 SR.DescriptionCustomAttributeErrorBarType,
1396 registeredCustomProperties.Add( attrInfo );
1399 //***********************************************************************
1400 //** PointAndFigure chart types properties
1401 //***********************************************************************
1402 chartTypes = new SeriesChartType[] { SeriesChartType.PointAndFigure };
1404 // "UsedYValueHigh" attribute
1405 attrInfo = new CustomPropertyInfo(
1406 CustomPropertyName.UsedYValueHigh,
1409 SR.DescriptionCustomAttributeUsedYValueHigh,
1413 attrInfo.MinValue = 0;
1414 attrInfo.MaxValue = 20;
1415 registeredCustomProperties.Add( attrInfo );
1417 // "UsedYValueLow" attribute
1418 attrInfo = new CustomPropertyInfo(
1419 CustomPropertyName.UsedYValueLow,
1422 SR.DescriptionCustomAttributeUsedYValueLow,
1426 attrInfo.MinValue = 0;
1427 attrInfo.MaxValue = 20;
1428 registeredCustomProperties.Add( attrInfo );
1430 // "PriceUpColor" attribute
1431 attrInfo = new CustomPropertyInfo(
1432 CustomPropertyName.PriceUpColor,
1435 SR.DescriptionCustomAttributeBarsPriceUpColor,
1439 registeredCustomProperties.Add( attrInfo );
1441 // "BoxSize" attribute
1442 attrInfo = new CustomPropertyInfo(
1443 CustomPropertyName.BoxSize,
1446 SR.DescriptionCustomAttributePointFigureBoxSize,
1450 registeredCustomProperties.Add( attrInfo );
1452 // "ProportionalSymbols" attribute
1453 attrInfo = new CustomPropertyInfo(
1454 CustomPropertyName.ProportionalSymbols,
1457 SR.DescriptionCustomAttributeProportionalSymbols,
1461 registeredCustomProperties.Add( attrInfo );
1463 // "ReversalAmount" attribute
1464 attrInfo = new CustomPropertyInfo(
1465 CustomPropertyName.ReversalAmount,
1468 SR.DescriptionCustomAttributeReversalAmount,
1472 registeredCustomProperties.Add( attrInfo );
1474 //***********************************************************************
1475 //** Kagi chart types properties
1476 //***********************************************************************
1477 chartTypes = new SeriesChartType[] { SeriesChartType.Kagi };
1479 // "UsedYValue" attribute
1480 attrInfo = new CustomPropertyInfo(
1481 CustomPropertyName.UsedYValue,
1484 SR.DescriptionCustomAttributeUsedYValue,
1488 attrInfo.MinValue = 0;
1489 attrInfo.MaxValue = 20;
1490 registeredCustomProperties.Add( attrInfo );
1492 // "PriceUpColor" attribute
1493 attrInfo = new CustomPropertyInfo(
1494 CustomPropertyName.PriceUpColor,
1497 SR.DescriptionCustomAttributeBarsPriceUpColor,
1501 registeredCustomProperties.Add( attrInfo );
1503 // "ReversalAmount" attribute
1504 attrInfo = new CustomPropertyInfo(
1505 CustomPropertyName.ReversalAmount,
1508 SR.DescriptionCustomAttributeKagiReversalAmount,
1512 registeredCustomProperties.Add( attrInfo );
1514 //***********************************************************************
1515 //** Renko chart types properties
1516 //***********************************************************************
1517 chartTypes = new SeriesChartType[] { SeriesChartType.Renko };
1519 // "UsedYValue" attribute
1520 attrInfo = new CustomPropertyInfo(
1521 CustomPropertyName.UsedYValue,
1524 SR.DescriptionCustomAttributeRenkoUsedYValue,
1528 attrInfo.MinValue = 0;
1529 attrInfo.MaxValue = 20;
1530 registeredCustomProperties.Add( attrInfo );
1532 // "PriceUpColor" attribute
1533 attrInfo = new CustomPropertyInfo(
1534 CustomPropertyName.PriceUpColor,
1537 SR.DescriptionCustomAttributeBarsPriceUpColor,
1541 registeredCustomProperties.Add( attrInfo );
1543 // "BoxSize" attribute
1544 attrInfo = new CustomPropertyInfo(
1545 CustomPropertyName.BoxSize,
1548 SR.DescriptionCustomAttributeBoxSize,
1552 registeredCustomProperties.Add( attrInfo );
1554 //***********************************************************************
1555 //** ThreeLineBreak chart types properties
1556 //***********************************************************************
1557 chartTypes = new SeriesChartType[] { SeriesChartType.ThreeLineBreak };
1559 // "UsedYValue" attribute
1560 attrInfo = new CustomPropertyInfo(
1561 CustomPropertyName.UsedYValue,
1564 SR.DescriptionCustomAttributeThreeLineBreakUsedYValue,
1568 attrInfo.MinValue = 0;
1569 attrInfo.MaxValue = 20;
1570 registeredCustomProperties.Add( attrInfo );
1572 // "PriceUpColor" attribute
1573 attrInfo = new CustomPropertyInfo(
1574 CustomPropertyName.PriceUpColor,
1577 SR.DescriptionCustomAttributeBarsPriceUpColor,
1581 registeredCustomProperties.Add( attrInfo );
1583 // "NumberOfLinesInBreak" attribute
1584 attrInfo = new CustomPropertyInfo(
1585 CustomPropertyName.NumberOfLinesInBreak,
1588 SR.DescriptionCustomAttributeNumberOfLinesInBreak,
1592 registeredCustomProperties.Add( attrInfo );
1596 //***********************************************************************
1597 //** Funnel chart types properties
1598 //***********************************************************************
1599 chartTypes = new SeriesChartType[] { SeriesChartType.Funnel };
1602 // "FunnelLabelStyle" attribute
1603 attrInfo = new CustomPropertyInfo(
1604 CustomPropertyName.FunnelLabelStyle,
1605 typeof(FunnelLabelStyle),
1607 SR.DescriptionCustomAttributeFunnelLabelStyle,
1611 registeredCustomProperties.Add( attrInfo );
1614 // "FunnelNeckWidth" attribute
1615 attrInfo = new CustomPropertyInfo(
1616 CustomPropertyName.FunnelNeckWidth,
1619 SR.DescriptionCustomAttributeFunnelNeckWidth,
1623 attrInfo.MinValue = 0f;
1624 attrInfo.MaxValue = 100f;
1625 registeredCustomProperties.Add( attrInfo );
1627 // "FunnelNeckHeight" attribute
1628 attrInfo = new CustomPropertyInfo(
1629 CustomPropertyName.FunnelNeckHeight,
1632 SR.DescriptionCustomAttributeFunnelNeckHeight,
1636 attrInfo.MinValue = 0f;
1637 attrInfo.MaxValue = 100f;
1638 registeredCustomProperties.Add( attrInfo );
1640 // "FunnelMinPointHeight" attribute
1641 attrInfo = new CustomPropertyInfo(
1642 CustomPropertyName.FunnelMinPointHeight,
1645 SR.DescriptionCustomAttributeFunnelMinPointHeight,
1649 attrInfo.MinValue = 0f;
1650 attrInfo.MaxValue = 100f;
1651 registeredCustomProperties.Add( attrInfo );
1653 // "Funnel3DRotationAngle" attribute
1654 attrInfo = new CustomPropertyInfo(
1655 CustomPropertyName.Funnel3DRotationAngle,
1658 SR.DescriptionCustomAttributeFunnel3DRotationAngle,
1662 attrInfo.AppliesTo2D = false;
1663 attrInfo.MinValue = -10f;
1664 attrInfo.MaxValue = 10f;
1665 registeredCustomProperties.Add( attrInfo );
1667 // "FunnelPointGap" attribute
1668 attrInfo = new CustomPropertyInfo(
1669 CustomPropertyName.FunnelPointGap,
1672 SR.DescriptionCustomAttributeFunnelPointGap,
1676 attrInfo.MinValue = 0f;
1677 attrInfo.MaxValue = 100f;
1678 registeredCustomProperties.Add( attrInfo );
1680 // "Funnel3DDrawingStyle" attribute
1681 attrInfo = new CustomPropertyInfo(
1682 CustomPropertyName.Funnel3DDrawingStyle,
1683 typeof(Funnel3DDrawingStyle),
1685 SR.DescriptionCustomAttributeFunnel3DDrawingStyle,
1689 attrInfo.AppliesTo2D = false;
1690 registeredCustomProperties.Add( attrInfo );
1692 // "FunnelStyle" attribute
1693 attrInfo = new CustomPropertyInfo(
1694 CustomPropertyName.FunnelStyle,
1695 typeof(FunnelStyle),
1697 SR.DescriptionCustomAttributeFunnelStyle,
1701 registeredCustomProperties.Add( attrInfo );
1703 // "FunnelInsideLabelAlignment" attribute
1704 attrInfo = new CustomPropertyInfo(
1705 CustomPropertyName.FunnelInsideLabelAlignment,
1706 typeof(FunnelLabelVerticalAlignment),
1708 SR.DescriptionCustomAttributeFunnelInsideLabelAlignment,
1712 registeredCustomProperties.Add( attrInfo );
1714 // "FunnelOutsideLabelPlacement" attribute
1715 attrInfo = new CustomPropertyInfo(
1716 CustomPropertyName.FunnelOutsideLabelPlacement,
1717 typeof(FunnelLabelPlacement),
1719 SR.DescriptionCustomAttributeFunnelOutsideLabelPlacement,
1723 registeredCustomProperties.Add( attrInfo );
1725 // "CalloutLineColor" attribute
1726 attrInfo = new CustomPropertyInfo(
1727 CustomPropertyName.CalloutLineColor,
1730 SR.DescriptionCustomAttributeCalloutLineColor,
1734 registeredCustomProperties.Add( attrInfo );
1736 //***********************************************************************
1737 //** Pyramid chart types properties
1738 //***********************************************************************
1739 chartTypes = new SeriesChartType[] { SeriesChartType.Pyramid };
1742 // "PyramidLabelStyle" attribute
1743 attrInfo = new CustomPropertyInfo(
1744 CustomPropertyName.PyramidLabelStyle,
1745 typeof(FunnelLabelStyle),
1747 SR.DescriptionCustomAttributePyramidLabelStyle,
1751 registeredCustomProperties.Add( attrInfo );
1754 // "PyramidMinPointHeight" attribute
1755 attrInfo = new CustomPropertyInfo(
1756 CustomPropertyName.PyramidMinPointHeight,
1759 SR.DescriptionCustomAttributePyramidMinPointHeight,
1763 attrInfo.MinValue = 0f;
1764 attrInfo.MaxValue = 100f;
1765 registeredCustomProperties.Add( attrInfo );
1767 // "Pyramid3DRotationAngle" attribute
1768 attrInfo = new CustomPropertyInfo(
1769 CustomPropertyName.Pyramid3DRotationAngle,
1772 SR.DescriptionCustomAttributePyramid3DRotationAngle,
1776 attrInfo.AppliesTo2D = false;
1777 attrInfo.MinValue = -10f;
1778 attrInfo.MaxValue = 10f;
1779 registeredCustomProperties.Add( attrInfo );
1781 // "PyramidPointGap" attribute
1782 attrInfo = new CustomPropertyInfo(
1783 CustomPropertyName.PyramidPointGap,
1786 SR.DescriptionCustomAttributePyramidPointGap,
1790 attrInfo.MinValue = 0f;
1791 attrInfo.MaxValue = 100f;
1792 registeredCustomProperties.Add( attrInfo );
1794 // "Pyramid3DDrawingStyle" attribute
1795 attrInfo = new CustomPropertyInfo(
1796 CustomPropertyName.Pyramid3DDrawingStyle,
1797 typeof(Funnel3DDrawingStyle),
1799 SR.DescriptionCustomAttributePyramid3DDrawingStyle,
1803 attrInfo.AppliesTo2D = false;
1804 registeredCustomProperties.Add( attrInfo );
1806 // "PyramidInsideLabelAlignment" attribute
1807 attrInfo = new CustomPropertyInfo(
1808 CustomPropertyName.PyramidInsideLabelAlignment,
1809 typeof(FunnelLabelVerticalAlignment),
1811 SR.DescriptionCustomAttributePyramidInsideLabelAlignment,
1815 registeredCustomProperties.Add( attrInfo );
1817 // "PyramidOutsideLabelPlacement" attribute
1818 attrInfo = new CustomPropertyInfo(
1819 CustomPropertyName.PyramidOutsideLabelPlacement,
1820 typeof(FunnelLabelPlacement),
1822 SR.DescriptionCustomAttributePyramidOutsideLabelPlacement,
1826 registeredCustomProperties.Add( attrInfo );
1828 // "CalloutLineColor" attribute
1829 attrInfo = new CustomPropertyInfo(
1830 CustomPropertyName.CalloutLineColor,
1833 SR.DescriptionCustomAttributeCalloutLineColor,
1837 registeredCustomProperties.Add( attrInfo );
1839 // "PyramidValueType" attribute
1840 attrInfo = new CustomPropertyInfo(
1841 CustomPropertyName.PyramidValueType,
1842 typeof(PyramidValueType),
1844 SR.DescriptionCustomAttributePyramidValueType,
1848 registeredCustomProperties.Add( attrInfo );
1853 #endregion // Attributes Regestering methods
1855 #region Registry methods
1858 /// Adds custom attribute information into the registry.
1860 /// <param name="customPropertyInfo">Custom attribute information.</param>
1861 public void Register(CustomPropertyInfo customPropertyInfo)
1863 // Add custom attribute information to the hash table
1864 registeredCustomProperties.Add(customPropertyInfo);
1871 /// CustomPropertyInfo class stores information about single
1872 /// custom attribute. It includes Name, Description, Default
1873 /// Value, any restrictions and the conditions when it can
1876 /// Most of the custom attribute can only be used when specific
1877 /// chart type is selected. Some of the properties only work
1878 /// in 2D or 3D mode and some can be applied to the whole
1879 /// series or data points only.
1881 internal class CustomPropertyInfo
1883 #region Public Fields
1888 public string Name = String.Empty;
1891 /// Attribute value type.
1893 public Type ValueType = typeof(int);
1896 /// Attribute default value.
1898 public object DefaultValue = null;
1901 /// Attribute description.
1903 public string Description = String.Empty;
1906 /// Array of chart type supported by the attribute
1908 public SeriesChartType[] AppliesToChartType = null;
1911 /// Indicates that attribute can be applied on series.
1913 public bool AppliesToSeries = true;
1916 /// Indicates that attribute can be applied on data point.
1918 public bool AppliesToDataPoint = true;
1921 /// Indicates that attribute can be applied on 3D chart type.
1923 public bool AppliesTo3D = true;
1926 /// Indicates that attribute can be applied on 2D chart type.
1928 public bool AppliesTo2D = true;
1931 /// Attribute minimum value.
1933 public object MinValue = null;
1936 /// Attribute maximum value.
1938 public object MaxValue = null;
1940 #endregion // Public Fields
1945 /// Public constructor.
1947 /// <param name="name">Attribute name</param>
1948 /// <param name="valueType">Attribute value type.</param>
1949 /// <param name="defaultValue">Attribute default value.</param>
1950 /// <param name="description">Attribute description.</param>
1951 /// <param name="appliesToChartType">Array of chart types where attribute used.</param>
1952 /// <param name="appliesToSeries">True if properties can be set in series.</param>
1953 /// <param name="appliesToDataPoint">True if properties can be set in data point.</param>
1954 public CustomPropertyInfo(
1957 object defaultValue,
1959 SeriesChartType[] appliesToChartType,
1960 bool appliesToSeries,
1961 bool appliesToDataPoint)
1964 this.ValueType = valueType;
1965 this.DefaultValue = defaultValue;
1966 this.Description = description;
1967 this.AppliesToChartType = appliesToChartType;
1968 this.AppliesToSeries = appliesToSeries;
1969 this.AppliesToDataPoint = appliesToDataPoint;
1972 #endregion // Constructor