The Stock chart layout of RadHtmlChart is designed to visualize
financial data over time and it also offers zooming and scrolling
functionality, which is exposed by the Navigator pane, located below the main chart.
The Stock chart can be configured as follows:
-
Set the Layout property of the main chart to "Stock".
-
Bind the chart to a data source that contains
DateTime values.
-
Set XAxis’ DataLabelsField property to get data from the
DateTime field.
-
Configure the Navigator by choosing a proper series type and applying custom
settings to the RangeSelector and the SelectionHint.
The allowed series types in the stock chart and the Navigator are:
Since Q1 2014, DateFormats allow you to set a date format for a particular
BaseUnit (e.g., Years, Months, Days, etc.)
of the X-axis. You can set a format like this:
<
XAxis
>
<
LabelsAppearance
>
<
DateFormats
YearsFormat
=
"yyyy"
/>
<
DateFormats
MonthsFormat
=
"MMM-yy"
/>
<
DateFormats
DaysFormat
=
"M/d"
/>
</
LabelsAppearance
>
</
XAxis
>
As the BaseUnit scale is automatically calculated when you navigate in the chart data,
one of the following DateFormats will be applied:
-
SecondsFormat
-
MinutesFormat
-
HoursFormat
-
DaysFormat
-
WeeksFormat
-
MonthsFormat
-
YearsFormat