mirror of
https://github.com/bendtherules/chart-builder-demo.git
synced 2026-08-18 13:42:05 +00:00
change tick format
This commit is contained in:
@@ -95,7 +95,7 @@ app.directive("dynamicChart", function (d3Tip) {
|
|||||||
g.append("g")
|
g.append("g")
|
||||||
.attr("class", "axis axis-y")
|
.attr("class", "axis axis-y")
|
||||||
.style("font-size",".75em")
|
.style("font-size",".75em")
|
||||||
.call(d3.axisLeft(y).ticks(10).tickFormat(d3.format(".0s")))
|
.call(d3.axisLeft(y).ticks(10).tickFormat(d3.format(" .2s")))
|
||||||
.append("text")
|
.append("text")
|
||||||
.attr("transform", "translate(15,0) rotate(-90)")
|
.attr("transform", "translate(15,0) rotate(-90)")
|
||||||
.attr("y", 6)
|
.attr("y", 6)
|
||||||
@@ -175,7 +175,7 @@ app.directive("dynamicChart", function (d3Tip) {
|
|||||||
.attr("class", "axis axis-x")
|
.attr("class", "axis axis-x")
|
||||||
.style("font-size",".75em")
|
.style("font-size",".75em")
|
||||||
.attr("transform", "translate(0," + height + ")")
|
.attr("transform", "translate(0," + height + ")")
|
||||||
.call(d3.axisBottom(x).ticks(10).tickFormat(d3.format(".0s")));
|
.call(d3.axisBottom(x).ticks(10).tickFormat(d3.format(" .2s")));
|
||||||
|
|
||||||
g.append("g")
|
g.append("g")
|
||||||
.attr("class", "axis axis-y")
|
.attr("class", "axis axis-y")
|
||||||
|
|||||||
Reference in New Issue
Block a user