Skip to content

Commit 9a66ac3

Browse files
committed
Add image chart json
1 parent 0f5c4b9 commit 9a66ac3

File tree

3 files changed

+38
-26
lines changed

3 files changed

+38
-26
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"data": [{
3+
"x" : [ "1.5", "2.5", "3.5", "Not Known" ],
4+
"y" : [ "1.0", "1.0", "2.0", "1.0" ],
5+
"type" : "bar"
6+
}],
7+
"layout": {
8+
"xaxis" : {
9+
"type" : "category",
10+
"autorange": true
11+
},
12+
"annotations": [
13+
{
14+
"x": "Not Known",
15+
"y": 1,
16+
"text": "Should point to category",
17+
"showarrow": true
18+
},
19+
{
20+
"x": 1.5,
21+
"y": 1.0,
22+
"text": "Should point to serial number",
23+
"showarrow": true
24+
}
25+
]
26+
}
27+
}
28+

test/image/mocks/bar_max_range_eq_category.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

test/jasmine/tests/axes_test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,6 +1779,16 @@ describe('Test axes', function() {
17791779
expect(gd._fullLayout.xaxis.categoryarray).toEqual(['b', 'a', 'd', 'e', 'c']);
17801780
});
17811781
});
1782+
});
1783+
1784+
describe('bar category autorange', function() {
1785+
var gd;
1786+
1787+
beforeEach(function() {
1788+
gd = createGraphDiv();
1789+
});
1790+
1791+
afterEach(destroyGraphDiv);
17821792

17831793
describe('a category has the same value of one of the auto range computed extreme', function() {
17841794
it('should compute the right range for X axis', function() {

0 commit comments

Comments
 (0)