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.

53 lines
1.9 KiB

c3_chart_internal_fn.getClipPath = function (id) {
var isIE9 = window.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0;
return "url(" + (isIE9 ? "" : document.URL.split('#')[0]) + "#" + id + ")";
};
c3_chart_internal_fn.getAxisClipX = function (forHorizontal) {
// axis line width + padding for left
return forHorizontal ? -(1 + 30) : -(this.margin.left - 1);
};
c3_chart_internal_fn.getAxisClipY = function (forHorizontal) {
return forHorizontal ? -20 : -4;
};
c3_chart_internal_fn.getXAxisClipX = function () {
var $$ = this;
return $$.getAxisClipX(!$$.config[__axis_rotated]);
};
c3_chart_internal_fn.getXAxisClipY = function () {
var $$ = this;
return $$.getAxisClipY(!$$.config[__axis_rotated]);
};
c3_chart_internal_fn.getYAxisClipX = function () {
var $$ = this;
return $$.getAxisClipX($$.config[__axis_rotated]);
};
c3_chart_internal_fn.getYAxisClipY = function () {
var $$ = this;
return $$.getAxisClipY($$.config[__axis_rotated]);
};
c3_chart_internal_fn.getAxisClipWidth = function (forHorizontal) {
var $$ = this;
// width + axis line width + padding for left/right
return forHorizontal ? $$.width + 2 + 30 + 30 : $$.margin.left + 20;
};
c3_chart_internal_fn.getAxisClipHeight = function (forHorizontal) {
var $$ = this, config = $$.config;
return forHorizontal ? (config[__axis_x_height] ? config[__axis_x_height] : 0) + 80 : $$.height + 8;
};
c3_chart_internal_fn.getXAxisClipWidth = function () {
var $$ = this;
return $$.getAxisClipWidth(!$$.config[__axis_rotated]);
};
c3_chart_internal_fn.getXAxisClipHeight = function () {
var $$ = this;
return $$.getAxisClipHeight(!$$.config[__axis_rotated]);
};
c3_chart_internal_fn.getYAxisClipWidth = function () {
var $$ = this;
return $$.getAxisClipWidth($$.config[__axis_rotated]);
};
c3_chart_internal_fn.getYAxisClipHeight = function () {
var $$ = this;
return $$.getAxisClipHeight($$.config[__axis_rotated]);
};