I have a formatting issue with the following chart:
(proto-repl-charts.charts/custom-chart
"explore variance"
{:data {
:xs {:y :x}
:columns [[:x -8 -7.5 -7 -6.5 -6 -5.5 -5 -4.5 -4 -3.5 -3]
[:y 7.3 7.3 7.1 7.0 7.9 7.9 7.8 7.8 7.7 7.7 7.5]]}})
The values for the x-axis are missing the decimal point (even on hover).
To specify the formatting, in c3 I would use d3.format(".1f")
as follows.
{
"data" : {
"xs" : {
"y" : "x"
},
"columns" : [
[ "x", -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3 ],
[ "y", 7.3, 7.3, 7.1, 7.0, 7.9, 7.9, 7.8, 7.8, 7.7, 7.7, 7.5]
]
},
"axis" : {
"x" : {
"tick" : {
"format" : d3.format(".1f")
}
}
}
}
My guess for clojure-charts is the following (but it didn't work).
(proto-repl-charts.charts/custom-chart
"explore variance"
{:data {
:xs {:y :x}
:columns [[:x -8 -7.5 -7 -6.5 -6 -5.5 -5 -4.5 -4 -3.5 -3]
[:y 7.3 7.3 7.1 7.0 7.9 7.9 7.8 7.8 7.7 7.7 7.5]]}
:axis {:x
{ :tick {:format [:format ".1f"]}}}})
any takers?