Class ChartPanel
- Namespace
- StockSharp.Xaml.Charting
- Assembly
- StockSharp.Xaml.Charting.dll
The extended graphical component for candle charts displaying.
public class ChartPanel : UserControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IChart, IChartBuilder, IThemeableChart, IPersistable, INotifyPropertyChangedEx, INotifyPropertyChanged, IComponentConnector, IStyleConnector
- Inheritance
-
ChartPanel
- Implements
-
IPersistableINotifyPropertyChangedEx
- Inherited Members
- Extension Methods
Constructors
ChartPanel()
Initializes a new instance of the ChartPanel.
public ChartPanel()
Fields
AddAreaCommand
The command to add the area to the chart.
public static readonly RoutedCommand AddAreaCommand
Field Value
AddCandlesCommand
The command to add candles to the chart.
public static readonly RoutedCommand AddCandlesCommand
Field Value
AddIndicatorCommand
The command to add the indicator to the chart.
public static readonly RoutedCommand AddIndicatorCommand
Field Value
PatternCommand
The command for the pattern creation.
public static readonly RoutedCommand PatternCommand
Field Value
RegisterOrderCommand
The command for the order registration.
public static readonly RoutedCommand RegisterOrderCommand
Field Value
ShareCommand
The command for share chart as an image.
public static readonly RoutedCommand ShareCommand
Field Value
Properties
AllowAddArea
Allow user to add new chart area.
public bool AllowAddArea { get; set; }
Property Value
AllowAddAxis
Allow user to add new chart axis.
public bool AllowAddAxis { get; set; }
Property Value
AllowAddCandles
Allow user to add new candles elements.
public bool AllowAddCandles { get; set; }
Property Value
AllowAddIndicators
Allow user to add new indicator elements.
public bool AllowAddIndicators { get; set; }
Property Value
AllowAddOrders
Allow user to add new orders elements.
public bool AllowAddOrders { get; set; }
Property Value
AllowAddOwnTrades
Allow user to add new own trades elements.
public bool AllowAddOwnTrades { get; set; }
Property Value
Areas
Chart areas.
public IEnumerable<IChartArea> Areas { get; }
Property Value
ChartTheme
The name of the graphic theme.
public string ChartTheme { get; set; }
Property Value
CrossHair
Crosshair.
public bool CrossHair { get; set; }
Property Value
CrossHairAxisLabels
To show values on the axis for the crosshair.
public bool CrossHairAxisLabels { get; set; }
Property Value
CrossHairTooltip
To show the prompt message for the crosshair.
public bool CrossHairTooltip { get; set; }
Property Value
DisableIndicatorReset
Disable tracking indicator reset.
public bool DisableIndicatorReset { get; set; }
Property Value
IndicatorTypes
The list of available indicators types.
public IList<IndicatorType> IndicatorTypes { get; }
Property Value
IsAutoRange
To use automatic range for the X-axis. The default is off.
public bool IsAutoRange { get; set; }
Property Value
IsAutoScroll
To scroll Areas areas automatically when new data occurred. The default is enabled.
public bool IsAutoScroll { get; set; }
Property Value
IsInteracted
The interactive mode. The default is off.
public bool IsInteracted { get; set; }
Property Value
MinimumRange
The minimum number of visible candles.
public int MinimumRange { get; set; }
Property Value
OrderCreationMode
The order creation mode. The default is off.
public bool OrderCreationMode { get; set; }
Property Value
OrderSettings
Chart order registering settings.
public ChartPanelOrderSettings OrderSettings { get; }
Property Value
SecurityProvider
The provider of information about instruments.
public ISecurityProvider SecurityProvider { get; set; }
Property Value
ShareSettings
Chart share (upload image to web) settings.
public ChartPanelShareSettings ShareSettings { get; }
Property Value
ShowLegend
To show the legend.
public bool ShowLegend { get; set; }
Property Value
ShowNonFormedIndicators
Show non formed indicators values.
public bool ShowNonFormedIndicators { get; set; }
Property Value
ShowOverview
To show the preview area.
public bool ShowOverview { get; set; }
Property Value
ShowPerfStats
Show FPS.
public bool ShowPerfStats { get; set; }
Property Value
TimeFrames
Available time-frames.
public ICollection<TimeSpan> TimeFrames { get; }
Property Value
TimeZone
Local time zone for all DateTimeOffset values conversion.
public TimeZoneInfo TimeZone { get; set; }
Property Value
Methods
AddArea(IChartArea)
To add an area to the chart.
public void AddArea(IChartArea area)
Parameters
area
IChartAreaChart area.
AddElement(IChartArea, IChartCandleElement, CandleSeries)
To add an element to the chart.
public void AddElement(IChartArea area, IChartCandleElement element, CandleSeries candleSeries)
Parameters
area
IChartAreaChart area.
element
IChartCandleElementThe chart element.
candleSeries
CandleSeriesCandles series.
AddElement(IChartArea, IChartElement)
To add an element to the chart.
public void AddElement(IChartArea area, IChartElement element)
Parameters
area
IChartAreaChart area.
element
IChartElementThe chart element.
AddElement(IChartArea, IChartIndicatorElement, CandleSeries, IIndicator)
To add an element to the chart.
public void AddElement(IChartArea area, IChartIndicatorElement element, CandleSeries candleSeries, IIndicator indicator)
Parameters
area
IChartAreaChart area.
element
IChartIndicatorElementThe chart element.
candleSeries
CandleSeriesCandles series.
indicator
IIndicatorIndicator.
CancelOrders(Func<Order, bool>)
Cancel orders that were added to this instance of ChartPanel. This method does not cancel orders by itself. It just notifies subscribers with CancelOrder event.
public void CancelOrders(Func<Order, bool> predicate = null)
Parameters
CreateActiveOrdersElement()
Create IChartActiveOrdersElement instance.
public IChartActiveOrdersElement CreateActiveOrdersElement()
Returns
CreateAnnotation()
Create IChartAnnotation instance.
public IChartAnnotation CreateAnnotation()
Returns
- IChartAnnotation
IChartAnnotation instance.
CreateArea()
Create IChartArea instance.
public IChartArea CreateArea()
Returns
- IChartArea
IChartArea instance.
CreateAxis()
Create IChartAxis instance.
public IChartAxis CreateAxis()
Returns
- IChartAxis
IChartAxis instance.
CreateBandElement()
Create IChartBandElement instance.
public IChartBandElement CreateBandElement()
Returns
- IChartBandElement
IChartBandElement instance.
CreateBubbleElement()
Create IChartLineElement instance.
public IChartLineElement CreateBubbleElement()
Returns
- IChartLineElement
IChartLineElement instance.
CreateCandleElement()
Create IChartCandleElement instance.
public IChartCandleElement CreateCandleElement()
Returns
- IChartCandleElement
IChartCandleElement instance.
CreateData()
Create IChartDrawData instance.
public IChartDrawData CreateData()
Returns
- IChartDrawData
IChartDrawData instance.
CreateIndicatorElement()
Create IChartIndicatorElement instance.
public IChartIndicatorElement CreateIndicatorElement()
Returns
- IChartIndicatorElement
IChartIndicatorElement instance.
CreateLineElement()
Create IChartLineElement instance.
public IChartLineElement CreateLineElement()
Returns
- IChartLineElement
IChartLineElement instance.
CreateOrderElement()
Create IChartOrderElement instance.
public IChartOrderElement CreateOrderElement()
Returns
- IChartOrderElement
IChartOrderElement instance.
CreateTradeElement()
Create IChartTradeElement instance.
public IChartTradeElement CreateTradeElement()
Returns
- IChartTradeElement
IChartTradeElement instance.
Draw(IChartDrawData)
To process the new data.
public void Draw(IChartDrawData data)
Parameters
data
IChartDrawDataNew data.
GetSource(IChartElement)
To get the data source for IChartElement.
public object GetSource(IChartElement element)
Parameters
element
IChartElementThe chart element.
Returns
- object
Market-data source.
InitializeComponent()
InitializeComponent
public void InitializeComponent()
Load(SettingsStorage)
Load settings.
public void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
ReSubscribeElements()
To re-subscribe to getting data for all elements.
public void ReSubscribeElements()
RegisterCandleStyle(string, Func<string>, ChartCandleDrawStyles)
Register candle style.
public static void RegisterCandleStyle(string image, Func<string> getName, ChartCandleDrawStyles style)
Parameters
image
stringImage.
getName
Func<string>Name.
style
ChartCandleDrawStylesStyle of candles rendering.
RemoveArea(IChartArea)
To remove the area from the chart.
public void RemoveArea(IChartArea area)
Parameters
area
IChartAreaChart area.
RemoveElement(IChartArea, IChartElement)
To remove the element from the chart.
public void RemoveElement(IChartArea area, IChartElement element)
Parameters
area
IChartAreaChart area.
element
IChartElementThe chart element.
Reset(IEnumerable<IChartElement>)
To reset the chart elements values drawn previously.
public void Reset(IEnumerable<IChartElement> elements)
Parameters
elements
IEnumerable<IChartElement>Chart elements.
Save(SettingsStorage)
Save settings.
public void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
SetSource(IChartElement, object)
To set the source for the element.
public void SetSource(IChartElement element, object source)
Parameters
element
IChartElementThe chart element.
source
objectSource.
Events
AnnotationCreated
Annotation created event.
public event Action<IChartAnnotation> AnnotationCreated
Event Type
AnnotationDeleted
Annotation deleted event.
public event Action<IChartAnnotation> AnnotationDeleted
Event Type
AnnotationModified
Annotation modified event.
public event Action<IChartAnnotation, ChartDrawData.AnnotationData> AnnotationModified
Event Type
AnnotationSelected
Annotation selection event.
public event Action<IChartAnnotation, ChartDrawData.AnnotationData> AnnotationSelected
Event Type
AreaAdded
Areas added event.
public event Action<IChartArea> AreaAdded
Event Type
AreaRemoved
Areas removed event.
public event Action<IChartArea> AreaRemoved
Event Type
CancelOrder
The event of the order cancellation.
public event Action<Order> CancelOrder
Event Type
MoveOrder
The event of the order re-registration.
public event Action<Order, decimal> MoveOrder
Event Type
RegisterOrder
The event of the order registration.
public event Action<IChartArea, Order> RegisterOrder
Event Type
SettingsChanged
The chart settings change event.
public event Action SettingsChanged
Event Type
SubscribeCandleElement
The event of the subscription to getting data for the element.
public event Action<IChartCandleElement, CandleSeries> SubscribeCandleElement
Event Type
SubscribeIndicatorElement
The event of the subscription to getting data for the element.
public event Action<IChartIndicatorElement, CandleSeries, IIndicator> SubscribeIndicatorElement
Event Type
SubscribeOrderElement
The event of the subscription to getting data for the element.
public event Action<IChartOrderElement, Security> SubscribeOrderElement
Event Type
SubscribeTradeElement
The event of the subscription to getting data for the element.
public event Action<IChartTradeElement, Security> SubscribeTradeElement
Event Type
UnSubscribeElement
The event of the unsubscribe from getting data for the element.
public event Action<IChartElement> UnSubscribeElement