StochasticIndicator<T, D> constructor
StochasticIndicator<T, D> ({
- bool isVisible = true,
- String? xAxisName,
- String? yAxisName,
- String? seriesName,
- List<
double> dashArray = const <double>[0, 0], - double animationDuration = 1500,
- double animationDelay = 0,
- List<
T> ? dataSource, - ChartValueMapper<
T, D> ? xValueMapper, - ChartValueMapper<
T, num> ? highValueMapper, - ChartValueMapper<
T, num> ? lowValueMapper, - ChartValueMapper<
T, num> ? openValueMapper, - ChartValueMapper<
T, num> ? closeValueMapper, - String? name,
- bool isVisibleInLegend = true,
- LegendIconType legendIconType = LegendIconType.seriesType,
- String? legendItemText,
- Color signalLineColor = Colors.blue,
- double signalLineWidth = 2,
- int period = 14,
- bool showZones = true,
- double overbought = 80,
- double oversold = 20,
- Color upperLineColor = Colors.red,
- double upperLineWidth = 2,
- Color lowerLineColor = Colors.green,
- double lowerLineWidth = 2,
- Color periodLineColor = Colors.yellow,
- double periodLineWidth = 2,
- num kPeriod = 3,
- num dPeriod = 5,
- ChartIndicatorRenderCallback? onRenderDetailsUpdate,
Creating an argument constructor of StochasticIndicator class.
Implementation
StochasticIndicator({
super.isVisible,
super.xAxisName,
super.yAxisName,
super.seriesName,
super.dashArray,
super.animationDuration,
super.animationDelay,
super.dataSource,
ChartValueMapper<T, D>? xValueMapper,
ChartValueMapper<T, num>? highValueMapper,
ChartValueMapper<T, num>? lowValueMapper,
ChartValueMapper<T, num>? openValueMapper,
ChartValueMapper<T, num>? closeValueMapper,
super.name,
super.isVisibleInLegend,
super.legendIconType,
super.legendItemText,
super.signalLineColor,
super.signalLineWidth,
this.period = 14,
this.showZones = true,
this.overbought = 80,
this.oversold = 20,
this.upperLineColor = Colors.red,
this.upperLineWidth = 2,
this.lowerLineColor = Colors.green,
this.lowerLineWidth = 2,
this.periodLineColor = Colors.yellow,
this.periodLineWidth = 2,
this.kPeriod = 3,
this.dPeriod = 5,
super.onRenderDetailsUpdate,
}) : super(
xValueMapper: xValueMapper != null && dataSource != null
? (int index) => xValueMapper(dataSource[index], index)
: null,
highValueMapper: highValueMapper != null && dataSource != null
? (int index) => highValueMapper(dataSource[index], index)
: null,
lowValueMapper: lowValueMapper != null && dataSource != null
? (int index) => lowValueMapper(dataSource[index], index)
: null,
openValueMapper: openValueMapper != null && dataSource != null
? (int index) => openValueMapper(dataSource[index], index)
: null,
closeValueMapper: closeValueMapper != null && dataSource != null
? (int index) => closeValueMapper(dataSource[index], index)
: null,
);