@using
FinancialChartExplorer.Models
@model
List<
FinanceData
>
@
{
ViewBag.DemoSettings =
true
;
ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel;
}
<script type="text/javascript">
function
customChangeOptions_Kagi_ReversalAmount(control, value) {
var
reversalAmount = +value;
control.options.kagi.reversalAmount = control.options.kagi.rangeMode === wijmo.chart.finance.RangeMode.Percentage ? (reversalAmount / 100) : reversalAmount;
control.invalidate();
}
function
customChangeOptions_Kagi_RangeMode(control, value) {
var
reversalAmount = control.options.kagi.reversalAmount;
if
(value !==
"Percentage"
) {
if
(reversalAmount <
1
) {
control.options.kagi.reversalAmount
=
Math
.round(reversalAmount * 100);
}
}
else
{
if
(reversalAmount > 1) {
control.options.kagi.reversalAmount = reversalAmount / 100;
}
}
control.options.kagi.rangeMode = wijmo.chart.finance.RangeMode[value];
control.invalidate();
}
function
convertOptions_Kagi_Fields(value) {
return
wijmo.chart.finance.DataFields[value];
}
</script>
@
(Html.C1().FinancialChart()
.Id(demoSettingsModel.ControlId)
.Bind(Model)
.BindingX(
"X"
)
.ChartType(C1.Web.Mvc.Finance.ChartType.Kagi)
.Options(o => { o.KagiReversalAmount(2); o.KagiFields(C1.Web.Mvc.Finance.DataFields.High); o.KagiRangeMode(C1.Web.Mvc.Finance.RangeMode.Fixed); })
.Series(sers =>
{
sers.Add().Binding(
"High,Low,Open,Close"
).Name(
"BOX"
);
})
.Tooltip(t => t.Content(
"financialTooltip"
)))
@section
Description{
<
p
>
A Kagi chart displays supply and demand trends
using
a sequence of linked vertical lines.
</
p
>
<
p
>
The thickness and direction of the lines vary depending on the price movement.
If closing prices go
in
the direction of the previous Kagi line, then that Kagi line
is
extended.
However,
if
the closing price reverses by the preset reversal amount, a
new
Kagi line
is
charted
in
the next column
in
the opposite direction. Thin lines indicate that the price breaks the previous low (supply)
while
thick lines indicate that the price breaks the previous high (demand).
</
p
>
}
@section
Summary{
<
p
>
A Kagi chart displays supply and demand trends
using
a sequence of linked vertical lines.
</
p
>
}