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:
authorBeezyT <timo@ezdesign.de>2011-05-26 13:28:38 +0400
committerBeezyT <timo@ezdesign.de>2011-05-26 13:28:38 +0400
commit028e627442194fa754c83483c937f33450f07302 (patch)
tree82dffd132526b9efe58297cc5779faaf99d4d2fd /libs/jqplot
parent139f5a50c2cbbe37a806167a04e847feda4027c7 (diff)
refs #2431 ofc removed. perfomance improvements. request size optimizations. general refactorings.
git-svn-id: http://dev.piwik.org/svn/trunk@4813 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/jqplot')
-rw-r--r--libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js b/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js
index 4771c1a617..4d840a0e70 100644
--- a/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js
+++ b/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js
@@ -131,7 +131,23 @@
ropts.pt2px = this.pt2px;
}
- this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts);
+ if (this.enableFontSupport) {
+
+ function support_canvas_text() {
+ return !!(document.createElement('canvas').getContext && typeof document.createElement('canvas').getContext('2d').fillText == 'function');
+ }
+
+ if (support_canvas_text()) {
+ this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts);
+ }
+
+ else {
+ this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts);
+ }
+ }
+ else {
+ this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts);
+ }
};
$.jqplot.CanvasAxisTickRenderer.prototype.init = function(options) {