Skip to main content
Version: 3.0.0

Base DChart

Main attribute for DChart

groupList

Typedefault
List<G>@required

data per group

renderType

Typedefault
RenderType Function(G group)?null

Render Type to draw chart

animate

Typedefault
boolfalse

animate chart when build

animationDuration

Typedefault
Durationconst Duration(milliseconds: 300)

duration animate a chart when build

domainAxis

Typedefault
ChartAxis<T>?DomainAxisN() or DomainAxisO() or DomainAxisT()

alt alt alt

measureAxis

Typedefault
ChartAxis<num>?MeasureAxis()

alt

secondaryMeasureAxis

Typedefault
ChartAxis<num>?MeasureAxis()

alt

useSecondaryMeasureAxis

Typedefault
bool Function(G group)?false

Setup which group will use secondary measure axis. Usually to compare one chart group with other chart group

useSecondaryMeasureAxis: (group) {
return switch (group.id) {
'id2' => true,
_ => false,
};
},

layoutMargin

Typedefault
LayoutMarginnull || 20px for each side

alt alt

allowSliding

Typedefault
boolfalse

Give user access to slide chart viewport.
Set initial viewport in domainAxis.
If set true, this will affect to 'measure viewport'.
Measure viewport will auto adjust depend on min/max from item chart value
To fix this, set viewport in measueAxis

defaultInteractions

Typedefault
boolfalse

Selected highlight effect

onUpdatedListener

Typedefault
void Function(D data)?false

listen which data is selected, set defaultInteractions to true

onChangedListener

Typedefault
void Function(D data)?false

listen which data is changed selected, set defaultInteractions to true

ltr

Typedefault
booltrue

Left to Right

  • true:
    measureAxis → chart → secondaryMeasureAxis
    domain: smaller → bigger
  • false:
    secondaryMeasureAxis ← chart ← measureAxis
    domain: bigger ← smaller

alt alt

flipVerticalAxis

Typedefault
boolfalse

sort reversed measure axis

alt alt