Ejemplo n.º 1
1
 public void SaveStyle(string styleName, CustomChart chart, DiagramTypeEnum type)
 {
     if (styles.ContainsKey(styleName))
         styles[styleName].ApplyFrom(chart);
     else
     {
         styles.Add(styleName, new StyleInfo(chart) { Name = styleName, Type=type });
     }
 }
Ejemplo n.º 2
0
        /// <summary>возвращает котрол в исходное положение(без данных) </summary>
        public void ReInitChart(List<ValueRange> valueRange,
            DiagramTypeEnum diagramType, SubDiagramTypeEnum subDiagramType, bool allowUserInteraction,
            bool clearState, bool subDiagramMode)
        {
            _subDiagramMode = subDiagramMode;
            _diagramType = diagramType;
            _subDiagramType = subDiagramType;
            _valueRange = valueRange;
            _allowUserInteraction = allowUserInteraction;

            base.SeriesCollection.Clear();
            base.Mapping.MapLayerCollection.Clear();

            if (clearState)
            {
                base.ExtraChartAreas.Clear();
                base.XAxis.Markers.Clear();
                base.YAxis.Markers.Clear();
                base.SmartPalette.Clear();

                ClearStyle();
            }
        }