Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Winkler <github@lw1.at>2018-06-18 16:36:21 +0300
committerStefan Giehl <stefan@piwik.org>2018-06-18 16:36:21 +0300
commitcfe8dfd864de80a65ed891fedd3133e742c21458 (patch)
treee43cab6f4e16c012421738c6933f8e267fa295fb /plugins/CoreHome/javascripts/sparkline.js
parent9e59d0097bd9f6b8dafa36b68726d8a7412e955f (diff)
replace sparkline library with modern equivalent (#12066)
* replace sparkline library with modern equivalent * test setting $enableSparklineImages to true for UI tests * update LEGALNOTICE * add minimum and maximum dots * further improve sparklines - no minimum/maximum if they are the same - add offset to the top so that maximum isn't stuck at the border - doubled resolution of image as it was a bit blurry and it's still <1.5KB * fix display size of sparklines * make Sparklines red * fix sparkline size in rowEvoluton * change line colors to black * lastPoint and padding * update Sparkline to new version * remove possibility to disable sparklines ($enableSparklineImages) * handle formatted numbers * Updates UI files
Diffstat (limited to 'plugins/CoreHome/javascripts/sparkline.js')
-rw-r--r--plugins/CoreHome/javascripts/sparkline.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CoreHome/javascripts/sparkline.js b/plugins/CoreHome/javascripts/sparkline.js
index 887023ba89..157fc15b13 100644
--- a/plugins/CoreHome/javascripts/sparkline.js
+++ b/plugins/CoreHome/javascripts/sparkline.js
@@ -7,7 +7,10 @@
(function ($) {
-var sparklineColorNames = ['backgroundColor', 'lineColor', 'minPointColor', 'maxPointColor', 'lastPointColor'];
+var sparklineColorNames = ['backgroundColor', 'lineColor', 'minPointColor', 'maxPointColor', 'lastPointColor', 'fillColor'];
+
+var sparklineDisplayHeight = 25;
+var sparklineDisplayWidth = 100;
piwik.getSparklineColors = function () {
return piwik.ColorManager.getColors('sparkline-colors', sparklineColorNames);
@@ -30,6 +33,8 @@ piwik.initSparklines = function() {
if (token_auth.length) {
appendToSparklineUrl += '&token_auth=' + token_auth;
}
+ $self.attr('width', sparklineDisplayWidth);
+ $self.attr('height', sparklineDisplayHeight);
$self.attr('src', $self.attr('data-src') + appendToSparklineUrl);
});
};