Plotly.js: document the structure of trace modules

Created on 3 Dec 2015  路  5Comments  路  Source: plotly/plotly.js

Motivated by #63 ... we should describe this structure somewhere in the contributor's guide. What's generally supposed to be the role of attributes, supplyDefaults, supplyLayoutDefaults, calc, setPositions, plot, and style (anything else?), how to tell the difference, and when each of them gets called. Without that it's pretty hard for new people to make any meaningful contributions to the drawing code. The non-trace modules (axes, annotations, etc...) may still be too ad-hoc for this kind of doc to be useful, but I think the traces are fairly uniform by now.

Of course if this leads us to the desperately needed refactor & modularization of restyle and relayout I wouldn't complain, but that shouldn't stop us from documenting what we have.

documentation maintenance

All 5 comments

the gl trace modules need a convert step too at the moment.

I'll try to make a PR for this ticket before I go.

@archmoj is there anything in particular regarding the trace module structure that you'd like me to write on?

It would be helpful to know "when each of them gets called".

TODO:

  • (not really related this to, but something I should write about) how to debugger in jasmine test window to write interaction tests faster.

Peek 2020-03-11 10-45

:arrow_up: gif I'll add to the CONTRIBUTING.md doc.

Was this page helpful?
0 / 5 - 0 ratings