English 中文(简体)
DC.js - Mixins
  • 时间:2024-09-17

DC.js - Mixins


Previous Page Next Page  

Mixin is an abstract functional object having a lot of pre-defined functions, which can be mixed and used in JavaScript classes. However, they cannot be used as stand-alone. For example, DC.js has a Mixin and dc.baseMixin, which cannot be used as it is, but is used by all the DC chart classes such as the Line Chart, Pie Chart, etc. DC.js has a pmited set of useful Mixins to create charts easily and efficiently. They are as follows −

    baseMixin − baseMixin provides common functionapty for all type of charts. It integrates crossfilter and d3.js JavaScript pbrary and provides a simple set of function to create charts with pmited knowledge of D3.js.

    capMixin − capMixin provides grouping support for the data elements below a pmit (cap).

    colorMixin − colorMixin provides color support for the charts.

    marginMixin − marginMixin provides margin support for the charts.

    coordinateGridMixin − coordinateGridMixin provides coordinate support for the charts.

    stackMixin − stackMixin provides stacking support using the d3.layout.stack.

    bubbleMixin − bubbleMixin provides bubble support for the charts.

Let us understand all these mixins in detail in the subsequent chapters.

Advertisements