Fixed error with color in scatterWithLegend, and used category10 instea d of category20 in scatterWithLegend example.

master-patched
Bob Monteverde 12 years ago
parent 5d515963e8
commit 99bb37d9bc

@ -26,6 +26,7 @@ text {
<script src="../src/tooltip.js"></script>
<script src="../src/models/legend.js"></script>
<script src="../src/models/axis.js"></script>
<script src="../src/models/scatter.js"></script>
<script src="../src/models/line.js"></script>
<script src="../src/models/lineWithFocus.js"></script>
<script src="stream_layers.js"></script>

@ -62,6 +62,7 @@ nv.addGraph({
.height(height)
.showDistX(true)
.showDistY(true)
.color(d3.scale.category10().range());
//.width(width)
//.height(height)
//.forceX([-4,4])

@ -255,6 +255,13 @@ nv.models.scatterWithLegend = function() {
return chart;
};
chart.color = function(_) {
if (!arguments.length) return color;
color = _;
legend.color(_);
return chart;
};
chart.showDistX = function(_) {
if (!arguments.length) return showDistX;
showDistX = _;

Loading…
Cancel
Save