[MERGE] forward port branch 11.0 up to 3c9aa50449
This commit is contained in:
@@ -313,7 +313,7 @@ return AbstractRenderer.extend({
|
||||
};
|
||||
}
|
||||
data_dict[serie].values.push({
|
||||
x: tick, y: this.state.data[i].value,
|
||||
x: tick - 1, y: this.state.data[i].value,
|
||||
});
|
||||
data = _.map(data_dict, identity);
|
||||
}
|
||||
|
||||
@@ -154,6 +154,29 @@ QUnit.module('Views', {
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test('displaying line chart data with multiple groupbys', function (assert) {
|
||||
// this test makes sure the line chart shows all data labels (X axis) when
|
||||
// it is grouped by several fields
|
||||
assert.expect(3);
|
||||
|
||||
var graph = createView({
|
||||
View: GraphView,
|
||||
model: 'foo',
|
||||
data: this.data,
|
||||
arch: '<graph type="line"><field name="foo" /></graph>',
|
||||
groupBy: ['product_id', 'bar'],
|
||||
});
|
||||
|
||||
assert.strictEqual(graph.$('.nv-x text:contains(xphone)').length, 1,
|
||||
"should contain a text element with product xphone on X axis");
|
||||
assert.strictEqual(graph.$('.nv-x text:contains(xpad)').length, 1,
|
||||
"should contain a text element with product xpad on X axis");
|
||||
assert.strictEqual(graph.$('text:contains(true)').length, 1,
|
||||
"should have an entry for each value of field 'bar' in the legend");
|
||||
|
||||
graph.destroy();
|
||||
});
|
||||
|
||||
QUnit.test('switching measures', function (assert) {
|
||||
var done = assert.async();
|
||||
assert.expect(4);
|
||||
|
||||
+2
-1
@@ -29,7 +29,8 @@ pyserial==3.1.1
|
||||
python-dateutil==2.5.3
|
||||
pytz==2016.7
|
||||
pyusb==1.0.0
|
||||
PyYAML==3.12
|
||||
PyYAML==3.12 ; python_version < '3.7'
|
||||
PyYAML==3.13 ; python_version >= '3.7'
|
||||
qrcode==5.3
|
||||
reportlab==3.3.0
|
||||
requests==2.11.1
|
||||
|
||||
Reference in New Issue
Block a user