コード例 #1
0
ファイル: Chart.cs プロジェクト: eksotama/rdl-engine
 public Chart(XmlNode node, ReportElement parent)
     : base(node, parent)
 {
     // Make sure that default axis definitions exist.
     if (_valueAxis == null)
     {
         _valueAxis = new ValueAxis(null, this);
     }
     if (_categoryAxis == null)
     {
         _categoryAxis = new CategoryAxis(null, this);
     }
 }
コード例 #2
0
ファイル: Chart.cs プロジェクト: eksotama/rdl-engine
        protected override void ParseAttribute(XmlNode attr)
        {
            base.ParseAttribute(attr);
            switch (attr.Name.ToLower())
            {
            case "type":
                _type = (TypeEnum)Enum.Parse(typeof(TypeEnum), attr.InnerText, true);
                break;

            case "subtype":
                _subType = (SubtypeEnum)Enum.Parse(typeof(SubtypeEnum), attr.InnerText, true);
                break;

            case "seriesgroupings":
            {
                SeriesGrouping lastGrouping = null;

                foreach (XmlNode child in attr.ChildNodes)
                {
                    SeriesGrouping seriesGrouping = SeriesGrouping.GetSeriesGrouping(child, this);
                    if (_seriesGrouping == null)
                    {
                        _seriesGrouping = seriesGrouping;
                    }
                    else
                    {
                        lastGrouping.NextGrouping = seriesGrouping;
                    }
                    lastGrouping = seriesGrouping;
                }
            }
            break;

            case "categorygroupings":
            {
                CategoryGrouping lastGrouping = null;

                foreach (XmlNode child in attr.ChildNodes)
                {
                    CategoryGrouping categoryGrouping = CategoryGrouping.GetCategoryGrouping(child, this);
                    if (_categoryGrouping == null)
                    {
                        _categoryGrouping = categoryGrouping;
                    }
                    else
                    {
                        lastGrouping.NextGrouping = categoryGrouping;
                    }
                    lastGrouping = categoryGrouping;
                }
            }
            break;

            case "chartdata":
                foreach (XmlNode child in attr.ChildNodes)
                {
                    _chartData.Add(new ChartSeries(child, this));
                }
                break;

            case "legend":
                _legend = new Legend(attr, this);
                break;

            case "categoryaxis":
                _categoryAxis = new CategoryAxis(attr.FirstChild, this);
                break;

            case "valueaxis":
                _valueAxis = new ValueAxis(attr.FirstChild, this);
                break;

            case "title":
                _title = new Title(attr, this);
                break;

            case "pointwidth":
                _pointWidth = int.Parse(attr.InnerText);
                break;

            case "pallette":
                _palette = (Palette.PaletteEnum)Enum.Parse(typeof(Palette.PaletteEnum), attr.InnerText, true);
                break;

            case "threedproperties":
                _threeDProperties = new ThreeDProperties(attr, this);
                break;

            case "plotarea":
                _plotAreaStyle = new Style(attr.FirstChild, this);
                break;

            case "chartelementoutput":
                _chartElementOutput = (Enums.DataElementOutputEnum)Enum.Parse(typeof(Enums.DataElementOutputEnum), attr.InnerText, true);
                break;

            default:
                break;
            }
        }