These are chat archives for sandialabs/toyplot

Jun 2017
Timothy M. Shead
Jun 09 2017 17:59
Hey @dereneaton , just a heads-up that I went ahead and made the code for creating and rendering custom marks public; you can see an example in the sandibox/custom-marks notebook. What’s missing at the moment is some way to register the code to create your tree files, which I’ll work on next. There are basically two possible approaches. The expedient approach would be to allow callers to just embed a blob of data in a mark and make it exportable. That would be easy, because you’d use the existing Graph mark, generate the tree file in Python code, “embed” it in the mark, and some boilerplate Javascript could handle the exports. The objection to this approach is that if you have many different supported file formats, you end-up duplicating the data many times over in your figure. So the efficient approach would be to allow the caller to register some JavaScript code to convert the underlying data to the export format as-needed. That’s the current hard-coded approach to CSV export, which I would be opening-up to customization. That would be trickier because you’d need to derive from the existing Graph mark, register a rendering function that falls back on the existing graph rendering code, then registers the Javascript to handle the export.