KChartWidget constructor

KChartWidget(
  1. List<KLineEntity>? datas,
  2. ChartStyle chartStyle,
  3. ChartColors chartColors, {
  4. required bool isTrendLine,
  5. MainState mainState = MainState.MA,
  6. bool isShowMainState = true,
  7. List<SecondaryState> secondaryStates = const [SecondaryState.MACD],
  8. dynamic onSecondaryTap(
    1. int
    )?,
  9. bool volHidden = false,
  10. bool isLine = false,
  11. bool isTapShowInfoDialog = false,
  12. bool hideGrid = false,
  13. @Deprecated('Use `translations` instead.') bool isChinese = false,
  14. bool showNowPrice = true,
  15. bool showInfoDialog = true,
  16. bool materialInfoDialog = true,
  17. Map<String, ChartTranslations> translations = kChartTranslations,
  18. List<String> timeFormat = TimeFormat.YEAR_MONTH_DAY,
  19. dynamic onLoadMore(
    1. bool
    )?,
  20. int fixedLength = 2,
  21. List<int> maDayList = const [5, 10, 20],
  22. int flingTime = 600,
  23. double flingRatio = 0.5,
  24. Curve flingCurve = Curves.decelerate,
  25. dynamic isOnDrag(
    1. bool
    )?,
  26. VerticalTextAlignment verticalTextAlignment = VerticalTextAlignment.left,
  27. double? mainHeight,
  28. double? secondaryHeight,
  29. void onGoingUp(
    1. double probability
    )?,
  30. void onGoingDown(
    1. double probability
    )?,
  31. void onMainGoingUp(
    1. double probability
    )?,
  32. void onMainGoingDown(
    1. double probability
    )?,
  33. void onUpProbs(
    1. UpProbReport report
    )?,
  34. List<TradeMark> tradeMarks = const [],
  35. bool showTradeMarks = true,
})

Implementation

KChartWidget(
  this.datas,
  this.chartStyle,
  this.chartColors, {
  required this.isTrendLine,
  this.mainState = MainState.MA,
  this.isShowMainState = true,
  this.secondaryStates = const [SecondaryState.MACD],
  this.onSecondaryTap,
  this.volHidden = false,
  this.isLine = false,
  this.isTapShowInfoDialog = false,
  this.hideGrid = false,
  @Deprecated('Use `translations` instead.') this.isChinese = false,
  this.showNowPrice = true,
  this.showInfoDialog = true,
  this.materialInfoDialog = true,
  this.translations = kChartTranslations,
  this.timeFormat = TimeFormat.YEAR_MONTH_DAY,
  this.onLoadMore,
  this.fixedLength = 2,
  this.maDayList = const [5, 10, 20],
  this.flingTime = 600,
  this.flingRatio = 0.5,
  this.flingCurve = Curves.decelerate,
  this.isOnDrag,
  this.verticalTextAlignment = VerticalTextAlignment.left,
  this.mainHeight,
  this.secondaryHeight,
  this.onGoingUp, // ★ 仅副图
  this.onGoingDown, // ★ 仅副图
  this.onMainGoingUp, // ★ 仅主图
  this.onMainGoingDown, // ★ 仅主图
  this.onUpProbs,
  this.tradeMarks = const [],
  this.showTradeMarks = true,
});