//Convert the ChartMediaInfo to its CIM equivalent
        internal CIMChartMediaInfo CreateChartMediaInfo(ChartMediaInfo chart)
        {
            CIMChartMediaInfo mediaInfo = null;

            if (chart.ChartMediaType == ChartMediaType.Column)
            {
                mediaInfo = new CIMColumnChartMediaInfo();
            }
            else if (chart.ChartMediaType == ChartMediaType.Bar)
            {
                mediaInfo = new CIMBarChartMediaInfo();
            }
            else if (chart.ChartMediaType == ChartMediaType.Line)
            {
                mediaInfo = new CIMLineChartMediaInfo();
            }
            else
            {
                mediaInfo = new CIMPieChartMediaInfo();
            }
            mediaInfo.Title          = chart.Title;
            mediaInfo.Caption        = chart.Caption;
            mediaInfo.NormalizeField = chart.NormalizeFieldName;
            mediaInfo.Fields         = chart.FieldNames.ToArray();
            return(mediaInfo);
        }
 //Convert the ChartMediaInfo to its CIM equivalent
 internal CIMChartMediaInfo CreateChartMediaInfo(ChartMediaInfo chart) {
     CIMChartMediaInfo mediaInfo = null;
     if (chart.ChartMediaType == ChartMediaType.Column) {
         mediaInfo = new CIMColumnChartMediaInfo();
     }
     else if (chart.ChartMediaType == ChartMediaType.Bar) {
         mediaInfo = new CIMBarChartMediaInfo();
     }
     else if (chart.ChartMediaType == ChartMediaType.Line) {
         mediaInfo = new CIMLineChartMediaInfo();
     }
     else {
         mediaInfo = new CIMPieChartMediaInfo();
     }
     mediaInfo.Title = chart.Title;
     mediaInfo.Caption = chart.Caption;
     mediaInfo.NormalizeField = chart.NormalizeFieldName;
     mediaInfo.Fields = chart.FieldNames.ToArray();
     return mediaInfo;
 }