SciNim / nim-plotly

plotly wrapper for nim-lang
https://scinim.github.io/nim-plotly/
MIT License
173 stars 15 forks source link

add plotly `log` axis type #49

Closed cwpearson closed 4 years ago

cwpearson commented 4 years ago

This PR adds support for making a plotly log-type axis. It adds the ty field to the Axis type, serializes it to a string if it is not the empty string, and adds an example and a test.

cwpearson commented 4 years ago

I couldn't find anything in the Nim manual (still learning it myself) that said that the default enum value is the first one, so I added a test to make sure the default AxisType is what we expect.

https://nim-lang.org/docs/manual.html#types-enumeration-types

I could remove that test if you like.