Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vladminsky committed Jan 23, 2015
1 parent dc82611 commit 65b746e
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 56 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tauCharts",
"version": "0.3.8",
"version": "0.3.9",
"homepage": "https://github.com/TargetProcess/tauCharts",
"description": "Simple charts library based on d3",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion build/development/plugins/tauCharts.export.js
Original file line number Diff line number Diff line change
Expand Up @@ -5999,7 +5999,7 @@ define('../node_modules/requirejs-text/text',['module'], function (module) {
});


define('../node_modules/requirejs-text/text!print.style.css',[],function () { return 'body > * {\n visibility: hidden;\n}\nbody {\n overflow: hidden;\n}\nbody * {\n visibility: hidden !important;\n}\n\n.graphical-report__print-block {\n position: absolute;\n top: 0;\n left: 0;\n visibility: visible !important;\n display: block;\n width: 100%;\n /*height: 100%;*/\n}\n';});
define('../node_modules/requirejs-text/text!print.style.css',[],function () { return 'body > * {\r\n visibility: hidden;\r\n}\r\nbody {\r\n overflow: hidden;\r\n}\r\nbody * {\r\n visibility: hidden !important;\r\n}\r\n\r\n.graphical-report__print-block {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n visibility: visible !important;\r\n display: block;\r\n width: 100%;\r\n /*height: 100%;*/\r\n}\r\n';});

(function() {

Expand Down
4 changes: 3 additions & 1 deletion build/development/plugins/tauCharts.tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@
} else {
var format = lastGuide.tickPeriod || lastGuide.tickFormat;
if (format) {
return tauCharts.api.tickFormat.get(format)(rawValue);
// very special case for dates
var xFormat = (format === 'x-time-auto') ? 'day' : format;
return tauCharts.api.tickFormat.get(xFormat)(rawValue);
} else if (lastGuide.tickLabel) {
return rawValue[lastGuide.tickLabel];
} else if (dimensions[key].value) {
Expand Down
44 changes: 2 additions & 42 deletions build/development/tauCharts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! taucharts - v0.3.8 - 2015-01-23
/*! taucharts - v0.3.9 - 2015-01-23
* https://github.com/TargetProcess/tauCharts
* Copyright (c) 2015 Taucraft Limited; Licensed Apache License 2.0 */
(function (root, factory) {
Expand Down Expand Up @@ -2164,37 +2164,6 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw",
var dimType = dim.dimType;
var scaleType = dim.scaleType;
var specifier = "*";
if (dimType === "measure" && scaleType === "time") {
var src = meta.source.filter(function (x) {
return x !== null;
}).sort();
var resolutionAvg = 0;
if (src.length > 1) {
var i = 1;
var l = src.length;
var m = [];
while (i < l) {
m.push(src[i] - src[i - 1]);
++i;
}

var s = m.reduce(function (sum, x) {
sum += x;
return sum;
}, 0);

resolutionAvg = s / m.length;
}

var resolutions = [[1000 * 60 * 60 * 24 * 365, "year"], [1000 * 60 * 60 * 24 * 30 * 3, "quarter"], [1000 * 60 * 60 * 24 * 30, "month"], [1000 * 60 * 60 * 24 * 7, "week"], [1000 * 60 * 60 * 24, "day"], [1000 * 60 * 60, "hour"], [1000 * 60, "min"], [1000, "sec"], [0, "ms"]];

var r = -1;
do {
++r;
} while (resolutions[r][0] > resolutionAvg);

specifier = resolutions[r][1];
}

var key = [dimType, scaleType, specifier].join(":");
var tag = [dimType, scaleType].join(":");
Expand Down Expand Up @@ -5187,16 +5156,7 @@ define('tau.newCharts',["exports", "./utils/utils-dom", "./charts/tau.plot", "./

defaultFormats: {
measure: "x-num-auto",
"measure:time": "x-time-auto",
"measure:time:year": "year",
"measure:time:quarter": "quarter",
"measure:time:month": "month",
"measure:time:week": "x-time-auto",
"measure:time:day": "x-time-auto",
"measure:time:hour": "x-time-auto",
"measure:time:min": "x-time-auto",
"measure:time:sec": "x-time-auto",
"measure:time:ms": "x-time-auto"
"measure:time": "x-time-auto"
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion build/production/tauCharts.min.css

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions build/production/tauCharts.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tauCharts",
"version": "0.3.8",
"version": "0.3.9",
"ignore": [
"/*",
"!build/**",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taucharts",
"version": "0.3.8",
"version": "0.3.9",
"homepage": "https://github.com/TargetProcess/tauCharts",
"description": "Simple charts library based on d3",
"author": {
Expand Down

0 comments on commit 65b746e

Please sign in to comment.