mirror of https://github.com/masayuki0812/c3.git
Quite good looking graph derived from d3.js
http://c3js.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
335 B
12 lines
335 B
11 years ago
|
c3_chart_internal_fn.getTextRect = function (text, cls) {
|
||
|
var rect;
|
||
|
this.d3.select('body').selectAll('.dummy')
|
||
|
.data([text])
|
||
|
.enter().append('text')
|
||
|
.classed(cls ? cls : "", true)
|
||
|
.text(text)
|
||
|
.each(function () { rect = this.getBoundingClientRect(); })
|
||
|
.remove();
|
||
|
return rect;
|
||
|
};
|