using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using System.Windows.Forms; using Core.Common.Controls.Charting.Series; namespace Core.Common.Controls.Charting { public interface IChart { /// /// Color to use as background color for the chart /// Color BackGroundColor { get; set; } /// /// Color to use as background color surrounding the chart (control color) /// Color SurroundingBackGroundColor { get; set; } /// /// Title to display above the chart /// string Title { get; set; } Font Font { get; set; } /// /// Makes the title above the chart visible /// bool TitleVisible { get; set; } /// /// Stack all series of the same type on top of each other /// bool StackSeries { get; set; } /// /// Series that are on the chart /// IEnumerable Series { get; } /// /// Left axis of the chart /// IChartAxis LeftAxis { get; } /// /// Right axis of the chart /// IChartAxis RightAxis { get; } /// /// Bottom axis of the chart /// IChartAxis BottomAxis { get; } /// /// The drawing bounds for the chart /// Rectangle ChartBounds { get; } /// /// Legend showing the series/values of the chart /// IChartLegend Legend { get; } /// /// Graphics of the chart (for custom drawing) /// ChartGraphics Graphics { get; } /// /// Parent control containing this chart /// Control ParentControl { get; } /// /// Cancels the mouse events /// bool CancelMouseEvents { set; } /// /// The type of a series may be changed /// bool AllowSeriesTypeChange { get; set; } int GetIndexOfChartSeries(ChartSeries series); /// /// Adds the chart series to the chart. /// /// The series. /// Duplicates are prevented from being added. void AddChartSeries(ChartSeries series); /// /// Inserts the chart series. /// /// The series. /// The index. /// When is /// less than 0 or greater than the number of series within the chart. void InsertChartSeries(ChartSeries series, int index); /// /// Removes the chart series from the chart. /// /// The series. /// True if removal was successful; false otherwise bool RemoveChartSeries(ChartSeries series); /// /// Removes all chart series form the chart. /// void RemoveAllChartSeries(); /// /// Opens export dialog /// void ExportAsImage(IWin32Window owner); /// /// Exports a chart without dialog to the specified location. /// Supported types : pdf, jpg, jpeg, gif, png, tiff, bmp and eps /// /// Name of the file to write.(extension determines file type) /// Height of the exported image (optional, not used if value is null or smaller than 1) /// Width of the exported image (optional, not used if value is null or smaller than 1) /// When is null, doesn't contain an extension or /// extension is not supported void ExportAsImage(string filename, int? width, int? height); /// /// Creates a bitmap of the chart /// Bitmap Bitmap(); } }