This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-23
Channels
- # aws-lambda (1)
- # beginners (11)
- # boot (456)
- # cider (3)
- # cljsrn (7)
- # clojure (340)
- # clojure-berlin (6)
- # clojure-dev (207)
- # clojure-germany (12)
- # clojure-greece (3)
- # clojure-italy (3)
- # clojure-russia (12)
- # clojure-spec (42)
- # clojure-uk (29)
- # clojured (7)
- # clojurescript (125)
- # datascript (1)
- # datomic (47)
- # defnpodcast (4)
- # emacs (30)
- # events (7)
- # hoplon (13)
- # instaparse (64)
- # jobs (13)
- # jobs-discuss (1)
- # lein-figwheel (1)
- # leiningen (10)
- # luminus (1)
- # lumo (14)
- # off-topic (10)
- # om (16)
- # om-next (3)
- # onyx (1)
- # pedestal (3)
- # protorepl (5)
- # re-frame (17)
- # reagent (66)
- # ring (1)
- # ring-swagger (13)
- # spacemacs (12)
- # specter (4)
- # untangled (272)
- # vim (4)
- # yada (24)
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?