Commit 71b40537 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-c/2697-less-labels-on-a-bar-plot' into 'dev'

Feature c/2697 less labels on a bar plot

See merge request !89
parents da97d2b9 9fe2ea88
......@@ -35,7 +35,7 @@ function GenericAxis (reverse, can_undefined) {
this.value_mapping = {};
this.can_undefined = true;
this.NB_STEPS_IN_AXIS = 6; // Number (max) of labels per numerical axis
this.NB_STEPS_BAR = 30; // Number (max) of labels per numerical axis in histograms
this.NB_STEPS_BAR = 18; // Number (max) of labels per numerical axis in histograms
if(typeof can_undefined !== "undefined")
this.can_undefined = can_undefined;
this.reverse = false;
......
......@@ -111,7 +111,7 @@ QUnit.test("axis", function(assert) {
assert.equal(axis.label_mapping['10'].pos.toPrecision(3), 0, "pos of axis.label 10 is 0")
assert.equal(axis.label_mapping['281'].pos.toPrecision(3), 0.800, "pos of axis.label 281 is 0.800")
assert.equal(axis.labels[0].pos, 1, "pos of axis label 0 ('?' value) is 1")
assert.equal(axis.labels[axis.labels.length-1].pos, 1, "pos of last axis label is 1")
assert.approx(axis.labels[axis.labels.length-1].pos, 0.8, 0.01, "pos of last axis label is about 0.80")
assert.equal( (axis.labels.length != axis.label_mapping.length), true, "axis.labels length != axis.label_mapping length (du to '?')")
// sequenceLength with undefined
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment