Class Chart
Represents chart control.
Inheritance
Namespace: Syncfusion.Windows.Chart
Assembly: Syncfusion.Chart.Wpf.dll
Syntax
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[Obsolete("This control is obsolete. Use new SfChart in Syncfusion.SfChart.WPF assembly instead.")]
public class Chart : Control, IDisposable, IChartSerializer
Remarks
A chart is a type of information graphic or graphic organizer that represents tabular numeric data and/or functions. Chart is often used to make it easier to understand large quantities of data and the relationship between different parts of the data. Char can usually be read more quickly than the raw data that they come from.
Certain ChartTypes are more useful for presenting a given data set than others. For example, data that presents percentages in different groups (such as "satisfied, not satisfied, unsure") are often displayed in a Pie chart, but are more easily understood when presented in a horizontal Bar chart. On the other hand, data that represents numbers that change over a period of time (such as "annual revenue from 1990 to 2000") might be best shown as a Line chart.
Examples
XAML:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Width="300" Height="300">
<!--Adding chart control to window's content-->
<syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<!--Assigning chart area-->
<syncfusion:ChartArea>
<!--Adding series to area-->
<syncfusion:ChartArea.Series>
<!--Assigning data property-->
<syncfusion:ChartSeries Data="5 5 6 6 7 7"/>
</syncfusion:ChartArea.Series>
</syncfusion:ChartArea>
</syncfusion:Chart>
</Window>
C#: public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
//Creating new chart instance.
Chart chart = new Chart();
//Adding new area.
chart.Areas.Add(new ChartArea());
//Creating chart data points.
ChartListData data = new ChartListData();
data.Add(new ChartPoint(1, 1));
data.Add(new ChartPoint(2, 2));
data.Add(new ChartPoint(3, 3));
data.Add(new ChartPoint(4, 4));
data.Add(new ChartPoint(5, 5));
////Adding new series.
chart.Areas[0].Series.Add(new ChartSeries());
////Assigning data to series.
chart.Areas[0].Series[0].Data = data;
//Assigning window's content property.
this.Content = chart;
}
}
Constructors
Chart()
Initializes a new instance of the Chart class.
Declaration
public Chart()
Fields
AlignmentProperty
Identifies the alignment dependency property.
Declaration
public static readonly DependencyProperty AlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AnnotationIntersectActionProperty
Identifies the AnnotationIntersectAction dependency property.
Declaration
public static readonly DependencyProperty AnnotationIntersectActionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AnnotationLabelTemplateProperty
Identifies the AnnotationLabelTemplate dependency property.
Declaration
public static readonly DependencyProperty AnnotationLabelTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ApplyPropertyPagesProperty
Identifies the ApplyPropertyPages dependency property.
Declaration
public static readonly DependencyProperty ApplyPropertyPagesProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AreasPanelProperty
Identifies the AreasPanel dependency property.
Declaration
public static readonly DependencyProperty AreasPanelProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AreaStyleProperty
Style for ChartArea
Declaration
public static readonly DependencyProperty AreaStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ChartVisualStyleProperty
VisualStyle for Chart
Declaration
public static readonly DependencyProperty ChartVisualStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CornerRadiusProperty
Identifies the CornerRadius dependency property.
Declaration
public static readonly DependencyProperty CornerRadiusProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
DisposeOnUnloadProperty
Property for Remove the chart from their parent
Declaration
public static readonly DependencyProperty DisposeOnUnloadProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
DockProperty
Identifies the Dock dependency property.
Declaration
public static readonly DependencyProperty DockProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
FooterAlignmentProperty
Identifies the footer alignment dependency property.
Declaration
public static readonly DependencyProperty FooterAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
FooterProperty
Identifies the footer dependency property.
Declaration
public static readonly DependencyProperty FooterProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderAlignmentProperty
Proeprty for Align the ChartHeader
Declaration
public static readonly DependencyProperty HeaderAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderProperty
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
isChartClose
Initializes isChartClose
Declaration
public bool isChartClose
Field Value
Type |
---|
System.Boolean |
LegendNameProperty
Identifies the LegendName dependency property.
Declaration
public static DependencyProperty LegendNameProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LegendStyleProperty
Identifies the LegendStyle dependency property.
Declaration
public static readonly DependencyProperty LegendStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
PropertiesDialogItemsCountProperty
Identifies the PropertyDialogItem Count dependency property.
Declaration
public static readonly DependencyProperty PropertiesDialogItemsCountProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
PropertyWindowTabsProperty
PropertyWindowTabsProperty initialization
Declaration
public static readonly DependencyProperty PropertyWindowTabsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowToolBarOnPrintAndSaveProperty
Enables or disables the Toolbar on printing and saving
Declaration
public static readonly DependencyProperty ShowToolBarOnPrintAndSaveProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ToolBarProperty
Identifies the ToolBar dependency property.
Declaration
public static readonly DependencyProperty ToolBarProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ToolBarStyleProperty
Identifies the ToolBarStyle dependency property.
Declaration
public static readonly DependencyProperty ToolBarStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AnnotationIntersectAction
Set the Visiblility of Annotation when get intersect
Declaration
public AnnotationIntersectActions AnnotationIntersectAction { get; set; }
Property Value
Type |
---|
AnnotationIntersectActions |
AnnotationLabels
Gets the ChartAnnotationLabelsCollection.
Declaration
public ChartAnnotationLabelsCollection AnnotationLabels { get; set; }
Property Value
Type | Description |
---|---|
ChartAnnotationLabelsCollection | The Labels collection. |
AnnotationLabelTemplate
Gets or sets the LabelTemplate. This is a dependency property.
Declaration
public DataTemplate AnnotationLabelTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The LabelTemplate. |
ApplyPropertyPages
Gets or sets the PropertyPages.
Declaration
public int ApplyPropertyPages { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The ApplyPropertyPages. |
Areas
Gets the collection of ChartArea.
Declaration
public ChartAreasCollection Areas { get; set; }
Property Value
Type |
---|
Syncfusion.Windows.Chart.ChartAreasCollection |
Remarks
Chart control may contain multiple areas. ChartArea is main container for ChartSeries.
By default, chart areas are added to ChartGrid. Default panel can be changed using AreasPanel property.
Examples
C#:
//Creating new chart instance.
Chart chart = new Chart();
//Creating datapoints collection.
ChartListData data = new ChartListData();
data.Add(new ChartPoint(1, 1));
data.Add(new ChartPoint(2, 2));
data.Add(new ChartPoint(3, 3));
data.Add(new ChartPoint(4, 4));
//Creating 1st series.
ChartSeries series1 = new ChartSeries();
series1.Type = ChartTypes.Pie;
series1.Data = data;
//Creating second series.
ChartSeries series2 = new ChartSeries();
series2.Type = ChartTypes.Column;
series2.Data = data;
//Creating third series.
ChartArea chartArea1 = new ChartArea();
ChartArea chartArea2 = new ChartArea();
chartArea1.Series.Add(series1);
chartArea2.Series.Add(series2);
chart.Areas.Add(chartArea1);
chart.Areas.Add(chartArea2);
XAML:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Width="300" Height="300">
<!--Adding chart control to window's content-->
<syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:Chart.Areas>
<!--Adding multiple areas to collection-->
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2 3 3 4 4 5 5 6 6" Type="Pie"/>
</syncfusion:ChartArea>
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2 3 3 4 4 5 5 6 6" Type="Column"/>
</syncfusion:ChartArea>
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2 3 3 4 4 5 5 6 6" Type="Pyramid"/>
</syncfusion:ChartArea>
</syncfusion:Chart.Areas>
</syncfusion:Chart>
</Window>
AreasPanel
Gets or sets the areas panel template. This is a dependency property.
Declaration
public ItemsPanelTemplate AreasPanel { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.ItemsPanelTemplate | The areas panel template. |
Remarks
By default, chart areas are contained in ChartGrid. Property provides ability to change areas host panel.
Examples
C#:
This property is not intended to be used from C#.
XAML:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Width="300" Height="400">
<!--Adding chart control to window's content-->
<syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:Chart.AreasPanel>
<ItemsPanelTemplate>
<DockPanel/>
</ItemsPanelTemplate>
</syncfusion:Chart.AreasPanel>
<syncfusion:Chart.Areas>
<!--Adding multiple areas to collection and setting their Dock property.-->
<syncfusion:ChartArea DockPanel.Dock="Bottom" Height="100">
<syncfusion:ChartSeries Data="1 1 2 2 3 3 4 4 5 5 6 6" Type="Pie"/>
</syncfusion:ChartArea>
<syncfusion:ChartArea DockPanel.Dock="Top" Height="100">
<syncfusion:ChartSeries Data="1 1 2 2 3 3 4 4 5 5 6 6" Type="Column"/>
</syncfusion:ChartArea>
<syncfusion:ChartArea DockPanel.Dock="Right" Height="100">
<syncfusion:ChartSeries Data="1 1 2 2 3 3 4 4 5 5 6 6" Type="Pyramid"/>
</syncfusion:ChartArea>
</syncfusion:Chart.Areas>
</syncfusion:Chart>
</Window>
AreaStyle
Gets or sets the LegendStyle value.
Declaration
public Style AreaStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The LegendStyle. |
ChartVisualStyle
Gets or sets the LegendStyle value.
Declaration
public ChartStyles ChartVisualStyle { get; set; }
Property Value
Type | Description |
---|---|
ChartStyles | The LegendStyle. |
CornerRadius
Gets or sets corner radius. This is a dependency property.
Declaration
public CornerRadius CornerRadius { get; set; }
Property Value
Type |
---|
System.Windows.CornerRadius |
Remarks
This property affects chart's border corner radius. Changing chart's default template might make this property useless.
Examples
XAML:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Width="300" Height="300">
<!--Adding chart control to window's content and setting its corner
radius-->
<syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd"
CornerRadius="10,1,6,2">
<!--Assigning chart area-->
<syncfusion:ChartArea>
<!--Adding series to area-->
<syncfusion:ChartArea.Series>
<!--Assigning data property-->
<syncfusion:ChartSeries Data="5 5 6 6 7 7"/>
</syncfusion:ChartArea.Series>
</syncfusion:ChartArea>
</syncfusion:Chart>
</Window>
C#: public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
//Creating new chart instance.
Chart chart = new Chart();
//Assigning CornerRadius property.
chart.CornerRadius = new CornerRadius(10, 1, 6, 2);
//Adding new area.
chart.Areas.Add(new ChartArea());
//Creating chart data points.
ChartListData data = new ChartListData();
data.Add(new ChartPoint(1, 1));
data.Add(new ChartPoint(2, 2));
data.Add(new ChartPoint(3, 3));
data.Add(new ChartPoint(4, 4));
data.Add(new ChartPoint(5, 5));
////Adding new series.
chart.Areas[0].Series.Add(new ChartSeries());
////Assigning data to series.
chart.Areas[0].Series[0].Data = data;
//Assigning window's content property.
this.Content = chart;
}
}
DisposeOnUnload
Gets or sets the DisposeOnUnload value.
Declaration
public bool DisposeOnUnload { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The LegendStyle. |
Footer
Gets or sets the footer.
Declaration
public object Footer { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The Footer. |
FooterAlignment
Gets or sets the footer alignment.
Declaration
public HorizontalAlignment FooterAlignment { get; set; }
Property Value
Type |
---|
System.Windows.HorizontalAlignment |
Header
Gets or sets the header.
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The header. |
HeaderAlignment
Get and Set the HeaderAlignment proeprty
Declaration
public HorizontalAlignment HeaderAlignment { get; set; }
Property Value
Type |
---|
System.Windows.HorizontalAlignment |
Legends
Gets the collection of ChartLegend.
Declaration
public ChartLegendsCollection Legends { get; set; }
Property Value
Type | Description |
---|---|
Syncfusion.Windows.Chart.ChartLegendsCollection | The legends collection. |
Remarks
Chart control has ability to display numerous legends. All legends are added to ChartDockPanel automatically.
LegendNameProperty attached property can be used to assign series to different legends. By default, ChartLegend shows all series on chart.
DockProperty attached property can be used to assign legend's position on dock panel.
Examples
Code sample demonstrates ability to display on legend required series only.
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Width="300" Height="300">
<!--Adding chart control to window's content-->
<syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<!--Assigning Legends property of chart-->
<syncfusion:Chart.Legends>
<!--Adding bottom legend with "legend1" name-->
<syncfusion:ChartLegend syncfusion:ChartDockPanel.Dock="Bottom"
syncfusion:Chart.LegendName="Legend1"/>
<!--Adding right legend with "legend2" name-->
<syncfusion:ChartLegend syncfusion:ChartDockPanel.Dock="Right"
syncfusion:Chart.LegendName="Legend2"/>
<!--Adding left legend with "legend3" name-->
<syncfusion:ChartLegend syncfusion:ChartDockPanel.Dock="Left"
syncfusion:Chart.LegendName="Legend3"/>
</syncfusion:Chart.Legends>
<!--Assigning chart area-->
<syncfusion:ChartArea>
<!--Adding series to area-->
<syncfusion:ChartArea.Series>
<!--Adding 1st series and attaching legend's name-->
<syncfusion:ChartSeries Data="5 5 6 6 7 7" Label="series1"
syncfusion:Chart.LegendName="Legend1"/>
<!--Adding 2nd series and attaching legend's name-->
<syncfusion:ChartSeries Data="2 5 3 6 4 1" Label="series2"
syncfusion:Chart.LegendName="Legend2"/>
<!--Adding 3rd series and attaching legend's name-->
<syncfusion:ChartSeries Data="5 2 6 6 7 7" Label="series3"
syncfusion:Chart.LegendName="Legend3"/>
</syncfusion:ChartArea.Series>
</syncfusion:ChartArea>
</syncfusion:Chart>
</Window>
C#: public Window1()
{
InitializeComponent();
//Creating new chart instance.
Chart chart = new Chart();
//Adding new area.
chart.Areas.Add(new ChartArea());
//Creating series1 instance.
ChartSeries series1 = new ChartSeries();
//Setting label and assigning data.
series1.Label = "series1";
series1.Data = this.gentrateRandomChartData();
//Setting legend name.
Chart.SetLegendName(series1, "Legend1");
//Creating series2 instance.
ChartSeries series2 = new ChartSeries();
//Setting label and assigning data.
series2.Label = "series2";
series2.Data = this.gentrateRandomChartData();
//Setting legend name.
Chart.SetLegendName(series2, "Legend2");
//Creating series2 instance.
ChartSeries series3 = new ChartSeries();
//Setting label and assigning data.
series3.Label = "series3";
series3.Data = this.gentrateRandomChartData();
//Setting legend name.
Chart.SetLegendName(series3, "Legend3");
//Creating legend1 instance.
ChartLegend legend1 = new ChartLegend();
//Setting LegendName property.
legend1.SetValue(Chart.LegendNameProperty, "Legend1");
//Creating legend1 instance.
ChartLegend legend2 = new ChartLegend();
//Setting LegendName property.
legend2.SetValue(Chart.LegendNameProperty, "Legend2");
//Creating legend1 instance.
ChartLegend legend3 = new ChartLegend();
//Setting LegendName property.
legend3.SetValue(Chart.LegendNameProperty, "Legend3");
//Adding created series to area.
chart.Areas[0].Series.Add(series1);
chart.Areas[0].Series.Add(series2);
chart.Areas[0].Series.Add(series3);
//Adding created legends to chart.
chart.Legends.Add(legend1);
chart.Legends.Add(legend2);
chart.Legends.Add(legend3);
//Assigning window's content property.
this.Content = chart;
}
//Generates random series' points.
ChartListData gentrateRandomChartData()
{
ChartListData returnValue = new ChartListData();
Random randomizer = new Random();
for (int i = 0; i < 10; i++)
{
returnValue.Add(new ChartPoint(i, randomizer.Next((i + 1) * 10)));
}
return returnValue;
}
See Also
LegendStyle
Gets or sets the LegendStyle value.
Declaration
public Style LegendStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The LegendStyle. |
LogicalChildren
Gets an enumerator for logical child elements of this element.
Declaration
protected override IEnumerator LogicalChildren { get; }
Property Value
Type |
---|
System.Collections.IEnumerator |
PropertyWindowTabs
Get and Set the PropertyWindowTabs proeprty
Declaration
public TabItemCollection PropertyWindowTabs { get; set; }
Property Value
Type |
---|
TabItemCollection |
ShowToolBarOnPrintAndSave
Get and set the ShowToolBarOnPrintAndSave property
Declaration
public bool ShowToolBarOnPrintAndSave { get; set; }
Property Value
Type |
---|
System.Boolean |
ToolBar
Gets or sets the Chart ToolBar
Declaration
public ChartToolBar ToolBar { get; set; }
Property Value
Type |
---|
ChartToolBar |
ToolBarStyle
Gets or sets the ToolBarStyle value.
Declaration
public Style ToolBarStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The ToolBarStyle. |
Methods
CloseToolBar()
Close the Toolbar in chart
Declaration
public void CloseToolBar()
CopyToClipboard()
Copies chart to clipboard.
Declaration
public void CopyToClipboard()
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Internal border of chart control cannot be retrieved. |
See Also
CreateBitmapEncoderByExtension(String)
Creates the new instance of the System.Windows.Media.Imaging.BitmapEncoder class by extension of file.
Declaration
public static BitmapEncoder CreateBitmapEncoderByExtension(string extension)
Parameters
Type | Name | Description |
---|---|---|
System.String | extension | The file extension. |
Returns
Type | Description |
---|---|
System.Windows.Media.Imaging.BitmapEncoder | The BitmapEncoder |
Deserialize(String)
Return the XAML code
Declaration
public object Deserialize(string xamlString)
Parameters
Type | Name | Description |
---|---|---|
System.String | xamlString |
Returns
Type |
---|
System.Object |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
GetAlignment(UIElement)
Gets the alignment.
Declaration
public static ChartAlignment GetAlignment(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | element | The element. |
Returns
Type | Description |
---|---|
ChartAlignment | Element's alignment. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
GetDock(UIElement)
Gets the dock of ChartDockPanel child.
Declaration
public static ChartDock GetDock(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | element | The element. |
Returns
Type | Description |
---|---|
ChartDock | ChartDock value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
GetLegendName(ChartSeries)
Gets the name of the legend.
Declaration
public static string GetLegendName(ChartSeries series)
Parameters
Type | Name | Description |
---|---|---|
ChartSeries | series | The series. |
Returns
Type | Description |
---|---|
System.String | Legend name. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
MeasureOverride(Size)
Called to remeasure a control.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | constraint | The maximum size that the method can return. |
Returns
Type | Description |
---|---|
System.Windows.Size | The size of the control, up to the maximum specified by |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnAreaStyleChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Method for AreaStyleChanged
Declaration
public static void OnAreaStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | d | |
System.Windows.DependencyPropertyChangedEventArgs | args |
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
System.Windows.Automation.Peers.AutomationPeer | The type-specific System.Windows.Automation.Peers.AutomationPeer implementation. |
OnKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown�attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The System.Windows.Input.KeyEventArgs that contains the event data. |
OnLegendStyleChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Method for LegendStyleChange
Declaration
public static void OnLegendStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | d | |
System.Windows.DependencyPropertyChangedEventArgs | args |
OnMouseDoubleClick(MouseButtonEventArgs)
Raises the System.Windows.Controls.Control.MouseDoubleClick routed event.
Declaration
protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The event data. |
OnMouseDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseDown�attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state. |
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Invoked whenever the effective value of any dependency property on this System.Windows.FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | The event data that describes the property that changed, as well as old and new values. |
OnPropertyWindowTabsChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Method for ProeprtyWindowTab changed
Declaration
public static void OnPropertyWindowTabsChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | d | |
System.Windows.DependencyPropertyChangedEventArgs | args |
OnPropertyWindowTabsChanged(DependencyPropertyChangedEventArgs)
Method for ProeprtyWindowTab changed
Declaration
public void OnPropertyWindowTabsChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | args |
OnToolBarStyleChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Method for ToolBarstyleChanged
Declaration
public static void OnToolBarStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | d | |
System.Windows.DependencyPropertyChangedEventArgs | args |
OnVisualStyleChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Method for VisualStyleChanged
Declaration
public static void OnVisualStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | d | |
System.Windows.DependencyPropertyChangedEventArgs | args |
Print()
Shows print dialog for a whole chart.
Declaration
public bool Print()
Returns
Type | Description |
---|---|
System.Boolean |
|
See Also
Print(Rect)
Prints chart by the specified print area.
Declaration
public bool Print(Rect printArea)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Rect | printArea | The print area. |
Returns
Type | Description |
---|---|
System.Boolean |
|
See Also
Save(Stream)
Saves chart to the specified stream.
Declaration
public void Save(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
See Also
Save(Stream, BitmapEncoder)
Saves chart to the specified stream.
Declaration
public void Save(Stream stream, BitmapEncoder encoder)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
System.Windows.Media.Imaging.BitmapEncoder | encoder | The encoder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Internal border of chart control cannot be retrieved. |
See Also
Save(Stream, Rect)
Saves chart to the specified stream.
Declaration
public void Save(Stream stream, Rect saveArea)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
System.Windows.Rect | saveArea | The area rect. |
See Also
Save(Stream, Rect, BitmapEncoder)
Saves chart to the specified stream.
Declaration
public void Save(Stream stream, Rect saveArea, BitmapEncoder encoder)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
System.Windows.Rect | saveArea | The area rect. |
System.Windows.Media.Imaging.BitmapEncoder | encoder | The encoder. |
See Also
Save(String)
Saves chart to the file with specified filename.
Declaration
public void Save(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The filename. |
See Also
Save(String, BitmapEncoder)
Saves chart to the file with specified filename using encoder.
Declaration
public void Save(string fileName, BitmapEncoder encoder)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The fileName. |
System.Windows.Media.Imaging.BitmapEncoder | encoder | The encoder. |
See Also
Save(String, Rect)
Saves chart to chart to specified file.
Declaration
public void Save(string fileName, Rect saveArea)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The fileName. |
System.Windows.Rect | saveArea | The save area. |
See Also
Save(String, Rect, BitmapEncoder)
Saves chart to specified file.
Declaration
public void Save(string fileName, Rect saveArea, BitmapEncoder encoder)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | Name of the file. |
System.Windows.Rect | saveArea | The save area. |
System.Windows.Media.Imaging.BitmapEncoder | encoder | The encoder. |
See Also
SaveToXps(Stream, Visual)
Saves to XPS format.
Declaration
public static void SaveToXps(Stream stream, Visual visual)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
System.Windows.Media.Visual | visual | The visual. |
See Also
SaveToXps(Stream, Rect)
Saves to XPS format.
Declaration
public void SaveToXps(Stream stream, Rect saveArea)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
System.Windows.Rect | saveArea | The save area. |
See Also
SaveToXps(String)
Saves to XPS format.
Declaration
public void SaveToXps(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | The filename. |
See Also
SaveToXps(String, Rect)
Saves to XPS format.
Declaration
public void SaveToXps(string filename, Rect saveArea)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | The filename. |
System.Windows.Rect | saveArea | The save area. |
See Also
Serialize()
Return String value from the Serialization method.
Declaration
public string Serialize()
Returns
Type |
---|
System.String |
SetAlignment(UIElement, ChartAlignment)
Sets the alignment.
Declaration
public static void SetAlignment(UIElement element, ChartAlignment alignment)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | element | The element. |
ChartAlignment | alignment | The alignment. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
SetDock(UIElement, ChartDock)
Sets the dock of element of ChartDockPanel.
Declaration
public static void SetDock(UIElement element, ChartDock dock)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | element | The element. |
ChartDock | dock | The dock value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
SetLegendName(ChartSeries, String)
Hides the toolbars of the chart. Action is reverted by calling
Declaration
public static void SetLegendName(ChartSeries series, string legendName)
Parameters
Type | Name | Description |
---|---|---|
ChartSeries | series | The series. |
System.String | legendName | Name of the legend. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ShowPropertyDialog()
Display Chart property dialog
Declaration
public void ShowPropertyDialog()
See Also
ShowToolBar()
Method for Showing the ToolBar
Declaration
public void ShowToolBar()
SubString(String, String, String)
Return the substring
Declaration
public static string SubString(string actual, string _from, string _to)
Parameters
Type | Name | Description |
---|---|---|
System.String | actual | |
System.String | _from | |
System.String | _to |
Returns
Type |
---|
System.String |
SwitchPrintingMode()
Switches to the printing mode.
Declaration
public void SwitchPrintingMode()
Remarks
Printing adorner is drawn on chart if this method is called.
See Also
Events
ApplyCustomTabPages
Event that is raised when CustomTab Pages Applied.
Declaration
public event RoutedEventHandler ApplyCustomTabPages
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
ChartPropertyWindowClosed
Occurs when [After window is closed].
Declaration
public event ChartPropertyWindowEventHandler ChartPropertyWindowClosed
Event Type
Type |
---|
ChartPropertyWindowEventHandler |
ChartPropertyWindowClosing
Occurs when [Before window is closed]. Event can be cancelled.
Declaration
public event ChartPropertyWindowCancelEventHandler ChartPropertyWindowClosing
Event Type
Type |
---|
ChartPropertyWindowCancelEventHandler |
ChartPropertyWindowOpened
Occurs when [After window is opened].
Declaration
public event ChartPropertyWindowEventHandler ChartPropertyWindowOpened
Event Type
Type |
---|
ChartPropertyWindowEventHandler |
ChartPropertyWindowOpening
Occurs when [Before window is opened]. Event can be cancelled.
Declaration
public event ChartPropertyWindowCancelEventHandler ChartPropertyWindowOpening
Event Type
Type |
---|
ChartPropertyWindowCancelEventHandler |
InitializeCustomTabPages
Event that is raised when CustomTab Pages Initialized.
Declaration
public event RoutedEventHandler InitializeCustomTabPages
Event Type
Type |
---|
System.Windows.RoutedEventHandler |