score:12

i found the internal documentation of each of the hooks in the code (see below for a prettified version). not quite the order, but it can help figuring it out.

note that some hooks have the same name but they differ in the parameters (you can check those directly in the code:

  • beforeinit: called before initializing chart.
  • afterinit: called after chart has been initialized and before the first update.
  • beforeupdate: called before updating chart. if any plugin returns false, the update is cancelled (and thus subsequent render(s)) until another update is triggered.
  • afterupdate: called after chart has been updated and before rendering. note that this hook will not be called if the chart update has been previously cancelled.
  • beforedatasetsupdate: called before updating the chart datasets. if any plugin returns false, the datasets update is cancelled until another update is triggered. @since version 2.1.5
  • afterdatasetsupdate: called after the chart datasets have been updated. note that this hook will not be called if the datasets update has been previously cancelled.
  • beforedatasetupdate: called before updating the chart dataset at the given args.index. if any plugin returns false, the datasets update is cancelled until another update is triggered.
  • afterdatasetupdate: called after the chart datasets at the given args.index has been updated. note that this hook will not be called if the datasets update has been previously cancelled.
  • beforelayout: called before laying out chart. if any plugin returns false, the layout update is cancelled until another update is triggered.
  • afterlayout: called after the chart has been layed out. note that this hook will not be called if the layout update has been previously cancelled.
  • beforerender: called before rendering chart. if any plugin returns false, the rendering is cancelled until another render is triggered.
  • afterrender: called after the chart has been fully rendered (and animation completed). note that this hook will not be called if the rendering has been previously cancelled.
  • beforedraw: called before drawing chart at every animation frame specified by the given easing value. if any plugin returns false, the frame drawing is cancelled until another render is triggered.
  • afterdraw: called after the chart has been drawn for the specific easing value. note that this hook will not be called if the drawing has been previously cancelled.
  • beforedatasetsdraw: called before drawing the chart datasets. if any plugin returns false, the datasets drawing is cancelled until another render is triggered.
  • afterdatasetsdraw: called after the chart datasets have been drawn. note that this hook will not be called if the datasets drawing has been previously cancelled.
  • beforedatasetdraw: called before drawing the chart dataset at the given args.index (datasets are drawn in the reverse order). if any plugin returns false, the datasets drawing is cancelled until another render is triggered.
  • afterdatasetdraw: called after the chart datasets at the given args.index have been drawn (datasets are drawn in the reverse order). note that this hook will not be called if the datasets drawing has been previously cancelled.
  • beforetooltipdraw: called before drawing the tooltip. if any plugin returns false, the tooltip drawing is cancelled until another render is triggered.
  • aftertooltipdraw: called after drawing the tooltip. note that this hook will not be called if the tooltip drawing has been previously cancelled.
  • beforeevent: called before processing the specified event. if any plugin returns false, the event will be discarded.
  • afterevent: called after the event has been consumed. note that this hook will not be called if the event has been previously discarded.
  • resize: called after the chart as been resized.
  • destroy: called after the chart as been destroyed.

Related Query

More Query from same tag