csosa
1
Hi I am using a Bar Graph on Codepen and I when I make a new row I want to
control the size of the bar itself. It is in this script I believe:
HorizontalBarGraph.prototype.draw = function() {
var x = d3.scale.linear()
.domain([0, d3.max(this.series, function(d) { return d.value })])
.range([0, 30]);
lorenw
2
It’s in the CSS
.horizontal-bar-graph-value-bar {
background: silver;
@include box-sizing(padding-box);
padding: 4px 4px 3px;
height: 100px;
text-align: right;
color: white;
overflow: visible;
display: inline-block;
white-space: nowrap;
-webkit-font-smoothing: antialiased;
}
height: 100px;, was 1em
csosa
3
I mean how can control the each individual bar though? when I make a new one…
not the height but the length or width/
lorenw
4
Do you mean change the value from 1167 to 500?
{label: "100 Ibs to 500 Ibs", inner_label: "20g-60g", value: 1167, color: "red" },
1167 is the default horizontal length of the red bar.
system
Closed
5
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.