highcharts-rails 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- checksums.yaml.gz.asc +18 -0
- data/CHANGELOG.markdown +4 -0
- data/Rakefile +29 -1
- data/app/assets/javascripts/highcharts/adapters/mootools.js +1 -1
- data/app/assets/javascripts/highcharts/adapters/prototype.js +1 -1
- data/app/assets/javascripts/highcharts/highcharts-more.js +118 -217
- data/app/assets/javascripts/highcharts/modules/annotations.js +74 -27
- data/app/assets/javascripts/highcharts/modules/canvas-tools.js +1 -1
- data/app/assets/javascripts/highcharts/modules/data.js +74 -29
- data/app/assets/javascripts/highcharts/modules/exporting.js +5 -8
- data/app/assets/javascripts/highcharts/modules/funnel.js +2 -2
- data/app/assets/javascripts/highcharts/modules/heatmap.js +57 -0
- data/app/assets/javascripts/highcharts/modules/map.js +576 -0
- data/app/assets/javascripts/highcharts.js +853 -497
- data/highcharts-rails.gemspec +1 -0
- data/lib/highcharts/version.rb +1 -1
- data.tar.gz.asc +14 -14
- metadata +18 -23
- metadata.gz.asc +14 -14
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZjI5YTRiMTJiMjQ4MTM2YWYwNmZhZGU3MTAwMDA3N2FlN2ZlMWY2Nw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NTc2MzAyYWE2YjU3NjdiNmFkOGZhYTNkNjYzNTk1MzBiMmIyMjY4YQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NGYwYWI4NmM5MDlmNWEyZmM2YmFiMzIyOWY1Nzc2NGY1YWFmMmJhYWEwZjYz
|
10
|
+
NjkyMGExOGQwM2I3ZjhiY2NmNDFhZTA2MzI1MDc4Y2IxM2ZjNGYwNTZhMDZl
|
11
|
+
ZmEzZTc5ZDFkNDA1ZWMyN2MxYTZjMWIxMjgzYzU2MWE5MGIyNjU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzI5MjhlYmFlOTgyZGRjZDg1YTBmNzkwMzIyMWExZTFkZGE2MWRmYjRhOTFl
|
14
|
+
ODFmOTQ1MDQxYWI4NzM4MGY3OTc0YjNjZjhmNGUxMjgzY2FmODEzNzdiOTRh
|
15
|
+
NjQ4YWViZWIwOTA0OTJjZjk3ODRjNTU0YzQ2OWYzMDEwNDY1Yzc=
|
checksums.yaml.gz.asc
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
-----BEGIN PGP SIGNATURE-----
|
2
|
+
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
|
3
|
+
Comment: GPGTools - http://gpgtools.org
|
4
|
+
|
5
|
+
iQIcBAABAgAGBQJR+ocLAAoJEH1ncb0Txu7Xl1kP+wUDto8iBznBibINIAh6gKRy
|
6
|
+
geHnvX64o0K1h5LA8a8Au32wlOVW1YiDXXnkj2eO5JPbusnkzf5NaUdBXOvYaMyP
|
7
|
+
3MDd3mC8LJtrHavizFU8nNDKGfZC/l5g47vc5OAS9Ti9zg1dWZg9vpjWlKb0d4AA
|
8
|
+
RF4MmBPieVpJLscwWSexOzzz1VP1yM6oiOt9dQcbLxK2LMOsjsSbwnOHdue+LS3q
|
9
|
+
BIJ06N60hOLxTcSKgEsMAgwXmqhOsWYrixktwc6wD/f4DUn8td00AY7ienR0dLVI
|
10
|
+
FCzwu8m+NKzja0vDhuhrPPpFtsyFNJG3WYbZCzA0hdqHmGKr78xZxgktlbECmohG
|
11
|
+
xxonq0eKNW8nLcmdU4dkrYRGuDLTBL2G0Q5/YB1xaUAOfg9TUBt3jb8I4v0gXUVY
|
12
|
+
q3M+STPOAbFt2zpna2W0x3m2l7xLlUAMbxK7K+l6AsfUDYHJFYNaG0PBontNreMs
|
13
|
+
+Xth9pvoWE/AsiQss4cyWbrF7EyEFDLxn+WEAxVlXvi2LUupjH8fSg3HyGKmka2B
|
14
|
+
dMweTMnHrDtR/iPAyP9xcoXhIH772blmXjZ/wj8cfzK6g+PyC7lkMC8YWDYelHxc
|
15
|
+
Mbw6rnMrqJTbjo4uBxOqhwHT52Ny318VHMYVXRSEE9HRwBUxIVlBek45db9wUpG9
|
16
|
+
j07oq3nF8rW/0QhkKxmk
|
17
|
+
=mSJy
|
18
|
+
-----END PGP SIGNATURE-----
|
data/CHANGELOG.markdown
CHANGED
data/Rakefile
CHANGED
@@ -1 +1,29 @@
|
|
1
|
-
|
1
|
+
desc "Update to the latest version of Highcharts"
|
2
|
+
task :update, :version do |t, args|
|
3
|
+
version = args[:version]
|
4
|
+
url = "http://code.highcharts.com/zips/Highcharts-#{version}.zip"
|
5
|
+
puts "Fetching #{url}"
|
6
|
+
#`curl -# #{url} -o tmp/#{version}.zip`
|
7
|
+
#`unzip tmp/#{version}.zip -d tmp/#{version}`
|
8
|
+
|
9
|
+
mappings = {
|
10
|
+
"highcharts.src.js" => "highcharts.js",
|
11
|
+
"highcharts-more.src.js" => "highcharts/highcharts-more.js",
|
12
|
+
"mootools-adapter.src.js" => "highcharts/adapters/mootools.js",
|
13
|
+
"prototype-adapter.src.js" => "highcharts/adapters/prototype.js",
|
14
|
+
"annotations.src.js" => "highcharts/modules/annotations.js",
|
15
|
+
"canvas-tools.src.js" => "highcharts/modules/canvas-tools.js",
|
16
|
+
"data.src.js" => "highcharts/modules/data.js",
|
17
|
+
"exporting.src.js" => "highcharts/modules/exporting.js",
|
18
|
+
"funnel.src.js" => "highcharts/modules/funnel.js",
|
19
|
+
"heatmap.src.js" => "highcharts/modules/heatmap.js",
|
20
|
+
"map.src.js" => "highcharts/modules/map.js",
|
21
|
+
}
|
22
|
+
dest = "app/assets/javascripts/"
|
23
|
+
Dir.glob("tmp/#{version}/js/**/*.src.js").each do |file|
|
24
|
+
name = File.basename(file)
|
25
|
+
FileUtils.cp file, "#{dest}#{mappings[name]}", verbose: true
|
26
|
+
end
|
27
|
+
FileUtils.cp Dir.glob("tmp/#{version}/js/themes/*.js"), "#{dest}highcharts/themes/", verbose: true
|
28
|
+
FileUtils.cp Dir.glob("tmp/#{version}/graphics/*.png"), "app/assets/images/highcharts", verbose: true
|
29
|
+
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
// @compilation_level SIMPLE_OPTIMIZATIONS
|
3
3
|
|
4
4
|
/**
|
5
|
-
* @license Highcharts JS v3.0.
|
5
|
+
* @license Highcharts JS v3.0.3 (2013-07-31)
|
6
6
|
*
|
7
7
|
* (c) 2009-2013 Torstein Hønsi
|
8
8
|
*
|
@@ -33,8 +33,6 @@ var arrayMin = Highcharts.arrayMin,
|
|
33
33
|
math = Math,
|
34
34
|
mathRound = math.round,
|
35
35
|
mathFloor = math.floor,
|
36
|
-
mathCeil = math.ceil,
|
37
|
-
mathMin = math.min,
|
38
36
|
mathMax = math.max,
|
39
37
|
noop = function () {};/**
|
40
38
|
* The Pane object allows options that are common to a set of X and Y axes.
|
@@ -559,7 +557,7 @@ wrap(tickProto, 'getLabelPosition', function (proceed, x, y, label, horiz, label
|
|
559
557
|
optionsY = labelOptions.y,
|
560
558
|
ret,
|
561
559
|
align = labelOptions.align,
|
562
|
-
angle = (axis.translate(this.pos) + axis.startAngleRad + Math.PI / 2) / Math.PI * 180;
|
560
|
+
angle = ((axis.translate(this.pos) + axis.startAngleRad + Math.PI / 2) / Math.PI * 180) % 360;
|
563
561
|
|
564
562
|
if (axis.isRadial) {
|
565
563
|
ret = axis.getPosition(this.pos, (axis.center[2] / 2) + pick(labelOptions.distance, -25));
|
@@ -697,13 +695,13 @@ seriesTypes.arearange = Highcharts.extendClass(seriesTypes.area, {
|
|
697
695
|
point.y = null;
|
698
696
|
} else if (low === null) {
|
699
697
|
point.plotLow = point.plotY = null;
|
700
|
-
point.plotHigh = yAxis.
|
698
|
+
point.plotHigh = yAxis.translate(high, 0, 1, 0, 1);
|
701
699
|
} else if (high === null) {
|
702
700
|
point.plotLow = plotY;
|
703
701
|
point.plotHigh = null;
|
704
702
|
} else {
|
705
703
|
point.plotLow = plotY;
|
706
|
-
point.plotHigh = yAxis.
|
704
|
+
point.plotHigh = yAxis.translate(high, 0, 1, 0, 1);
|
707
705
|
}
|
708
706
|
});
|
709
707
|
},
|
@@ -873,15 +871,26 @@ seriesTypes.columnrange = extendClass(seriesTypes.arearange, {
|
|
873
871
|
|
874
872
|
// Set plotLow and plotHigh
|
875
873
|
each(series.points, function (point) {
|
876
|
-
var shapeArgs = point.shapeArgs
|
877
|
-
|
874
|
+
var shapeArgs = point.shapeArgs,
|
875
|
+
minPointLength = series.options.minPointLength,
|
876
|
+
heightDifference,
|
877
|
+
height,
|
878
|
+
y;
|
879
|
+
|
878
880
|
point.plotHigh = plotHigh = yAxis.translate(point.high, 0, 1, 0, 1);
|
879
881
|
point.plotLow = point.plotY;
|
880
|
-
|
882
|
+
|
881
883
|
// adjust shape
|
882
|
-
|
883
|
-
|
884
|
-
|
884
|
+
y = plotHigh;
|
885
|
+
height = point.plotY - plotHigh;
|
886
|
+
|
887
|
+
if (height < minPointLength) {
|
888
|
+
heightDifference = (minPointLength - height);
|
889
|
+
height += heightDifference;
|
890
|
+
y -= heightDifference / 2;
|
891
|
+
}
|
892
|
+
shapeArgs.height = height;
|
893
|
+
shapeArgs.y = y;
|
885
894
|
});
|
886
895
|
},
|
887
896
|
trackerGroups: ['group', 'dataLabels'],
|
@@ -891,7 +900,8 @@ seriesTypes.columnrange = extendClass(seriesTypes.arearange, {
|
|
891
900
|
drawTracker: colProto.drawTracker,
|
892
901
|
animate: colProto.animate,
|
893
902
|
getColumnMetrics: colProto.getColumnMetrics
|
894
|
-
})
|
903
|
+
});
|
904
|
+
/*
|
895
905
|
* The GaugeSeries class
|
896
906
|
*/
|
897
907
|
|
@@ -1129,11 +1139,12 @@ defaultPlotOptions.boxplot = merge(defaultPlotOptions.column, {
|
|
1129
1139
|
threshold: null,
|
1130
1140
|
tooltip: {
|
1131
1141
|
pointFormat: '<span style="color:{series.color};font-weight:bold">{series.name}</span><br/>' +
|
1132
|
-
'
|
1133
|
-
'
|
1142
|
+
'Maximum: {point.high}<br/>' +
|
1143
|
+
'Upper quartile: {point.q3}<br/>' +
|
1134
1144
|
'Median: {point.median}<br/>' +
|
1135
|
-
'
|
1136
|
-
'
|
1145
|
+
'Lower quartile: {point.q1}<br/>' +
|
1146
|
+
'Minimum: {point.low}<br/>'
|
1147
|
+
|
1137
1148
|
},
|
1138
1149
|
//whiskerColor: null,
|
1139
1150
|
whiskerLength: '50%',
|
@@ -1421,99 +1432,6 @@ seriesTypes.errorbar = extendClass(seriesTypes.boxplot, {
|
|
1421
1432
|
* Start Waterfall series code *
|
1422
1433
|
*****************************************************************************/
|
1423
1434
|
|
1424
|
-
wrap(axisProto, 'getSeriesExtremes', function (proceed, renew) {
|
1425
|
-
// Run uber method
|
1426
|
-
proceed.call(this, renew);
|
1427
|
-
|
1428
|
-
if (this.isXAxis) {
|
1429
|
-
return;
|
1430
|
-
}
|
1431
|
-
|
1432
|
-
var axis = this,
|
1433
|
-
visitedStacks = [],
|
1434
|
-
resetMinMax = true;
|
1435
|
-
|
1436
|
-
|
1437
|
-
// recalculate extremes for each waterfall stack
|
1438
|
-
each(axis.series, function (series) {
|
1439
|
-
// process only visible, waterfall series, one from each stack
|
1440
|
-
if (!series.visible || !series.stackKey || series.type !== 'waterfall' || HighchartsAdapter.inArray(series.stackKey) !== -1) {
|
1441
|
-
return;
|
1442
|
-
}
|
1443
|
-
|
1444
|
-
// reset previously found dataMin and dataMax, do it only once
|
1445
|
-
if (resetMinMax) {
|
1446
|
-
axis.dataMin = axis.dataMax = null;
|
1447
|
-
resetMinMax = false;
|
1448
|
-
}
|
1449
|
-
|
1450
|
-
|
1451
|
-
var yData = series.processedYData,
|
1452
|
-
yDataLength = yData.length,
|
1453
|
-
seriesDataMin = yData[0],
|
1454
|
-
seriesDataMax = yData[0],
|
1455
|
-
threshold = series.options.threshold,
|
1456
|
-
stacks = axis.stacks,
|
1457
|
-
stackKey = series.stackKey,
|
1458
|
-
negKey = '-' + stackKey,
|
1459
|
-
total,
|
1460
|
-
previous,
|
1461
|
-
key,
|
1462
|
-
i;
|
1463
|
-
|
1464
|
-
|
1465
|
-
// set new stack totals including preceding values, finds new min and max values
|
1466
|
-
for (i = 0; i < yDataLength; i++) {
|
1467
|
-
key = yData[i] < threshold ? negKey : stackKey;
|
1468
|
-
total = stacks[key][i].total;
|
1469
|
-
|
1470
|
-
if (i > threshold) {
|
1471
|
-
total += previous;
|
1472
|
-
stacks[key][i].setTotal(total);
|
1473
|
-
|
1474
|
-
// _cum is used to avoid conflict with Series.translate method
|
1475
|
-
stacks[key][i]._cum = null;
|
1476
|
-
}
|
1477
|
-
|
1478
|
-
|
1479
|
-
// find min / max values
|
1480
|
-
if (total < seriesDataMin) {
|
1481
|
-
seriesDataMin = total;
|
1482
|
-
}
|
1483
|
-
|
1484
|
-
if (total > seriesDataMax) {
|
1485
|
-
seriesDataMax = total;
|
1486
|
-
}
|
1487
|
-
|
1488
|
-
previous = total;
|
1489
|
-
}
|
1490
|
-
|
1491
|
-
|
1492
|
-
// set new extremes
|
1493
|
-
series.dataMin = seriesDataMin;
|
1494
|
-
series.dataMax = seriesDataMax;
|
1495
|
-
axis.dataMin = mathMin(pick(axis.dataMin, seriesDataMin), seriesDataMin, threshold);
|
1496
|
-
axis.dataMax = mathMax(pick(axis.dataMax, seriesDataMax), seriesDataMax, threshold);
|
1497
|
-
|
1498
|
-
// remember series' stack key
|
1499
|
-
visitedStacks.push(series.stackKey);
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
// Adjust to threshold. This code is duplicated from the parent getSeriesExtremes method.
|
1504
|
-
if (typeof threshold === 'number') {
|
1505
|
-
if (axis.dataMin >= threshold) {
|
1506
|
-
axis.dataMin = threshold;
|
1507
|
-
axis.ignoreMinPadding = true;
|
1508
|
-
} else if (axis.dataMax < threshold) {
|
1509
|
-
axis.dataMax = threshold;
|
1510
|
-
axis.ignoreMaxPadding = true;
|
1511
|
-
}
|
1512
|
-
}
|
1513
|
-
});
|
1514
|
-
});
|
1515
|
-
|
1516
|
-
|
1517
1435
|
// 1 - set default options
|
1518
1436
|
defaultPlotOptions.waterfall = merge(defaultPlotOptions.column, {
|
1519
1437
|
lineWidth: 1,
|
@@ -1529,7 +1447,7 @@ seriesTypes.waterfall = extendClass(seriesTypes.column, {
|
|
1529
1447
|
|
1530
1448
|
upColorProp: 'fill',
|
1531
1449
|
|
1532
|
-
pointArrayMap: ['
|
1450
|
+
pointArrayMap: ['low', 'y'],
|
1533
1451
|
|
1534
1452
|
pointValKey: 'y',
|
1535
1453
|
|
@@ -1537,7 +1455,9 @@ seriesTypes.waterfall = extendClass(seriesTypes.column, {
|
|
1537
1455
|
* Init waterfall series, force stacking
|
1538
1456
|
*/
|
1539
1457
|
init: function (chart, options) {
|
1458
|
+
// force stacking
|
1540
1459
|
options.stacking = true;
|
1460
|
+
|
1541
1461
|
seriesTypes.column.prototype.init.call(this, chart, options);
|
1542
1462
|
},
|
1543
1463
|
|
@@ -1551,84 +1471,60 @@ seriesTypes.waterfall = extendClass(seriesTypes.column, {
|
|
1551
1471
|
axis = series.yAxis,
|
1552
1472
|
len,
|
1553
1473
|
i,
|
1554
|
-
|
1555
1474
|
points,
|
1556
1475
|
point,
|
1557
1476
|
shapeArgs,
|
1558
|
-
sum,
|
1559
|
-
sumStart,
|
1560
|
-
subSum,
|
1561
|
-
subSumStart,
|
1562
|
-
edges,
|
1563
|
-
cumulative,
|
1564
|
-
prevStack,
|
1565
|
-
prevY,
|
1566
1477
|
stack,
|
1478
|
+
y,
|
1479
|
+
previousY,
|
1480
|
+
stackPoint,
|
1481
|
+
threshold = options.threshold,
|
1567
1482
|
crispCorr = (options.borderWidth % 2) / 2;
|
1568
1483
|
|
1569
1484
|
// run column series translate
|
1570
1485
|
seriesTypes.column.prototype.translate.apply(this);
|
1571
1486
|
|
1487
|
+
previousY = threshold;
|
1488
|
+
points = series.points;
|
1572
1489
|
|
1573
|
-
|
1574
|
-
subSumStart = sumStart = points[0];
|
1575
|
-
sum = subSum = points[0].y;
|
1576
|
-
|
1577
|
-
for (i = 1, len = points.length; i < len; i++) {
|
1490
|
+
for (i = 0, len = points.length; i < len; i++) {
|
1578
1491
|
// cache current point object
|
1579
1492
|
point = points[i];
|
1580
1493
|
shapeArgs = point.shapeArgs;
|
1581
1494
|
|
1582
|
-
// get current
|
1495
|
+
// get current stack
|
1583
1496
|
stack = series.getStack(i);
|
1584
|
-
|
1585
|
-
prevY = series.getStackY(prevStack);
|
1497
|
+
stackPoint = stack.points[series.index];
|
1586
1498
|
|
1587
|
-
//
|
1588
|
-
if (
|
1589
|
-
|
1590
|
-
subSum = 0;
|
1499
|
+
// override point value for sums
|
1500
|
+
if (isNaN(point.y)) {
|
1501
|
+
point.y = series.yData[i];
|
1591
1502
|
}
|
1592
1503
|
|
1593
|
-
//
|
1594
|
-
|
1595
|
-
|
1596
|
-
subSum += point.y;
|
1597
|
-
}
|
1504
|
+
// up points
|
1505
|
+
y = mathMax(previousY, previousY + point.y) + stackPoint[0];
|
1506
|
+
shapeArgs.y = axis.translate(y, 0, 1);
|
1598
1507
|
|
1599
|
-
// calculate sum points
|
1600
|
-
if (point.isSum || point.isIntermediateSum) {
|
1601
1508
|
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
} else {
|
1607
|
-
edges = series.getSumEdges(sumStart, points[i - 1]);
|
1608
|
-
point.y = sum;
|
1609
|
-
}
|
1610
|
-
|
1611
|
-
shapeArgs.y = point.plotY = edges[1];
|
1612
|
-
shapeArgs.height = edges[0] - edges[1];
|
1509
|
+
// sum points
|
1510
|
+
if (point.isSum || point.isIntermediateSum) {
|
1511
|
+
shapeArgs.y = axis.translate(stackPoint[1], 0, 1);
|
1512
|
+
shapeArgs.height = axis.translate(stackPoint[0], 0, 1) - shapeArgs.y;
|
1613
1513
|
|
1614
|
-
//
|
1514
|
+
// if it's not the sum point, update previous stack end position
|
1615
1515
|
} else {
|
1616
|
-
|
1617
|
-
|
1618
|
-
stack._cum = cumulative + point.y;
|
1619
|
-
|
1620
|
-
if (point.y < 0) {
|
1621
|
-
shapeArgs.y = mathCeil(axis.translate(cumulative, 0, 1)) - crispCorr;
|
1622
|
-
shapeArgs.height = mathCeil(axis.translate(stack._cum, 0, 1) - shapeArgs.y);
|
1623
|
-
} else {
|
1624
|
-
if (prevStack.total + point.y < 0) {
|
1625
|
-
shapeArgs.y = axis.translate(stack._cum, 0, 1);
|
1626
|
-
}
|
1627
|
-
|
1628
|
-
shapeArgs.height = mathFloor(prevY - shapeArgs.y);
|
1629
|
-
}
|
1516
|
+
previousY += stack.total;
|
1517
|
+
}
|
1630
1518
|
|
1519
|
+
// negative points
|
1520
|
+
if (shapeArgs.height < 0) {
|
1521
|
+
shapeArgs.y += shapeArgs.height;
|
1522
|
+
shapeArgs.height *= -1;
|
1631
1523
|
}
|
1524
|
+
|
1525
|
+
point.plotY = shapeArgs.y = mathRound(shapeArgs.y) - crispCorr;
|
1526
|
+
shapeArgs.height = mathRound(shapeArgs.height);
|
1527
|
+
point.yBottom = shapeArgs.y + shapeArgs.height;
|
1632
1528
|
}
|
1633
1529
|
},
|
1634
1530
|
|
@@ -1636,44 +1532,48 @@ seriesTypes.waterfall = extendClass(seriesTypes.column, {
|
|
1636
1532
|
* Call default processData then override yData to reflect waterfall's extremes on yAxis
|
1637
1533
|
*/
|
1638
1534
|
processData: function (force) {
|
1639
|
-
Series.prototype.processData.call(this, force);
|
1640
|
-
|
1641
1535
|
var series = this,
|
1642
1536
|
options = series.options,
|
1643
1537
|
yData = series.yData,
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1538
|
+
points = series.points,
|
1539
|
+
point,
|
1540
|
+
dataLength = yData.length,
|
1541
|
+
threshold = options.threshold || 0,
|
1647
1542
|
subSum,
|
1648
1543
|
sum,
|
1544
|
+
dataMin,
|
1545
|
+
dataMax,
|
1546
|
+
y,
|
1649
1547
|
i;
|
1650
1548
|
|
1651
|
-
|
1652
|
-
|
1653
|
-
for (i = 0; i < length; i++) {
|
1654
|
-
curr = yData[i];
|
1655
|
-
|
1656
|
-
// processed yData only if it's not already processed
|
1657
|
-
if (curr !== null && typeof curr !== 'number') {
|
1549
|
+
sum = subSum = dataMin = dataMax = threshold;
|
1658
1550
|
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
} else if (curr === "intermediateSum") {
|
1663
|
-
yData[i] = null;
|
1664
|
-
subSum = prev;
|
1665
|
-
|
1666
|
-
} else {
|
1667
|
-
yData[i] = curr[0];// + prev;
|
1668
|
-
}
|
1551
|
+
for (i = 0; i < dataLength; i++) {
|
1552
|
+
y = yData[i];
|
1553
|
+
point = points ? points[i] : {};
|
1669
1554
|
|
1670
|
-
|
1555
|
+
if (y === "sum" || point.isSum) {
|
1556
|
+
yData[i] = sum;
|
1557
|
+
} else if (y === "intermediateSum" || point.isIntermediateSum) {
|
1558
|
+
yData[i] = subSum;
|
1559
|
+
subSum = threshold;
|
1560
|
+
} else {
|
1561
|
+
sum += y;
|
1562
|
+
subSum += y;
|
1671
1563
|
}
|
1564
|
+
dataMin = Math.min(sum, dataMin);
|
1565
|
+
dataMax = Math.max(sum, dataMax);
|
1672
1566
|
}
|
1567
|
+
|
1568
|
+
Series.prototype.processData.call(this, force);
|
1569
|
+
|
1570
|
+
// Record extremes
|
1571
|
+
series.dataMin = dataMin;
|
1572
|
+
series.dataMax = dataMax;
|
1673
1573
|
},
|
1674
1574
|
|
1675
1575
|
/**
|
1676
|
-
* Return
|
1576
|
+
* Return y value or string if point is sum
|
1677
1577
|
*/
|
1678
1578
|
toYData: function (pt) {
|
1679
1579
|
if (pt.isSum) {
|
@@ -1682,7 +1582,7 @@ seriesTypes.waterfall = extendClass(seriesTypes.column, {
|
|
1682
1582
|
return "intermediateSum";
|
1683
1583
|
}
|
1684
1584
|
|
1685
|
-
return
|
1585
|
+
return pt.y;
|
1686
1586
|
},
|
1687
1587
|
|
1688
1588
|
/**
|
@@ -1750,6 +1650,14 @@ seriesTypes.waterfall = extendClass(seriesTypes.column, {
|
|
1750
1650
|
return path;
|
1751
1651
|
},
|
1752
1652
|
|
1653
|
+
/**
|
1654
|
+
* Extremes are recorded in processData
|
1655
|
+
*/
|
1656
|
+
getExtremes: noop,
|
1657
|
+
|
1658
|
+
/**
|
1659
|
+
* Return stack for given index
|
1660
|
+
*/
|
1753
1661
|
getStack: function (i) {
|
1754
1662
|
var axis = this.yAxis,
|
1755
1663
|
stacks = axis.stacks,
|
@@ -1762,31 +1670,6 @@ seriesTypes.waterfall = extendClass(seriesTypes.column, {
|
|
1762
1670
|
return stacks[key][i];
|
1763
1671
|
},
|
1764
1672
|
|
1765
|
-
getStackY: function (stack) {
|
1766
|
-
return mathCeil(this.yAxis.translate(stack.total, null, true));
|
1767
|
-
},
|
1768
|
-
|
1769
|
-
/**
|
1770
|
-
* Return array of top and bottom position for sum column based on given edge points
|
1771
|
-
*/
|
1772
|
-
getSumEdges: function (pointA, pointB) {
|
1773
|
-
var valueA,
|
1774
|
-
valueB,
|
1775
|
-
tmp,
|
1776
|
-
threshold = this.options.threshold;
|
1777
|
-
|
1778
|
-
valueA = pointA.y >= threshold ? pointA.shapeArgs.y + pointA.shapeArgs.height : pointA.shapeArgs.y;
|
1779
|
-
valueB = pointB.y >= threshold ? pointB.shapeArgs.y : pointB.shapeArgs.y + pointB.shapeArgs.height;
|
1780
|
-
|
1781
|
-
if (valueB > valueA) {
|
1782
|
-
tmp = valueA;
|
1783
|
-
valueA = valueB;
|
1784
|
-
valueB = tmp;
|
1785
|
-
}
|
1786
|
-
|
1787
|
-
return [valueA, valueB];
|
1788
|
-
},
|
1789
|
-
|
1790
1673
|
drawGraph: Series.prototype.drawGraph
|
1791
1674
|
});
|
1792
1675
|
|
@@ -1819,6 +1702,7 @@ defaultPlotOptions.bubble = merge(defaultPlotOptions.scatter, {
|
|
1819
1702
|
tooltip: {
|
1820
1703
|
pointFormat: '({point.x}, {point.y}), Size: {point.z}'
|
1821
1704
|
},
|
1705
|
+
turboThreshold: 0, // docs: exclude from bubbles
|
1822
1706
|
zThreshold: 0
|
1823
1707
|
});
|
1824
1708
|
|
@@ -1976,7 +1860,8 @@ seriesTypes.bubble = extendClass(seriesTypes.scatter, {
|
|
1976
1860
|
radius
|
1977
1861
|
).attr({
|
1978
1862
|
zIndex: 3
|
1979
|
-
}).add(item.legendGroup);
|
1863
|
+
}).add(item.legendGroup);
|
1864
|
+
item.legendSymbol.isMarker = true;
|
1980
1865
|
|
1981
1866
|
},
|
1982
1867
|
|
@@ -2108,7 +1993,7 @@ seriesProto.toXY = function (point) {
|
|
2108
1993
|
point.rectPlotY = plotY;
|
2109
1994
|
|
2110
1995
|
// Record the angle in degrees for use in tooltip
|
2111
|
-
point.clientX = plotX / Math.PI * 180;
|
1996
|
+
point.clientX = ((plotX / Math.PI * 180) + this.xAxis.pane.options.startAngle) % 360;
|
2112
1997
|
|
2113
1998
|
// Find the polar plotX and plotY
|
2114
1999
|
xy = this.xAxis.postTranslate(point.plotX, this.yAxis.len - plotY);
|
@@ -2116,6 +2001,22 @@ seriesProto.toXY = function (point) {
|
|
2116
2001
|
point.plotY = point.polarPlotY = xy.y - chart.plotTop;
|
2117
2002
|
};
|
2118
2003
|
|
2004
|
+
/**
|
2005
|
+
* Order the tooltip points to get the mouse capture ranges correct. #1915.
|
2006
|
+
*/
|
2007
|
+
seriesProto.orderTooltipPoints = function (points) {
|
2008
|
+
if (this.chart.polar) {
|
2009
|
+
points.sort(function (a, b) {
|
2010
|
+
return a.clientX - b.clientX;
|
2011
|
+
});
|
2012
|
+
|
2013
|
+
// Wrap mouse tracking around to capture movement on the segment to the left
|
2014
|
+
// of the north point (#1469).
|
2015
|
+
points[0].wrappedClientX = points[0].clientX + 360;
|
2016
|
+
points.push(points[0]);
|
2017
|
+
}
|
2018
|
+
};
|
2019
|
+
|
2119
2020
|
|
2120
2021
|
/**
|
2121
2022
|
* Add some special init logic to areas and areasplines
|