File tree Expand file tree Collapse file tree 2 files changed +29
-22
lines changed Expand file tree Collapse file tree 2 files changed +29
-22
lines changed Original file line number Diff line number Diff line change @@ -1228,17 +1228,17 @@ function syncTicks(ax) {
1228
1228
var ticksOut = [ ] ;
1229
1229
if ( baseAxis . _vals ) {
1230
1230
for ( var i = 0 ; i < baseAxis . _vals . length ; i ++ ) {
1231
+ // filter vals with noTick flag
1232
+ if ( baseAxis . _vals [ i ] . noTick ) {
1233
+ continue ;
1234
+ }
1235
+
1231
1236
// get the position of the every tick
1232
1237
var pos = baseAxis . l2p ( baseAxis . _vals [ i ] . x ) ;
1233
1238
1234
1239
// get the tick for the current axis based on position
1235
1240
var vali = ax . p2l ( pos ) ;
1236
- var val1 = ax . p2l ( pos - 0.1 ) ;
1237
- var val2 = ax . p2l ( pos + 0.1 ) ;
1238
- var d = 1 + Math . round ( Math . log10 ( Math . abs ( val2 - val1 ) ) ) ;
1239
- var e = Math . pow ( 10 , - d ) ;
1240
- var valR = Math . round ( vali * e ) / e ;
1241
- var obj = axes . tickText ( ax , valR ) ;
1241
+ var obj = axes . tickText ( ax , vali ) ;
1242
1242
1243
1243
// assign minor ticks
1244
1244
if ( baseAxis . _vals [ i ] . minor ) {
Original file line number Diff line number Diff line change 4
4
"name" : " Apples" ,
5
5
"type" : " bar" ,
6
6
"x" : [
7
- " Jan " ,
8
- " Feb " ,
9
- " Mar " ,
10
- " Apr " ,
11
- " May "
7
+ " 2000-01 " ,
8
+ " 2000-02 " ,
9
+ " 2000-03 " ,
10
+ " 2000-04 " ,
11
+ " 2000-05 "
12
12
],
13
13
"y" : [
14
14
232 ,
24
24
"x" : [
25
25
" A" ,
26
26
" B" ,
27
- " C"
28
- ],
29
- "y" : [
27
+ " C" ,
28
+ " D" ,
29
+ " E"
30
+ ],
31
+ "y" : [
30
32
0 ,
31
- 0.5 ,
32
- 1
33
- ],
33
+ 0.4 ,
34
+ 0.1 ,
35
+ 0.3 ,
36
+ 0.2
37
+ ],
34
38
"yaxis" : " y2" ,
35
39
"xaxis" : " x2"
36
40
}
44
48
},
45
49
"width" : 700 ,
46
50
"showlegend" : false ,
51
+ "xaxis" : {
52
+ "ticklen" : 10 ,
53
+ "tickwidth" : 3 ,
54
+ "ticklabelmode" : " period"
55
+ },
47
56
"xaxis2" : {
48
57
"anchor" : " y2" ,
49
58
"side" : " top" ,
50
59
"overlaying" : " x" ,
51
60
"tickmode" : " sync" ,
52
- "domain" : [
53
- 0.52 ,
54
- 1
55
- ]
61
+ "ticklen" : 10 ,
62
+ "tickwidth" : 3
56
63
},
57
64
"yaxis" : {
58
65
"title" : {
61
68
"side" : " left" ,
62
69
"range" : [
63
70
0 ,
64
- 2506
71
+ 2500
65
72
],
66
73
"ticklen" : 10 ,
67
74
"tickwidth" : 3 ,
You can’t perform that action at this time.
0 commit comments