Controller<P extends ChartPainter<ChartData<IDataSet<Entry> >? > > constructor
Controller<P extends ChartPainter<ChartData<IDataSet<Entry> >? > > ({
- IMarker? marker,
- Description? description,
- ViewPortHandler? viewPortHandler,
- XAxis? xAxis,
- Legend? legend,
- LegendRenderer? legendRenderer,
- OnChartValueSelectedListener? selectionListener,
- double maxHighlightDistance = 100.0,
- bool highLightPerTapEnabled = true,
- double extraTopOffset = 0.0,
- double extraRightOffset = 0.0,
- double extraBottomOffset = 0.0,
- double extraLeftOffset = 0.0,
- bool drawMarkers = true,
- bool resolveGestureHorizontalConflict = false,
- bool resolveGestureVerticalConflict = false,
- double descTextSize = 12,
- double infoTextSize = 12,
- Color? descTextColor,
- Color? infoTextColor,
- Color? infoBgColor,
- TextPainter? descPaint,
- TextPainter? infoPaint,
- String noDataText = "No chart data available.",
- XAxisSettingFunction? xAxisSettingFunction,
- LegendSettingFunction? legendSettingFunction,
- DataRendererSettingFunction? rendererSettingFunction,
Implementation
Controller({this.marker,
this.description,
this.viewPortHandler,
this.xAxis,
this.legend,
this.legendRenderer,
this.selectionListener,
this.maxHighlightDistance = 100.0,
this.highLightPerTapEnabled = true,
this.extraTopOffset = 0.0,
this.extraRightOffset = 0.0,
this.extraBottomOffset = 0.0,
this.extraLeftOffset = 0.0,
this.drawMarkers = true,
bool resolveGestureHorizontalConflict = false,
bool resolveGestureVerticalConflict = false,
double descTextSize = 12,
double infoTextSize = 12,
Color? descTextColor,
Color? infoTextColor,
this.infoBgColor,
this.descPaint,
this.infoPaint,
String noDataText = "No chart data available.",
this.xAxisSettingFunction,
this.legendSettingFunction,
this.rendererSettingFunction}) {
animator = ChartAnimatorBySys(this);
descTextColor = ColorUtils.black;
descPaint = PainterUtils.create(null, null, descTextColor, descTextSize,
fontFamily: description?.typeface?.fontFamily,
fontWeight: description?.typeface?.fontWeight);
infoTextColor ??= ColorUtils.black;
infoPaint =
PainterUtils.create(null, noDataText, infoTextColor, infoTextSize);
infoBgColor ??= ColorUtils.white;
if (maxHighlightDistance == 0.0) {
maxHighlightDistance = Utils.convertDpToPixel(500);
}
this.viewPortHandler ??= initViewPortHandler();
this.marker ??= initMarker();
this.description ??= initDescription();
this.selectionListener ??= initSelectionListener();
if (resolveGestureHorizontalConflict) {
horizontalConflictResolveFunc = () => true;
}
if (resolveGestureVerticalConflict) {
verticalConflictResolveFunc = () => true;
}
}