mhkeller / layercake.graphics

Website for Layer Cake
https://layercake.graphics
MIT License
8 stars 6 forks source link

Docs enhancement suggestion: mention that you use @rollup/plugin-dsv in the examples #27

Closed andrew-j-roberts closed 3 years ago

andrew-j-roberts commented 3 years ago

Hi all,

All the examples import CSV files using a Rollup plugin for d3-dsv, but this isn't advertised. I think it'd help new users if you called this out somewhere in the docs so that they have a better understanding of the expected format for the data for each of the chart types. Maybe this is table stakes for some people, but as someone who wasn't intimately familiar with D3 it took me a little bit just to figure out the structure of the data in the examples was instead of jumping right in and building stuff.

mhkeller commented 3 years ago

Good idea. Do you think each example page should have a little box that explains that or do you think inline comments?

mhkeller commented 3 years ago

Transferred this over to the repo for the docs: https://github.com/mhkeller/layercake.graphics

andrew-j-roberts commented 3 years ago

Hey @mhkeller, I think both would be helpful but that a link to the plugin in an inline comment like the one below would be totally fine since the examples pages show all the files.

  /* --------------------------------------------
   * Set what is our x key to separate it from the other series
   */

  const xKey = 'month';
  const yKey = 'value';
  const zKey = 'key';
mhkeller commented 3 years ago

I added this and it's now live. Thanks for the suggestion!