Пример #1
0
        private ChartFrame MapObject(DocumentObjectModel.Shapes.Charts.Chart domChart)
        {
            ChartFrame chartFrame = new ChartFrame();

            chartFrame.Size     = new XSize(domChart.Width.Point, domChart.Height.Point);
            chartFrame.Location = new XPoint(domChart.Left.Position.Point, domChart.Top.Position.Point);

            Chart chart = new Chart((ChartType)domChart.Type);

            if (!domChart.IsNull("XAxis"))
            {
                AxisMapper.Map(chart.XAxis, domChart.XAxis);
            }
            if (!domChart.IsNull("YAxis"))
            {
                AxisMapper.Map(chart.YAxis, domChart.YAxis);
            }

            PlotAreaMapper.Map(chart.PlotArea, domChart.PlotArea);

            SeriesCollectionMapper.Map(chart.SeriesCollection, domChart.SeriesCollection);

            LegendMapper.Map(chart, domChart);

            chart.DisplayBlanksAs = (BlankType)domChart.DisplayBlanksAs;
            chart.HasDataLabel    = domChart.HasDataLabel;
            if (!domChart.IsNull("DataLabel"))
            {
                DataLabelMapper.Map(chart.DataLabel, domChart.DataLabel);
            }

            if (!domChart.IsNull("Style"))
            {
                FontMapper.Map(chart.Font, domChart.Document, domChart.Style);
            }
            if (!domChart.IsNull("Format.Font"))
            {
                FontMapper.Map(chart.Font, domChart.Format.Font);
            }
            if (!domChart.IsNull("XValues"))
            {
                XValuesMapper.Map(chart.XValues, domChart.XValues);
            }

            chartFrame.Add(chart);
            return(chartFrame);
        }
Пример #2
0
        internal static void Map(PlotArea plotArea, MigraDoc.DocumentObjectModel.Shapes.Charts.PlotArea domPlotArea)
        {
            PlotAreaMapper mapper = new PlotAreaMapper();

            mapper.MapObject(plotArea, domPlotArea);
        }
Пример #3
0
 internal static void Map(PlotArea plotArea, DocumentObjectModel.Shapes.Charts.PlotArea domPlotArea)
 {
     PlotAreaMapper mapper = new PlotAreaMapper();
     mapper.MapObject(plotArea, domPlotArea);
 }
Пример #4
0
        public static void Map(PlotArea plotArea, DocumentObjectModel.Shapes.Charts.PlotArea domPlotArea)
        {
            PlotAreaMapper mapper = new PlotAreaMapper();

            mapper.MapObject(plotArea, domPlotArea);
        }