rgraph-rails 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.travis.yml +1 -0
- data/README.md +2 -2
- data/lib/rgraph-rails/version.rb +1 -1
- data/vendor/assets/images/bullet.png +0 -0
- data/vendor/assets/images/facebook-large.png +0 -0
- data/vendor/assets/images/google-plus-large.png +0 -0
- data/vendor/assets/images/logo.png +0 -0
- data/vendor/assets/images/rgraph.jpg +0 -0
- data/vendor/assets/javascripts/RGraph.bar.js +533 -242
- data/vendor/assets/javascripts/RGraph.bipolar.js +152 -169
- data/vendor/assets/javascripts/RGraph.common.annotate.js +2 -2
- data/vendor/assets/javascripts/RGraph.common.context.js +2 -2
- data/vendor/assets/javascripts/RGraph.common.core.js +688 -373
- data/vendor/assets/javascripts/RGraph.common.csv.js +2 -2
- data/vendor/assets/javascripts/RGraph.common.deprecated.js +2 -2
- data/vendor/assets/javascripts/RGraph.common.dynamic.js +188 -193
- data/vendor/assets/javascripts/RGraph.common.effects.js +62 -38
- data/vendor/assets/javascripts/RGraph.common.key.js +35 -15
- data/vendor/assets/javascripts/RGraph.common.resizing.js +38 -21
- data/vendor/assets/javascripts/RGraph.common.sheets.js +2 -2
- data/vendor/assets/javascripts/RGraph.common.tooltips.js +48 -40
- data/vendor/assets/javascripts/RGraph.common.zoom.js +2 -2
- data/vendor/assets/javascripts/RGraph.drawing.background.js +33 -49
- data/vendor/assets/javascripts/RGraph.drawing.circle.js +27 -30
- data/vendor/assets/javascripts/RGraph.drawing.image.js +23 -26
- data/vendor/assets/javascripts/RGraph.drawing.marker1.js +47 -40
- data/vendor/assets/javascripts/RGraph.drawing.marker2.js +38 -42
- data/vendor/assets/javascripts/RGraph.drawing.marker3.js +24 -28
- data/vendor/assets/javascripts/RGraph.drawing.poly.js +25 -39
- data/vendor/assets/javascripts/RGraph.drawing.rect.js +27 -32
- data/vendor/assets/javascripts/RGraph.drawing.text.js +53 -58
- data/vendor/assets/javascripts/RGraph.drawing.xaxis.js +24 -29
- data/vendor/assets/javascripts/RGraph.drawing.yaxis.js +45 -51
- data/vendor/assets/javascripts/RGraph.fuel.js +11 -9
- data/vendor/assets/javascripts/RGraph.funnel.js +40 -43
- data/vendor/assets/javascripts/RGraph.gantt.js +34 -34
- data/vendor/assets/javascripts/RGraph.gauge.js +64 -55
- data/vendor/assets/javascripts/RGraph.hbar.js +194 -137
- data/vendor/assets/javascripts/RGraph.hprogress.js +261 -167
- data/vendor/assets/javascripts/RGraph.line.js +520 -512
- data/vendor/assets/javascripts/RGraph.meter.js +11 -10
- data/vendor/assets/javascripts/RGraph.modaldialog.js +11 -2
- data/vendor/assets/javascripts/RGraph.odo.js +11 -9
- data/vendor/assets/javascripts/RGraph.pie.js +385 -100
- data/vendor/assets/javascripts/RGraph.radar.js +36 -29
- data/vendor/assets/javascripts/RGraph.rose.js +58 -41
- data/vendor/assets/javascripts/RGraph.rscatter.js +40 -36
- data/vendor/assets/javascripts/RGraph.scatter.js +441 -499
- data/vendor/assets/javascripts/RGraph.semicircularprogress.js +1015 -0
- data/vendor/assets/javascripts/RGraph.thermometer.js +37 -37
- data/vendor/assets/javascripts/RGraph.vprogress.js +285 -157
- data/vendor/assets/javascripts/RGraph.waterfall.js +62 -62
- data/vendor/assets/stylesheets/website.css +30 -16
- metadata +3 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
// version: 2016-
|
1
|
+
// version: 2016-06-04
|
2
2
|
/**
|
3
3
|
* o--------------------------------------------------------------------------------o
|
4
4
|
* | This file is part of the RGraph package - you can learn more at: |
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* | |
|
8
8
|
* | RGraph is dual licensed under the Open Source GPL (General Public License) |
|
9
9
|
* | v2.0 license and a commercial license which means that you're not bound by |
|
10
|
-
* | the terms of the GPL. The commercial license starts at just
|
10
|
+
* | the terms of the GPL. The commercial license starts at just 99 GBP and |
|
11
11
|
* | you can read about it here: |
|
12
12
|
* | |
|
13
13
|
* | http://www.rgraph.net/license |
|
@@ -75,7 +75,11 @@
|
|
75
75
|
//RGraph.OldBrowserCompat(this.context);
|
76
76
|
|
77
77
|
|
78
|
-
// The left and right data respectively
|
78
|
+
// The left and right data respectively. Ensure that the data is an array
|
79
|
+
// of numbers
|
80
|
+
for (var i=0; i<left.length; ++i) left[i] = parseFloat(left[i]);
|
81
|
+
for (var i=0; i<right.length; ++i) right[i] = parseFloat(right[i]);
|
82
|
+
|
79
83
|
this.left = left;
|
80
84
|
this.right = right;
|
81
85
|
this.data = [left, right];
|
@@ -96,7 +100,10 @@
|
|
96
100
|
'chart.labels.above': false,
|
97
101
|
'chart.text.size': 12,
|
98
102
|
'chart.text.color': 'black', // (Simple) gradients are not supported
|
99
|
-
'chart.text.font': 'Arial',
|
103
|
+
'chart.text.font': 'Segoe UI, Arial, Verdana, sans-serif',
|
104
|
+
'chart.text.accessible': true,
|
105
|
+
'chart.text.accessible.overflow': 'visible',
|
106
|
+
'chart.text.accessible.pointerevents': false,
|
100
107
|
'chart.title.left': '',
|
101
108
|
'chart.title.right': '',
|
102
109
|
'chart.gutter.center': 60,
|
@@ -135,7 +142,7 @@
|
|
135
142
|
'chart.annotate.color': 'black',
|
136
143
|
'chart.xmax': null,
|
137
144
|
'chart.xmin': 0,
|
138
|
-
'chart.scale.zerostart':
|
145
|
+
'chart.scale.zerostart': true,
|
139
146
|
'chart.scale.decimals': null,
|
140
147
|
'chart.scale.point': '.',
|
141
148
|
'chart.scale.thousand': ',',
|
@@ -164,7 +171,8 @@
|
|
164
171
|
'chart.labels.count': 5,
|
165
172
|
'chart.variant.threed.offsetx': 10,
|
166
173
|
'chart.variant.threed.offsety': 5,
|
167
|
-
'chart.variant.threed.angle': 0.1
|
174
|
+
'chart.variant.threed.angle': 0.1,
|
175
|
+
'chart.clearto': 'rgba(0,0,0,0)'
|
168
176
|
}
|
169
177
|
|
170
178
|
// Pad the arrays so they're the same size
|
@@ -207,7 +215,6 @@
|
|
207
215
|
ca = this.canvas,
|
208
216
|
co = ca.getContext('2d'),
|
209
217
|
prop = this.properties,
|
210
|
-
pa = RG.Path,
|
211
218
|
pa2 = RG.path2,
|
212
219
|
win = window,
|
213
220
|
doc = document,
|
@@ -264,10 +271,9 @@
|
|
264
271
|
|
265
272
|
|
266
273
|
// Convert uppercase letters to dot+lower case letter
|
267
|
-
name
|
268
|
-
|
269
|
-
|
270
|
-
});
|
274
|
+
while(name.match(/([A-Z])/)) {
|
275
|
+
name = name.replace(/([A-Z])/, '.' + RegExp.$1.toLowerCase());
|
276
|
+
}
|
271
277
|
|
272
278
|
|
273
279
|
|
@@ -363,8 +369,11 @@
|
|
363
369
|
|
364
370
|
|
365
371
|
if (prop['chart.variant'] === '3d') {
|
366
|
-
|
367
|
-
|
372
|
+
if (prop['chart.text.accessible']) {
|
373
|
+
// Nada
|
374
|
+
} else {
|
375
|
+
co.setTransform(1,prop['chart.variant.threed.angle'],0,1,0.5,0.5);
|
376
|
+
}
|
368
377
|
}
|
369
378
|
|
370
379
|
|
@@ -481,15 +490,13 @@
|
|
481
490
|
|
482
491
|
// Draw the horizontal 3d axis
|
483
492
|
// The left horizontal axis
|
484
|
-
|
485
|
-
'b',
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
'f','#ddd'
|
492
|
-
]);
|
493
|
+
pa2(co,
|
494
|
+
'b m % % l % % l % % l % % s #aaa f #ddd',
|
495
|
+
this.gutterLeft, ma.round( ca.height - this.gutterBottom),
|
496
|
+
this.gutterLeft + offsetx, ma.round( ca.height - this.gutterBottom - offsety),
|
497
|
+
this.gutterLeft + offsetx + this.axisWidth, ma.round( ca.height - this.gutterBottom - offsety),
|
498
|
+
this.gutterLeft + this.axisWidth, ma.round( ca.height - this.gutterBottom)
|
499
|
+
);
|
493
500
|
|
494
501
|
// The left vertical axis
|
495
502
|
this.draw3DLeftVerticalAxis();
|
@@ -498,29 +505,25 @@
|
|
498
505
|
|
499
506
|
|
500
507
|
// Draw the right horizontal axes
|
501
|
-
|
502
|
-
'b',
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
'f','#ddd'
|
509
|
-
]);
|
508
|
+
pa2(co,
|
509
|
+
'b m % % l % % l % % l % % s #aaa f #ddd',
|
510
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth, ma.round( ca.height - this.gutterBottom),
|
511
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth + offsetx, ma.round( ca.height - this.gutterBottom - offsety),
|
512
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth + this.axisWidth + offsetx, ma.round( ca.height - this.gutterBottom - offsety),
|
513
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth + this.axisWidth, ma.round( ca.height - this.gutterBottom)
|
514
|
+
);
|
510
515
|
|
511
516
|
|
512
517
|
|
513
518
|
|
514
519
|
// Draw the right vertical axes
|
515
|
-
|
516
|
-
'b',
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
'f','#ddd'
|
523
|
-
]);
|
520
|
+
pa2(co,
|
521
|
+
'b m % % l % % l % % l % % s #aaa f #ddd',
|
522
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth, ca.height - this.gutterBottom,
|
523
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth, ca.height - this.gutterBottom - this.axisHeight,
|
524
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth + offsetx, ca.height - this.gutterBottom - this.axisHeight - offsety,
|
525
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth + offsetx, ca.height - this.gutterBottom - offsety
|
526
|
+
);
|
524
527
|
}
|
525
528
|
}
|
526
529
|
|
@@ -534,15 +537,13 @@
|
|
534
537
|
offsety = prop['chart.variant.threed.offsety'];
|
535
538
|
|
536
539
|
// The left vertical axis
|
537
|
-
|
538
|
-
'b',
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
'f','#ddd'
|
545
|
-
]);
|
540
|
+
pa2(co,
|
541
|
+
'b m % % l % % l % % l % % s #aaa f #ddd',
|
542
|
+
this.gutterLeft + this.axisWidth, this.gutterTop,
|
543
|
+
this.gutterLeft + this.axisWidth + offsetx, this.gutterTop - offsety,
|
544
|
+
this.gutterLeft + this.axisWidth + offsetx, ca.height - this.gutterBottom - offsety,
|
545
|
+
this.gutterLeft + this.axisWidth, ca.height - this.gutterBottom
|
546
|
+
);
|
546
547
|
}
|
547
548
|
};
|
548
549
|
|
@@ -842,18 +843,13 @@
|
|
842
843
|
co.shadowOffsetY = prop['chart.shadow.offsety'];
|
843
844
|
|
844
845
|
|
845
|
-
|
846
|
-
'b',
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
'sc', 'rgba(0,0,0,0)',
|
853
|
-
'sx', 0,
|
854
|
-
'sy', 0,
|
855
|
-
'sb', 0
|
856
|
-
]);
|
846
|
+
pa2(co,
|
847
|
+
'b m % % l % % l % % l % % f black sc rgba(0,0,0,0) sx 0 sy 0 sb 0',
|
848
|
+
coords[0] + offsetx, coords[1] - offsety,
|
849
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety,
|
850
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety + coords[3],
|
851
|
+
coords[0] + offsetx,coords[1] - offsety + coords[3]
|
852
|
+
);
|
857
853
|
}
|
858
854
|
|
859
855
|
|
@@ -868,23 +864,21 @@
|
|
868
864
|
co.fillStyle = prop['chart.colors'][0];
|
869
865
|
}
|
870
866
|
|
871
|
-
|
872
|
-
'b',
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
'f', 'rgba(255,255,255,0.4)'
|
887
|
-
]);
|
867
|
+
pa2(co,
|
868
|
+
'b m % % l % % l % % l % % f %',
|
869
|
+
coords[0],coords[1],
|
870
|
+
coords[0] + offsetx, coords[1] - offsety,
|
871
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety,
|
872
|
+
coords[0] + coords[2], coords[1]
|
873
|
+
);
|
874
|
+
|
875
|
+
pa2(co,
|
876
|
+
'b m % % l % % l % % l % % f rgba(255,255,255,0.4)',
|
877
|
+
coords[0],coords[1],
|
878
|
+
coords[0] + offsetx, coords[1] - offsety,
|
879
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety,
|
880
|
+
coords[0] + coords[2], coords[1]
|
881
|
+
);
|
888
882
|
}
|
889
883
|
|
890
884
|
this.draw3DLeftVerticalAxis();
|
@@ -1014,61 +1008,54 @@
|
|
1014
1008
|
co.shadowOffsetX = prop['chart.shadow.offsetx'];
|
1015
1009
|
co.shadowOffsetY = prop['chart.shadow.offsety'];
|
1016
1010
|
|
1017
|
-
|
1018
|
-
'b',
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
'sc', 'rgba(0,0,0,0)',
|
1025
|
-
'sx', 0,
|
1026
|
-
'sy', 0,
|
1027
|
-
'sb', 0
|
1028
|
-
]);
|
1011
|
+
pa2(co,
|
1012
|
+
'b m % % l % % l % % l % % f black sc rgba(0,0,0,0) sx 0 sy 0 sb 0',
|
1013
|
+
coords[0] + offsetx, coords[1] - offsety,
|
1014
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety,
|
1015
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety + coords[3],
|
1016
|
+
coords[0] + offsetx,coords[1] - offsety + coords[3]
|
1017
|
+
);
|
1029
1018
|
}
|
1030
1019
|
|
1031
1020
|
// Draw the top
|
1032
|
-
|
1033
|
-
'b',
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1021
|
+
pa2(co,
|
1022
|
+
'b m % % l % % l % % l % % f %',
|
1023
|
+
coords[0],coords[1],
|
1024
|
+
coords[0] + offsetx, coords[1] - offsety,
|
1025
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety,
|
1026
|
+
coords[0] + coords[2], coords[1],
|
1027
|
+
color
|
1028
|
+
);
|
1040
1029
|
|
1041
1030
|
|
1042
1031
|
// Draw the right hand side
|
1043
|
-
|
1044
|
-
'b',
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1032
|
+
pa2(co,
|
1033
|
+
'b m % % l % % l % % l % % f %',
|
1034
|
+
coords[0] + coords[2],coords[1],
|
1035
|
+
coords[0] + coords[2] + offsetx, coords[1] - offsety,
|
1036
|
+
coords[0] + coords[2] + offsetx, coords[1] - offsety + coords[3],
|
1037
|
+
coords[0] + coords[2],coords[1] + coords[3],
|
1038
|
+
color
|
1039
|
+
);
|
1051
1040
|
|
1052
1041
|
// Draw the LIGHTER top
|
1053
|
-
|
1054
|
-
'b',
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
]);
|
1042
|
+
pa2(co,
|
1043
|
+
'b m % % l % % l % % l % % f rgba(255,255,255,0.6)',
|
1044
|
+
coords[0],coords[1],
|
1045
|
+
coords[0] + offsetx, coords[1] - offsety,
|
1046
|
+
coords[0] + offsetx + coords[2], coords[1] - offsety,
|
1047
|
+
coords[0] + coords[2], coords[1]
|
1048
|
+
);
|
1061
1049
|
|
1062
1050
|
|
1063
1051
|
// Draw the DARKER right hand side
|
1064
|
-
|
1065
|
-
'b',
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
]);
|
1052
|
+
pa2(co,
|
1053
|
+
'b m % % l % % l % % l % % f rgba(0,0,0,0.3)',
|
1054
|
+
coords[0] + coords[2],coords[1],
|
1055
|
+
coords[0] + coords[2] + offsetx, coords[1] - offsety,
|
1056
|
+
coords[0] + coords[2] + offsetx, coords[1] - offsety + coords[3],
|
1057
|
+
coords[0] + coords[2],coords[1] + coords[3]
|
1058
|
+
);
|
1072
1059
|
}
|
1073
1060
|
|
1074
1061
|
|
@@ -1373,7 +1360,13 @@
|
|
1373
1360
|
height = this.coords[i][3]
|
1374
1361
|
|
1375
1362
|
//if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ) {
|
1376
|
-
|
1363
|
+
pa2(co,
|
1364
|
+
'b r % % % %',
|
1365
|
+
left,
|
1366
|
+
top,
|
1367
|
+
width,
|
1368
|
+
height
|
1369
|
+
);
|
1377
1370
|
|
1378
1371
|
if (co.isPointInPath(mouseX, mouseY)) {
|
1379
1372
|
|
@@ -1400,8 +1393,11 @@
|
|
1400
1393
|
this.highlight =
|
1401
1394
|
this.Highlight = function (shape)
|
1402
1395
|
{
|
1403
|
-
|
1404
|
-
|
1396
|
+
if (typeof prop['chart.highlight.style'] === 'function') {
|
1397
|
+
(prop['chart.highlight.style'])(shape);
|
1398
|
+
} else {
|
1399
|
+
RG.Highlight.Rect(this, shape);
|
1400
|
+
}
|
1405
1401
|
};
|
1406
1402
|
|
1407
1403
|
|
@@ -1506,36 +1502,23 @@
|
|
1506
1502
|
|
1507
1503
|
// Set the top position
|
1508
1504
|
tooltip.style.left = 0;
|
1509
|
-
tooltip.style.top =
|
1505
|
+
tooltip.style.top = window.event.pageY - height - 5 + 'px';
|
1510
1506
|
|
1511
1507
|
|
1512
1508
|
// By default any overflow is hidden
|
1513
1509
|
tooltip.style.overflow = '';
|
1514
|
-
|
1515
|
-
// The arrow
|
1516
|
-
var img = new Image();
|
1517
|
-
img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAFCAYAAACjKgd3AAAARUlEQVQYV2NkQAN79+797+RkhC4M5+/bd47B2dmZEVkBCgcmgcsgbAaA9GA1BCSBbhAuA/AagmwQPgMIGgIzCD0M0AMMAEFVIAa6UQgcAAAAAElFTkSuQmCC';
|
1518
|
-
img.style.position = 'absolute';
|
1519
|
-
img.id = '__rgraph_tooltip_pointer__';
|
1520
|
-
img.style.top = (tooltip.offsetHeight - 2) + 'px';
|
1521
|
-
tooltip.appendChild(img);
|
1522
|
-
|
1523
|
-
// Reposition the tooltip if at the edges:
|
1524
|
-
|
1510
|
+
|
1525
1511
|
// LEFT edge
|
1526
|
-
if (
|
1527
|
-
tooltip.style.left =
|
1528
|
-
img.style.left = ((width * 0.1) - 8.5) + 'px';
|
1512
|
+
if (canvasXY[0] + mouseXY[0] - (width / 2) < 0) {
|
1513
|
+
tooltip.style.left = canvasXY[0] + mouseXY[0] - (width * 0.1) + 'px';
|
1529
1514
|
|
1530
1515
|
// RIGHT edge
|
1531
|
-
} else if (
|
1532
|
-
tooltip.style.left = canvasXY[0] +
|
1533
|
-
img.style.left = ((width * 0.9) - 8.5) + 'px';
|
1516
|
+
} else if (canvasXY[0] + mouseXY[0] + (width / 2) > doc.body.offsetWidth) {
|
1517
|
+
tooltip.style.left = canvasXY[0] + mouseXY[0] - (width * 0.9) + 'px';
|
1534
1518
|
|
1535
1519
|
// Default positioning - CENTERED
|
1536
1520
|
} else {
|
1537
|
-
tooltip.style.left =
|
1538
|
-
img.style.left = ((width * 0.5) - 8.5) + 'px';
|
1521
|
+
tooltip.style.left = canvasXY[0] + mouseXY[0] - (width / 2) + 'px';
|
1539
1522
|
}
|
1540
1523
|
};
|
1541
1524
|
|
@@ -1698,12 +1681,12 @@
|
|
1698
1681
|
// Draw vertical grid lines for the left side
|
1699
1682
|
if (vlines) {
|
1700
1683
|
for (var i=0; i<=numvlines; i+=1) {
|
1701
|
-
|
1702
|
-
'b',
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1684
|
+
pa2(co,
|
1685
|
+
'b m % % l % % s %',
|
1686
|
+
this.gutterLeft + (this.axisWidth / numvlines) * i, this.gutterTop,
|
1687
|
+
this.gutterLeft + (this.axisWidth / numvlines) * i, this.gutterTop + this.axisHeight,
|
1688
|
+
color
|
1689
|
+
);
|
1707
1690
|
|
1708
1691
|
}
|
1709
1692
|
}
|
@@ -1711,12 +1694,12 @@
|
|
1711
1694
|
// Draw horizontal grid lines for the left side
|
1712
1695
|
if (hlines) {
|
1713
1696
|
for (var i=0; i<=numhlines; i+=1) {
|
1714
|
-
|
1715
|
-
'b',
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1697
|
+
pa2(co,
|
1698
|
+
'b m % % l % % s %',
|
1699
|
+
this.gutterLeft, this.gutterTop + (this.axisHeight / numhlines) * i,
|
1700
|
+
this.gutterLeft + this.axisWidth, this.gutterTop + (this.axisHeight / numhlines) * i,
|
1701
|
+
color
|
1702
|
+
);
|
1720
1703
|
}
|
1721
1704
|
}
|
1722
1705
|
|
@@ -1724,24 +1707,24 @@
|
|
1724
1707
|
// Draw vertical grid lines for the right side
|
1725
1708
|
if (vlines) {
|
1726
1709
|
for (var i=0; i<=numvlines; i+=1) {
|
1727
|
-
|
1728
|
-
'b',
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1710
|
+
pa2(co,
|
1711
|
+
'b m % % l % % s %',
|
1712
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth + (this.axisWidth / numvlines) * i, this.gutterTop,
|
1713
|
+
this.gutterLeft + this.gutterCenter + this.axisWidth + (this.axisWidth / numvlines) * i, this.gutterTop + this.axisHeight,
|
1714
|
+
color
|
1715
|
+
);
|
1733
1716
|
}
|
1734
1717
|
}
|
1735
1718
|
|
1736
1719
|
// Draw horizontal grid lines for the right side
|
1737
1720
|
if (hlines) {
|
1738
1721
|
for (var i=0; i<=numhlines; i+=1) {
|
1739
|
-
|
1740
|
-
'b',
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1722
|
+
pa2(co,
|
1723
|
+
'b m % % l % % s %',
|
1724
|
+
this.gutterLeft + this.axisWidth + this.gutterCenter, this.gutterTop + (this.axisHeight / numhlines) * i,
|
1725
|
+
this.gutterLeft + this.axisWidth + this.gutterCenter + this.axisWidth, this.gutterTop + (this.axisHeight / numhlines) * i,
|
1726
|
+
color
|
1727
|
+
);
|
1745
1728
|
}
|
1746
1729
|
}
|
1747
1730
|
|