Skip to content

Commit

Permalink
release 0.2.17
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantin committed Dec 17, 2014
1 parent c4e884d commit e6d1e3e
Show file tree
Hide file tree
Showing 11 changed files with 607 additions and 577 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.2.16",
"version": "0.2.17",
"homepage": "https://github.com/TargetProcess/tauCharts",
"description": "Simple charts library based on d3",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion build/plugins/tauCharts.legend.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions build/plugins/tauCharts.tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
var _ = tauCharts.api._;
var d3 = tauCharts.api.d3;
var dim = function (x0, x1, y0, y1) {
return Math.sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));
};
return Math.sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));
};

function tooltip(settings) {
settings = settings || {};
return {
Expand All @@ -41,7 +42,8 @@
if (this.circle) {
this.circle.remove();
}
this.circle = container.append("circle")
this.circle = container
.append("circle")
.attr("cx", x)
.attr("cy", y)
.attr('class', color)
Expand All @@ -53,6 +55,10 @@
this._hide();
}.bind(this), false);
},
formatters:{},
_getFormatter:function(field){
return this.formatters[field] || _.identity;
},
init: function (chart) {
this._chart = chart;
this._dataFields = settings.fields;
Expand Down Expand Up @@ -101,11 +107,11 @@
var value = (_.isNull(v) || _.isUndefined(v)) ? ('No ' + field) : v;
return this._templateItem({
label: field,
value: value
value: this._getFormatter(field)(value)
});
}, this).join('');
},
onRender:function(){
onRender: function () {
this._hide();
},
_exclude: function () {
Expand Down Expand Up @@ -214,7 +220,7 @@
var placeCoord = d3.mouse(document.body);
var coord = d3.mouse(data.element);
clearTimeout(this._timeoutShowId);
this._timeoutShowId = _.delay(this._onElementMouseOver.bind(this),200, chart, data, coord, placeCoord);
this._timeoutShowId = _.delay(this._onElementMouseOver.bind(this), 200, chart, data, coord, placeCoord);
},
onElementMouseOut: function (mouseСoord, placeCoord) {
this._hide();
Expand Down
4 changes: 2 additions & 2 deletions build/plugins/tauCharts.tooltip.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e6d1e3e

Please sign in to comment.