diff --git a/c3.js b/c3.js
index ad99551..c784b61 100644
--- a/c3.js
+++ b/c3.js
@@ -1,6 +1,3 @@
-/**
- * c3.core.js
- */
(function (window) {
'use strict';
@@ -23,7 +20,7 @@
$$.data = {};
$$.cache = {};
$$.axes = {};
- };
+ }
c3.generate = function (config) {
return new Chart(config);
@@ -42,7 +39,7 @@
/**
* c3.config.js
*/
- c3.chart.internal.fn.config = {
+ c3_chart_internal_fn.config = {
bindto: '#chart',
size_width: undefined,
size_height: undefined,
@@ -232,23 +229,24 @@
tooltip_format_name: undefined,
tooltip_format_value: undefined,
tooltip_contents: function (d, defaultTitleFormat, defaultValueFormat, color) {
- var titleFormat = this.config.tooltip_format_title || defaultTitleFormat,
- nameFormat = this.config.tooltip_format_name || function (name) { return name; },
- valueFormat = this.config.tooltip_format_value || defaultValueFormat,
+ var $$ = this,
+ titleFormat = $$.config.tooltip_format_title || defaultTitleFormat,
+ nameFormat = $$.config.tooltip_format_name || function (name) { return name; },
+ valueFormat = $$.config.tooltip_format_value || defaultValueFormat,
text, i, title, value, name, bgcolor;
for (i = 0; i < d.length; i++) {
if (! (d[i] && (d[i].value || d[i].value === 0))) { continue; }
if (! text) {
title = titleFormat ? titleFormat(d[i].x) : d[i].x;
- text = "