guy 7 years ago
parent
commit
4554c2b0b0
  1. 2596
      dist/base.js
  2. 4822
      dist/bundle.js
  3. 20
      dist/bundle.min.js
  4. 918
      dist/case.js
  5. 1327
      dist/chart.js
  6. 4
      dist/core.js
  7. 27
      dist/polyfill.js
  8. 104
      dist/router.js
  9. 1202
      dist/widget.js
  10. 8
      src/addons/chart/chart.combine.js
  11. 6
      src/addons/chart/chart.js
  12. 50
      src/addons/chart/chart/chart.abstract.js
  13. 22
      src/addons/chart/chart/chart.accumulatearea.js
  14. 28
      src/addons/chart/chart/chart.accumulateaxis.js
  15. 32
      src/addons/chart/chart/chart.accumulatebar.js
  16. 16
      src/addons/chart/chart/chart.accumulateradar.js
  17. 28
      src/addons/chart/chart/chart.area.js
  18. 28
      src/addons/chart/chart/chart.axis.js
  19. 30
      src/addons/chart/chart/chart.bar.js
  20. 63
      src/addons/chart/chart/chart.bubble.js
  21. 28
      src/addons/chart/chart/chart.comparearea.js
  22. 30
      src/addons/chart/chart/chart.compareaxis.js
  23. 30
      src/addons/chart/chart/chart.comparebar.js
  24. 74
      src/addons/chart/chart/chart.dashboard.js
  25. 8
      src/addons/chart/chart/chart.donut.js
  26. 40
      src/addons/chart/chart/chart.fallaxis.js
  27. 10
      src/addons/chart/chart/chart.forcebubble.js
  28. 20
      src/addons/chart/chart/chart.gismap.js
  29. 28
      src/addons/chart/chart/chart.line.js
  30. 52
      src/addons/chart/chart/chart.map.js
  31. 54
      src/addons/chart/chart/chart.multiaxis.js
  32. 54
      src/addons/chart/chart/chart.multiaxiscombine.js
  33. 28
      src/addons/chart/chart/chart.percentaccumulatearea.js
  34. 26
      src/addons/chart/chart/chart.percentaccumulateaxis.js
  35. 14
      src/addons/chart/chart/chart.pie.js
  36. 16
      src/addons/chart/chart/chart.radar.js
  37. 28
      src/addons/chart/chart/chart.rangearea.js
  38. 56
      src/addons/chart/chart/chart.scatter.js
  39. 366
      src/addons/chart/factory.charts.js
  40. 6
      src/base/canvas/canvas.js
  41. 10
      src/base/collection/collection.js
  42. 20
      src/base/combination/combo.js
  43. 10
      src/base/combination/expander.js
  44. 18
      src/base/combination/group.button.js
  45. 8
      src/base/combination/group.combo.js
  46. 6
      src/base/combination/group.virtual.js
  47. 8
      src/base/combination/loader.js
  48. 2
      src/base/combination/navigation.js
  49. 10
      src/base/combination/searcher.js
  50. 12
      src/base/combination/switcher.js
  51. 4
      src/base/combination/tab.js
  52. 2
      src/base/combination/tree.button.js
  53. 4
      src/base/el.js
  54. 1228
      src/base/formula/codemirror/codemirror.js
  55. 2
      src/base/formula/codemirror/formula-hint.js
  56. 10
      src/base/formula/codemirror/formula-mode.js
  57. 55
      src/base/formula/codemirror/show-hint.js
  58. 2
      src/base/formula/config.js
  59. 14
      src/base/formula/formulaeditor.js
  60. 54
      src/base/foundation/message.js
  61. 16
      src/base/grid/grid.js
  62. 22
      src/base/layer/layer.floatbox.js
  63. 18
      src/base/layer/layer.popup.js
  64. 2
      src/base/layer/layer.searcher.js
  65. 4
      src/base/list/listview.js
  66. 4
      src/base/list/virtuallist.js
  67. 16
      src/base/pager/pager.js
  68. 6
      src/base/pane.js
  69. 2
      src/base/single/a/a.js
  70. 16
      src/base/single/bar/bar.loading.js
  71. 2
      src/base/single/button/button.basic.js
  72. 4
      src/base/single/button/button.node.js
  73. 10
      src/base/single/button/buttons/button.icon.js
  74. 6
      src/base/single/button/buttons/button.image.js
  75. 10
      src/base/single/button/buttons/button.js
  76. 2
      src/base/single/button/buttons/button.text.js
  77. 4
      src/base/single/button/listitem/blankiconicontextitem.js
  78. 8
      src/base/single/button/listitem/blankicontexticonitem.js
  79. 6
      src/base/single/button/listitem/blankicontextitem.js
  80. 10
      src/base/single/button/listitem/icontexticonitem.js
  81. 2
      src/base/single/button/listitem/icontextitem.js
  82. 2
      src/base/single/button/listitem/texticonitem.js
  83. 2
      src/base/single/button/listitem/textitem.js
  84. 10
      src/base/single/button/node/icontexticonnode.js
  85. 6
      src/base/single/button/node/icontextnode.js
  86. 4
      src/base/single/button/node/texticonnode.js
  87. 2
      src/base/single/button/node/textnode.js
  88. 14
      src/base/single/editor/editor.code.js
  89. 14
      src/base/single/editor/editor.js
  90. 2
      src/base/single/editor/editor.multifile.js
  91. 12
      src/base/single/editor/editor.textarea.js
  92. 2
      src/base/single/icon/icon.js
  93. 6
      src/base/single/iframe/iframe.js
  94. 2
      src/base/single/img/img.js
  95. 2
      src/base/single/input/checkbox.js
  96. 2
      src/base/single/input/input.js
  97. 2
      src/base/single/input/radio.js
  98. 10
      src/base/single/label/label.js
  99. 2
      src/base/single/link/link.js
  100. 2
      src/base/single/single.js
  101. Some files were not shown because too many files have changed in this diff Show More

2596
dist/base.js vendored

File diff suppressed because one or more lines are too long

4822
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

20
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

918
dist/case.js vendored

File diff suppressed because it is too large Load Diff

1327
dist/chart.js vendored

File diff suppressed because it is too large Load Diff

4
dist/core.js vendored

@ -25715,7 +25715,7 @@ Data.Constant = BICst = {};
* 缓冲池
* @type {{Buffer: {}}}
*/
;
(function () {
var Buffer = {};
var MODE = false;// 设置缓存模式为关闭
@ -25736,7 +25736,7 @@ Data.Constant = BICst = {};
* 共享池
* @type {{Shared: {}}}
*/
;
(function () {
var _Shared = {};
Data.SharingPool = {

27
dist/polyfill.js vendored

@ -8,7 +8,7 @@ if (!Array.prototype.indexOf) {
// 1. Let o be the result of calling ToObject passing
// the this value as the argument.
if (this == null) {
throw new TypeError('"this" is null or not defined');
throw new TypeError("\"this\" is null or not defined");
}
var o = Object(this);
@ -61,7 +61,7 @@ if (!Array.prototype.indexOf) {
}
if (!Array.prototype.lastIndexOf) {
Array.prototype.lastIndexOf = function (searchElement /* , fromIndex*/) {
'use strict';
"use strict";
if (this === void 0 || this === null) {
throw new TypeError();
@ -79,8 +79,7 @@ if (!Array.prototype.lastIndexOf) {
n = Number(arguments[1]);
if (n != n) {
n = 0;
}
else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {
} else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));
}
}
@ -127,29 +126,29 @@ window.localStorage || (window.localStorage = {
clear: function () {
this.items = {};
}
});if (typeof Set !== 'undefined' && Set.toString().match(/native code/)) {
});if (typeof Set !== "undefined" && Set.toString().match(/native code/)) {
} else {
Set = function () {
this.set = {}
this.set = {};
};
Set.prototype.has = function (key) {
return this.set[key] !== undefined;
};
Set.prototype.add = function (key) {
this.set[key] = 1
this.set[key] = 1;
};
Set.prototype.clear = function () {
this.set = {}
this.set = {};
};
}// 修复ie9下sort方法的bug
;!function (window) {
!function (window) {
var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) {
var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === 'function') {
if (!!fn && typeof fn === "function") {
if (this.length < 2) {
return this;
}
@ -157,8 +156,8 @@ window.localStorage || (window.localStorage = {
for (; i < l; i++) {
for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]);
r = (typeof t === 'number' ? t :
!!t ? 1 : 0) > 0;
r = (typeof t === "number" ? t :
t ? 1 : 0) > 0;
if (r === true) {
tmp = this[i];
this[i] = this[j];
@ -167,9 +166,9 @@ window.localStorage || (window.localStorage = {
}
}
return this;
} else {
return _sort.call(this);
}
return _sort.call(this);
};
}
}(window);

104
dist/router.js vendored

@ -1,10 +1,10 @@
;(function(){
(function () {
var Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind
// the callback to all events fired.
on: function (name, callback, context) {
if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
if (!eventsApi(this, "on", name, [callback, context]) || !callback) return this;
this._events || (this._events = {});
var events = this._events[name] || (this._events[name] = []);
events.push({callback: callback, context: context, ctx: context || this});
@ -14,7 +14,7 @@
// Bind an event to only be triggered a single time. After the first time
// the callback is invoked, it will be removed.
once: function (name, callback, context) {
if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
if (!eventsApi(this, "once", name, [callback, context]) || !callback) return this;
var self = this;
var once = _.once(function () {
self.off(name, once);
@ -29,7 +29,7 @@
// callbacks for the event. If `name` is null, removes all bound
// callbacks for all events.
off: function (name, callback, context) {
if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
if (!this._events || !eventsApi(this, "off", name, [callback, context])) return this;
// Remove all callbacks for all events.
if (!name && !callback && !context) {
@ -86,7 +86,7 @@
trigger: function (name) {
if (!this._events) return this;
var args = slice.call(arguments, 1);
if (!eventsApi(this, 'trigger', name, args)) return this;
if (!eventsApi(this, "trigger", name, args)) return this;
var events = this._events[name];
var allEvents = this._events.all;
if (events) triggerEvents(events, args);
@ -103,15 +103,15 @@
// listening to.
listenTo: function (obj, name, callback) {
var listeningTo = this._listeningTo || (this._listeningTo = {});
var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
var id = obj._listenId || (obj._listenId = _.uniqueId("l"));
listeningTo[id] = obj;
if (!callback && typeof name === 'object') callback = this;
if (!callback && typeof name === "object") callback = this;
obj.on(name, callback, this);
return this;
},
listenToOnce: function (obj, name, callback) {
if (typeof name === 'object') {
if (typeof name === "object") {
for (var event in name) this.listenToOnce(obj, event, name[event]);
return this;
}
@ -137,7 +137,7 @@
var listeningTo = this._listeningTo;
if (!listeningTo) return this;
var remove = !name && !callback;
if (!callback && typeof name === 'object') callback = this;
if (!callback && typeof name === "object") callback = this;
if (obj) (listeningTo = {})[obj._listenId] = obj;
for (var id in listeningTo) {
obj = listeningTo[id];
@ -159,7 +159,7 @@
if (!name) return true;
// Handle event maps.
if (typeof name === 'object') {
if (typeof name === "object") {
for (var key in name) {
obj[action].apply(obj, [key, name[key]].concat(rest));
}
@ -239,16 +239,16 @@
if (!_.isRegExp(route)) route = this._routeToRegExp(route);
if (_.isFunction(name)) {
callback = name;
name = '';
name = "";
}
if (!callback) callback = this[name];
var router = this;
BI.history.route(route, function (fragment) {
var args = router._extractParameters(route, fragment);
if (router.execute(callback, args, name) !== false) {
router.trigger.apply(router, ['route:' + name].concat(args));
router.trigger('route', name, args);
BI.history.trigger('route', router, name, args);
router.trigger.apply(router, ["route:" + name].concat(args));
router.trigger("route", name, args);
BI.history.trigger("route", router, name, args);
}
});
return this;
@ -271,7 +271,7 @@
// routes can be defined at the bottom of the route map.
_bindRoutes: function () {
if (!this.routes) return;
this.routes = _.result(this, 'routes');
this.routes = _.result(this, "routes");
var route, routes = _.keys(this.routes);
while ((route = routes.pop()) != null) {
this.route(route, this.routes[route]);
@ -281,13 +281,13 @@
// Convert a route string into a regular expression, suitable for matching
// against the current location hash.
_routeToRegExp: function (route) {
route = route.replace(escapeRegExp, '\\$&')
.replace(optionalParam, '(?:$1)?')
route = route.replace(escapeRegExp, "\\$&")
.replace(optionalParam, "(?:$1)?")
.replace(namedParam, function (match, optional) {
return optional ? match : '([^/?]+)';
return optional ? match : "([^/?]+)";
})
.replace(splatParam, '([^?]*?)');
return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
.replace(splatParam, "([^?]*?)");
return new RegExp("^" + route + "(?:\\?([\\s\\S]*))?$");
},
// Given a route, and a URL fragment that it matches, return the array of
@ -314,10 +314,10 @@
// falls back to polling.
var History = function () {
this.handlers = [];
_.bindAll(this, 'checkUrl');
_.bindAll(this, "checkUrl");
// Ensure that `History` can be used outside of the browser.
if (typeof window !== 'undefined') {
if (typeof window !== "undefined") {
this.location = window.location;
this.history = window.history;
}
@ -344,22 +344,22 @@
// Are we at the app root?
atRoot: function () {
var path = this.location.pathname.replace(/[^\/]$/, '$&/');
var path = this.location.pathname.replace(/[^\/]$/, "$&/");
return path === this.root && !this.getSearch();
},
// In IE6, the hash fragment and search params are incorrect if the
// fragment contains `?`.
getSearch: function () {
var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
return match ? match[0] : '';
var match = this.location.href.replace(/#.*/, "").match(/\?.+/);
return match ? match[0] : "";
},
// Gets the true hash value. Cannot use location.hash directly due to bug
// in Firefox where location.hash will always be decoded.
getHash: function (window) {
var match = (window || this).location.href.match(/#(.*)$/);
return match ? match[1] : '';
return match ? match[1] : "";
},
// Get the pathname and search params, without the root.
@ -367,7 +367,7 @@
var path = decodeURI(this.location.pathname + this.getSearch());
var root = this.root.slice(0, -1);
if (!path.indexOf(root)) path = path.slice(root.length);
return path.charAt(0) === '/' ? path.slice(1) : path;
return path.charAt(0) === "/" ? path.slice(1) : path;
},
// Get the cross-browser normalized URL fragment from the path or hash.
@ -379,27 +379,27 @@
fragment = this.getHash();
}
}
return fragment.replace(routeStripper, '');
return fragment.replace(routeStripper, "");
},
// Start the hash change handling, returning `true` if the current URL matches
// an existing route, and `false` otherwise.
start: function (options) {
if (History.started) throw new Error('BI.history has already been started');
if (History.started) throw new Error("BI.history has already been started");
History.started = true;
// Figure out the initial configuration. Do we need an iframe?
// Is pushState desired ... is it available?
this.options = _.extend({root: '/'}, this.options, options);
this.options = _.extend({root: "/"}, this.options, options);
this.root = this.options.root;
this._wantsHashChange = this.options.hashChange !== false;
this._hasHashChange = 'onhashchange' in window;
this._hasHashChange = "onhashchange" in window;
this._wantsPushState = !!this.options.pushState;
this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
this.fragment = this.getFragment();
// Normalize root to always include a leading and trailing slash.
this.root = ('/' + this.root + '/').replace(rootStripper, '/');
this.root = ("/" + this.root + "/").replace(rootStripper, "/");
// Transition from hashChange to pushState or vice versa if both are
// requested.
@ -408,8 +408,8 @@
// If we've started off with a route from a `pushState`-enabled
// browser, but we're currently in a browser that doesn't support it...
if (!this._hasPushState && !this.atRoot()) {
var root = this.root.slice(0, -1) || '/';
this.location.replace(root + '#' + this.getPath());
var root = this.root.slice(0, -1) || "/";
this.location.replace(root + "#" + this.getPath());
// Return immediately as browser will do redirect to new url
return true;
@ -425,28 +425,28 @@
// support the `hashchange` event, HTML5 history, or the user wants
// `hashChange` but not `pushState`.
if (!this._hasHashChange && this._wantsHashChange && (!this._wantsPushState || !this._hasPushState)) {
var iframe = document.createElement('iframe');
iframe.src = 'javascript:0';
iframe.style.display = 'none';
var iframe = document.createElement("iframe");
iframe.src = "javascript:0";
iframe.style.display = "none";
iframe.tabIndex = -1;
var body = document.body;
// Using `appendChild` will throw on IE < 9 if the document is not ready.
this.iframe = body.insertBefore(iframe, body.firstChild).contentWindow;
this.iframe.document.open().close();
this.iframe.location.hash = '#' + this.fragment;
this.iframe.location.hash = "#" + this.fragment;
}
// Add a cross-platform `addEventListener` shim for older browsers.
var addEventListener = window.addEventListener || function (eventName, listener) {
return attachEvent('on' + eventName, listener);
return attachEvent("on" + eventName, listener);
};
// Depending on whether we're using pushState or hashes, and whether
// 'onhashchange' is supported, determine how we check the URL state.
if (this._hasPushState) {
addEventListener('popstate', this.checkUrl, false);
addEventListener("popstate", this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
addEventListener('hashchange', this.checkUrl, false);
addEventListener("hashchange", this.checkUrl, false);
} else if (this._wantsHashChange) {
this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
}
@ -459,14 +459,14 @@
stop: function () {
// Add a cross-platform `removeEventListener` shim for older browsers.
var removeEventListener = window.removeEventListener || function (eventName, listener) {
return detachEvent('on' + eventName, listener);
return detachEvent("on" + eventName, listener);
};
// Remove window listeners.
if (this._hasPushState) {
removeEventListener('popstate', this.checkUrl, false);
removeEventListener("popstate", this.checkUrl, false);
} else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {
removeEventListener('hashchange', this.checkUrl, false);
removeEventListener("hashchange", this.checkUrl, false);
}
// Clean up the iframe if necessary.
@ -527,24 +527,24 @@
if (!options || options === true) options = {trigger: !!options};
// Normalize the fragment.
fragment = this.getFragment(fragment || '');
fragment = this.getFragment(fragment || "");
// Don't include a trailing slash on the root.
var root = this.root;
if (fragment === '' || fragment.charAt(0) === '?') {
root = root.slice(0, -1) || '/';
if (fragment === "" || fragment.charAt(0) === "?") {
root = root.slice(0, -1) || "/";
}
var url = root + fragment;
// Strip the hash and decode for matching.
fragment = decodeURI(fragment.replace(pathStripper, ''));
fragment = decodeURI(fragment.replace(pathStripper, ""));
if (this.fragment === fragment) return;
this.fragment = fragment;
// If pushState is available, we use it to set the fragment as a real URL.
if (this._hasPushState) {
this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
this.history[options.replace ? "replaceState" : "pushState"]({}, document.title, url);
// If hash changes haven't been explicitly disabled, update the hash
// fragment to store history.
@ -570,11 +570,11 @@
// a new one to the browser history.
_updateHash: function (location, fragment, replace) {
if (replace) {
var href = location.href.replace(/(javascript:|#).*$/, '');
location.replace(href + '#' + fragment);
var href = location.href.replace(/(javascript:|#).*$/, "");
location.replace(href + "#" + fragment);
} else {
// Some browsers require that `hash` contains a leading #.
location.hash = '#' + fragment;
location.hash = "#" + fragment;
}
}

1202
dist/widget.js vendored

File diff suppressed because it is too large Load Diff

8
src/addons/chart/chart.combine.js

@ -14,7 +14,7 @@ BI.CombineChart = BI.inherit(BI.Widget, {
types: [[], []],
popupItemsGetter: BI.emptyFn,
formatConfig: BI.emptyFn
})
});
},
_init: function () {
@ -44,7 +44,7 @@ BI.CombineChart = BI.inherit(BI.Widget, {
if (BI.isArray(axisItems)) {
result = BI.concat(result, axisItems);
} else {
result.push(BI.extend(axisItems, {"yAxis": yAxisIndex}));
result.push(BI.extend(axisItems, {yAxis: yAxisIndex}));
}
});
if (BI.isNotEmptyArray(combineItems)) {
@ -93,7 +93,7 @@ BI.CombineChart = BI.inherit(BI.Widget, {
},
hgap: 10
}, item)
}
};
})
})
},
@ -153,4 +153,4 @@ BI.CombineChart = BI.inherit(BI.Widget, {
});
BI.CombineChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.CombineChart.EVENT_ITEM_CLICK = "EVENT_ITEM_CLICK";
BI.shortcut('bi.combine_chart', BI.CombineChart);
BI.shortcut("bi.combine_chart", BI.CombineChart);

6
src/addons/chart/chart.js

@ -8,7 +8,7 @@ BI.Chart = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.Chart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-chart"
})
});
},
_init: function () {
@ -35,7 +35,7 @@ BI.Chart = BI.inherit(BI.Pane, {
},
magnify: function () {
this.vanCharts.refreshRestore()
this.vanCharts.refreshRestore();
},
populate: function (items, options) {
@ -52,4 +52,4 @@ BI.Chart = BI.inherit(BI.Pane, {
}
});
BI.Chart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.chart', BI.Chart);
BI.shortcut("bi.chart", BI.Chart);

50
src/addons/chart/chart/chart.abstract.js

@ -41,9 +41,9 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
LINE_WIDTH: 1,
NUM_SEPARATORS: false,
FONT_STYLE: {
"fontFamily": "inherit",
"color": "inherit",
"fontSize": "12px"
fontFamily: "inherit",
color: "inherit",
fontSize: "12px"
}
},
@ -51,7 +51,7 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
return BI.extend(BI.AbstractChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-abstract-chart",
popupItemsGetter: BI.emptyFn
})
});
},
_init: function () {
@ -101,12 +101,12 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
da.x = BI.contentFormat(BI.parseFloat(da.x.div(magnify).toFixed(4)), "#.####;-#.####");
}
});
})
});
},
formatXYDataWithMagnify: function (number, magnify) {
if (BI.isNull(number)) {
return null
return null;
}
if (!BI.isNumber(number)) {
number = BI.parseFloat(number);
@ -173,46 +173,46 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
},
formatTickInXYaxis: function (type, number_level, separators, isCompareBar) {
var formatter = '#.##';
var formatter = "#.##";
switch (type) {
case this.constants.NORMAL:
formatter = '#.##';
formatter = "#.##";
if (separators) {
formatter = '#,###.##'
formatter = "#,###.##";
}
break;
case this.constants.ZERO2POINT:
formatter = '#0';
formatter = "#0";
if (separators) {
formatter = '#,###';
formatter = "#,###";
}
break;
case this.constants.ONE2POINT:
formatter = '#0.0';
formatter = "#0.0";
if (separators) {
formatter = '#,###.0';
formatter = "#,###.0";
}
break;
case this.constants.TWO2POINT:
formatter = '#0.00';
formatter = "#0.00";
if (separators) {
formatter = '#,###.00';
formatter = "#,###.00";
}
break;
}
if (number_level === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) {
formatter += '%';
formatter += "%";
}
formatter += ";-" + formatter;
if(isCompareBar) {
return function () {
arguments[0] = arguments[0] > 0 ? arguments[0] : (-1) * arguments[0];
return BI.contentFormat(arguments[0], formatter);
}
};
}
return function () {
return BI.contentFormat(arguments[0], formatter)
}
return BI.contentFormat(arguments[0], formatter);
};
},
formatDataLabel: function (state, items, config, style) {
@ -220,8 +220,8 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
if (state === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"align": "outside",
"autoAdjust": true,
align: "outside",
autoAdjust: true,
style: style,
enabled: true,
formatter: {
@ -238,13 +238,13 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
if (state === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"align": "outside",
"autoAdjust": true,
align: "outside",
autoAdjust: true,
style: style,
enabled: true,
formatter: {
identifier: "${VALUE}",
valueFormat: format,
valueFormat: format
}
};
if(isPercentChart) {
@ -265,7 +265,7 @@ BI.AbstractChart = BI.inherit(BI.Widget, {
BI.each(config.yAxis, function (idx, axis) {
axis.labelStyle = fontStyle;
axis.title.style = fontStyle;
})
});
},
_formatItems: function (items) {

22
src/addons/chart/chart/chart.accumulatearea.js

@ -8,7 +8,7 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-area-chart"
})
});
},
_init: function () {
@ -35,7 +35,7 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -102,7 +102,7 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -152,9 +152,9 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -177,14 +177,14 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
},
@ -274,4 +274,4 @@ BI.AccumulateAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_area_chart', BI.AccumulateAreaChart);
BI.shortcut("bi.accumulate_area_chart", BI.AccumulateAreaChart);

28
src/addons/chart/chart/chart.accumulateaxis.js

@ -8,7 +8,7 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-axis-chart"
})
});
},
_init: function () {
@ -33,7 +33,7 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -93,7 +93,7 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
enableTick: self.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "column";
@ -115,9 +115,9 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -140,14 +140,14 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartStyle () {
@ -178,13 +178,13 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
unit = unit === "" ? unit : "(" + unit + ")";
@ -277,4 +277,4 @@ BI.AccumulateAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_axis_chart', BI.AccumulateAxisChart);
BI.shortcut("bi.accumulate_axis_chart", BI.AccumulateAxisChart);

32
src/addons/chart/chart/chart.accumulatebar.js

@ -8,7 +8,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateBarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-bar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0
}];
@ -45,7 +45,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateBarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -67,7 +67,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
lineWidth: this.config.lineWidth,
enableTick: this.config.enableTick,
maxWidth: '40%'
maxWidth: "40%"
});
self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel);
@ -111,9 +111,9 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -136,14 +136,14 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -163,13 +163,13 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -184,7 +184,7 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
var tmp = t.x;
t.x = t.y;
t.y = tmp;
})
});
});
});
return items;
@ -243,4 +243,4 @@ BI.AccumulateBarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateBarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_bar_chart', BI.AccumulateBarChart);
BI.shortcut("bi.accumulate_bar_chart", BI.AccumulateBarChart);

16
src/addons/chart/chart/chart.accumulateradar.js

@ -8,7 +8,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AccumulateRadarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-accumulate-radar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0,
position: "bottom"
@ -45,7 +45,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AccumulateRadarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -119,7 +119,7 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -141,13 +141,13 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -191,4 +191,4 @@ BI.AccumulateRadarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AccumulateRadarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.accumulate_radar_chart', BI.AccumulateRadarChart);
BI.shortcut("bi.accumulate_radar_chart", BI.AccumulateRadarChart);

28
src/addons/chart/chart/chart.area.js

@ -8,7 +8,7 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-area-chart"
})
});
},
_init: function () {
@ -34,7 +34,7 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -99,7 +99,7 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -131,9 +131,9 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -156,14 +156,14 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -201,13 +201,13 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -299,4 +299,4 @@ BI.AreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.area_chart', BI.AreaChart);
BI.shortcut("bi.area_chart", BI.AreaChart);

28
src/addons/chart/chart/chart.axis.js

@ -11,7 +11,7 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.AxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-axis-chart"
})
});
},
_init: function () {
@ -37,7 +37,7 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.AxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -102,7 +102,7 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
var lineItem = [];
@ -142,9 +142,9 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -164,14 +164,14 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -191,13 +191,13 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -273,4 +273,4 @@ BI.AxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.AxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.axis_chart', BI.AxisChart);
BI.shortcut("bi.axis_chart", BI.AxisChart);

30
src/addons/chart/chart/chart.bar.js

@ -8,7 +8,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.BarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-bar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0
}];
@ -48,7 +48,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.BarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -69,7 +69,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableTick: this.config.enableTick,
lineWidth: this.config.lineWidth,
maxWidth: '40%'
maxWidth: "40%"
});
// 值轴
@ -114,9 +114,9 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -136,14 +136,14 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXAxisTitle (numberLevelType, position) {
@ -163,10 +163,10 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
unit = unit === "" ? unit : "(" + unit + ")";
@ -181,7 +181,7 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
var tmp = t.x;
t.x = t.y;
t.y = tmp;
})
});
});
});
return items;
@ -238,4 +238,4 @@ BI.BarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.BarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.bar_chart', BI.BarChart);
BI.shortcut("bi.bar_chart", BI.BarChart);

63
src/addons/chart/chart/chart.bubble.js

@ -8,7 +8,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.BubbleChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-bubble-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.BubbleChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -66,7 +66,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.yAxis[0].lineWidth = 1;
config.yAxis[0].title.rotation = this.constants.ROTATION;
config.yAxis[0].maxWidth = '40%';
config.yAxis[0].maxWidth = "40%";
config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators);
self.formatNumberLevelInXaxis(items, this.config.xAxisNumberLevel);
@ -74,20 +74,21 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text;
config.xAxis[0].title.align = "center";
config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.xAxis[0].maxHeith = '40%';
config.xAxis[0].maxHeith = "40%";
config.chartType = "bubble";
if (BI.isNotEmptyArray(this.config.tooltip)) {
config.plotOptions.bubble.tooltip = {
useHtml: true,
style: {
color: 'RGB(184, 184, 184)'
color: "RGB(184, 184, 184)"
},
formatter: function () {
var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y);
var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x);
return this.seriesName + '<div>(X)' + self.config.tooltip[0] + ':' + x + '</div><div>(Y)' + self.config.tooltip[1]
+ ':' + y + '</div><div>(' + BI.i18nText("BI-Size") + ')' + self.config.tooltip[2] + ':' + this.size + '</div>'}
return this.seriesName + "<div>(X)" + self.config.tooltip[0] + ":" + x + "</div><div>(Y)" + self.config.tooltip[1]
+ ":" + y + "</div><div>(" + BI.i18nText("BI-Size") + ")" + self.config.tooltip[2] + ":" + this.size + "</div>";
}
};
}
@ -95,20 +96,20 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
if (config.plotOptions.dataLabels.enabled === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"style" : self.config.chartFont,
"align": "outside",
"autoAdjust": true,
style: self.config.chartFont,
align: "outside",
autoAdjust: true,
enabled: true,
formatter: {
identifier: "${X}${Y}${SIZE}",
"XFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
XFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
"YFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
YFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
"sizeFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
sizeFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
}
}
};
@ -143,9 +144,9 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -168,14 +169,14 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInYaxis (type, position) {
@ -185,7 +186,7 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) {
// config.plotOptions.tooltip.formatter.valueFormat = "function(){return window.FR ? FR.contentFormat(arguments[0], '#0%') : arguments[0]}";
@ -209,13 +210,13 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -226,9 +227,9 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
BI.each(item, function (id, it) {
BI.each(it.data, function (i, da) {
var data = da.size;
da.size = BI.contentFormat(data, '#.##;-#.##')
})
})
da.size = BI.contentFormat(data, "#.##;-#.##");
});
});
});
return items;
},
@ -279,4 +280,4 @@ BI.BubbleChart = BI.inherit(BI.AbstractChart, {
}
});
BI.BubbleChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.bubble_chart', BI.BubbleChart);
BI.shortcut("bi.bubble_chart", BI.BubbleChart);

28
src/addons/chart/chart/chart.comparearea.js

@ -8,7 +8,7 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.CompareAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-compare-area-chart"
})
});
},
_init: function () {
@ -34,7 +34,7 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.CompareAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -103,7 +103,7 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -165,9 +165,9 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -190,14 +190,14 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -263,13 +263,13 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -370,4 +370,4 @@ BI.CompareAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.CompareAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.compare_area_chart', BI.CompareAreaChart);
BI.shortcut("bi.compare_area_chart", BI.CompareAreaChart);

30
src/addons/chart/chart/chart.compareaxis.js

@ -8,7 +8,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.CompareAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-compare-axis-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.CompareAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -65,7 +65,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
config.yAxis = this.yAxis;
BI.each(config.yAxis, function (idx, axis) {
var unit = '';
var unit = "";
switch (axis.axisIndex) {
case self.constants.LEFT_AXIS:
unit = getXYAxisUnit(self.config.leftYAxisNumberLevel, self.constants.LEFT_AXIS);
@ -112,7 +112,7 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
BI.extend(config.xAxis[1], {
@ -148,9 +148,9 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -173,14 +173,14 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -240,13 +240,13 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if(position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if(position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if(position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -378,4 +378,4 @@ BI.CompareAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.CompareAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.compare_axis_chart', BI.CompareAxisChart);
BI.shortcut("bi.compare_axis_chart", BI.CompareAxisChart);

30
src/addons/chart/chart/chart.comparebar.js

@ -8,7 +8,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.CompareBarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-compare-bar-chart"
})
});
},
_init: function () {
@ -45,7 +45,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.CompareBarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -67,7 +67,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
lineWidth: this.config.lineWidth,
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
maxWidth: '40%'
maxWidth: "40%"
});
self.formatNumberLevelInXaxis(items, this.config.leftYAxisNumberLevel);
@ -112,9 +112,9 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -137,14 +137,14 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -164,13 +164,13 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -190,7 +190,7 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
}
});
it.stack = i;
})
});
});
BI.each(items, function (idx, item) {
result = BI.concat(result, item);
@ -250,4 +250,4 @@ BI.CompareBarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.CompareBarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.compare_bar_chart', BI.CompareBarChart);
BI.shortcut("bi.compare_bar_chart", BI.CompareBarChart);

74
src/addons/chart/chart/chart.dashboard.js

@ -9,18 +9,18 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.DashboardChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-dashboard-chart"
})
});
},
_init: function () {
BI.DashboardChart.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.gaugeAxis = [{
"minorTickColor": "rgb(226,226,226)",
"tickColor": "rgb(186,186,186)",
minorTickColor: "rgb(226,226,226)",
tickColor: "rgb(186,186,186)",
labelStyle: this.constants.FONT_STYLE,
"step": 0,
"showLabel": true
step: 0,
showLabel: true
}];
this.combineChart = BI.createWidget({
type: "bi.combine_chart",
@ -32,7 +32,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.DashboardChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -48,7 +48,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
if (isDashboard && !isMultiPointers) {
config.plotOptions.seriesLabel.enabled = false;
if(BI.isNull(items[0].data[0].z)) {
config.plotOptions.tooltip.formatter.identifier = "${SERIES}${X}${Y}${SIZE}${VALUE}"
config.plotOptions.tooltip.formatter.identifier = "${SERIES}${X}${Y}${SIZE}${VALUE}";
}
}
config.gaugeAxis[0].labelStyle = this.config.chartFont;
@ -66,29 +66,29 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
formatter: function () {
var value = this.value;
if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && self.config.numSeparators) {
value = BI.contentFormat(this.value, "#,##0%;-#,##0%")
value = BI.contentFormat(this.value, "#,##0%;-#,##0%");
} else if (self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT && !self.config.numSeparators) {
value = BI.contentFormat(this.value, "#0.00%");
} else if (!(self.config.dashboardNumberLevel === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) && self.config.numSeparators) {
value = BI.contentFormat(this.value, "#,###.##;-#,###.##")
value = BI.contentFormat(this.value, "#,###.##;-#,###.##");
} else {
value = BI.contentFormat(this.value, "#.##;-#.##");
}
var label = '<div style="text-align: center">' + this.seriesName + '</div>' + '<div style="text-align: center">' + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + '</div>';
var label = "<div style=\"text-align: center\">" + this.seriesName + "</div>" + "<div style=\"text-align: center\">" + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "</div>";
if (isDashboard && items[0].data.length > 1) {
if (isMultiPointers) {
return '<div style="text-align: center">' + this.seriesName + ':' + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + '</div>';
return "<div style=\"text-align: center\">" + this.seriesName + ":" + value +
getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS) + "</div>";
}
return label
return label;
} else if (isDashboard && BI.isNull(items[0].data[0].z)) {
return label
return label;
}
return '<div style="text-align: center">' + this.category + '</div>' + label;
return "<div style=\"text-align: center\">" + this.category + "</div>" + label;
},
style: self.config.chartFont,
useHtml: true
@ -132,9 +132,9 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
config.gaugeAxis[0].formatter = function () {
var scaleValue = this;
if (self.config.numSeparators) {
scaleValue = BI.contentFormat(scaleValue, '#,##0%;-#,##0%')
scaleValue = BI.contentFormat(scaleValue, "#,##0%;-#,##0%");
} else {
scaleValue = BI.contentFormat(scaleValue, '#0.00%')
scaleValue = BI.contentFormat(scaleValue, "#0.00%");
}
return scaleValue + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS);
};
@ -142,7 +142,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
config.gaugeAxis[0].formatter = function () {
var value = this;
if (self.config.numSeparators) {
value = BI.contentFormat(value, "#,###;-#,###")
value = BI.contentFormat(value, "#,###;-#,###");
}
return value + getXYAxisUnit(self.config.dashboardNumberLevel, self.constants.DASHBOARD_AXIS);
};
@ -170,26 +170,26 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(this, '#.##;-#.##') + getXYAxisUnit(type, position)
return BI.contentFormat(this, "#.##;-#.##") + getXYAxisUnit(type, position);
};
if (self.config.numSeparators) {
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(arguments[0], '#,###.##;-#,###.##')
return BI.contentFormat(arguments[0], "#,###.##;-#,###.##");
};
}
if (type === BICst.TARGET_STYLE.NUM_LEVEL.PERCENT) {
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(arguments[0], '#0.00%')
return BI.contentFormat(arguments[0], "#0.00%");
};
if (self.config.numSeparators) {
config.plotOptions.tooltip.formatter.valueFormat = function () {
return BI.contentFormat(arguments[0], '#,##0%;-#,##0%')
return BI.contentFormat(arguments[0], "#,##0%;-#,##0%");
};
}
}
@ -212,7 +212,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.DASHBOARD_AXIS) {
self.config.dashboardUnit !== "" && (unit = unit + self.config.dashboardUnit)
self.config.dashboardUnit !== "" && (unit = unit + self.config.dashboardUnit);
}
return unit;
}
@ -223,7 +223,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
var data = item.data[0];
if ((BI.isNull(max) || data.y > max)) {
max = data.y
max = data.y;
}
});
@ -233,8 +233,8 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
break;
case BICst.SCALE_SETTING.CUSTOM:
if (styles.length === 0) {
return bands
} else {
return bands;
}
var maxScale = _calculateValueNiceDomain(0, max)[1];
BI.each(styles, function (idx, style) {
@ -251,7 +251,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
to: style.range.max
});
color = style.color;
conditionMax = style.range.max
conditionMax = style.range.max;
});
min = BI.parseInt(styles[0].range.min);
bands.push({
@ -267,7 +267,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
});
return bands;
}
}
}
@ -310,7 +310,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
x: items[0][0].name
})],
name: da.x
})
});
});
return [result];
} else if(this.config.numberOfPointer === c.ONE_POINTER && items[0].length > 1) {
@ -320,9 +320,9 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
x: item.name
})],
name: BI.UUID()
})
});
return [result]
});
return [result];
}
if (this.config.numberOfPointer === c.MULTI_POINTER && items[0].length > 1) {// 多个系列
BI.each(items, function (idx, item) {
@ -330,7 +330,7 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
var data = it.data[0];
data.x = it.name;
result.push(data);
})
});
});
return [[{
data: result,
@ -348,8 +348,8 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
y: da.y
})],
name: da.x
})
})
});
});
});
return [others];
}
@ -395,4 +395,4 @@ BI.DashboardChart = BI.inherit(BI.AbstractChart, {
}
});
BI.DashboardChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.dashboard_chart', BI.DashboardChart);
BI.shortcut("bi.dashboard_chart", BI.DashboardChart);

8
src/addons/chart/chart/chart.donut.js

@ -8,7 +8,7 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.DonutChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-donut-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.DonutChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -49,7 +49,7 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, 1);
})
});
});
config.legend.style = this.config.chartFont;
@ -100,4 +100,4 @@ BI.DonutChart = BI.inherit(BI.AbstractChart, {
}
});
BI.DonutChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.donut_chart', BI.DonutChart);
BI.shortcut("bi.donut_chart", BI.DonutChart);

40
src/addons/chart/chart/chart.fallaxis.js

@ -8,7 +8,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.FallAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-fall-axis-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.FallAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -86,7 +86,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
enableMinorTick: this.config.enableMinorTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -97,9 +97,9 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
return;
}
item.dataLabels = {
"style": self.config.chartFont,
"align": "outside",
"autoAdjust": true,
style: self.config.chartFont,
align: "outside",
autoAdjust: true,
enabled: true,
formatter: {
identifier: "${VALUE}",
@ -133,9 +133,9 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -158,14 +158,14 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInYaxis (type, position, formatter) {
@ -175,7 +175,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -197,13 +197,13 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if(position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if(position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if(position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -233,7 +233,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
return [BI.map(BI.makeArray(2, null), function (idx, item) {
return {
"data": BI.map(tables, function(id, cell){
data: BI.map(tables, function (id, cell) {
var axis = BI.extend({}, cell[3], {
x: cell[0],
y: Math.abs(cell[2 - idx])
@ -248,7 +248,7 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
axis.mouseOverColor = "rgba(0,0,0,0)";
axis.tooltip = {
enable: false
}
};
}
return axis;
}),
@ -307,4 +307,4 @@ BI.FallAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.FallAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.fall_axis_chart', BI.FallAxisChart);
BI.shortcut("bi.fall_axis_chart", BI.FallAxisChart);

10
src/addons/chart/chart/chart.forcebubble.js

@ -8,7 +8,7 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.ForceBubbleChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-force-bubble-chart"
})
});
},
_init: function () {
@ -24,13 +24,13 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.ForceBubbleChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
_formatConfig: function (config, items) {
var self = this, o = this.options;
config.chartType = 'forceBubble';
config.chartType = "forceBubble";
config.colors = this.config.chartColor;
this.formatChartLegend(config, this.config.chartLegend);
@ -46,7 +46,7 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, 1);
})
});
});
config.legend.style = this.config.chartFont;
return [items, config];
@ -84,4 +84,4 @@ BI.ForceBubbleChart = BI.inherit(BI.AbstractChart, {
}
});
BI.ForceBubbleChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.force_bubble_chart', BI.ForceBubbleChart);
BI.shortcut("bi.force_bubble_chart", BI.ForceBubbleChart);

20
src/addons/chart/chart/chart.gismap.js

@ -8,7 +8,7 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.GISMapChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-gis-map-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.GISMapChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -36,29 +36,29 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
config.plotOptions.dataLabels.useHtml = true;
config.plotOptions.dataLabels.style = this.config.chartFont;
config.plotOptions.dataLabels.formatter = function () {
var name = (BI.isArray(this.name) ? '' : this.name + ',') + BI.contentFormat(this.value, '#.##;-#.##') ;
var name = (BI.isArray(this.name) ? "" : this.name + ",") + BI.contentFormat(this.value, "#.##;-#.##");
var style = "padding: 5px; background-color: rgba(0,0,0,0.4980392156862745);border-color: rgb(0,0,0); border-radius:2px; border-width:0px;";
var a = '<div style = ' + style + '>' + name + '</div>';
var a = "<div style = " + style + ">" + name + "</div>";
return a;
};
config.plotOptions.tooltip.shared = true;
config.plotOptions.tooltip.formatter = function () {
var tip = BI.isArray(this.name) ? '' : this.name;
var tip = BI.isArray(this.name) ? "" : this.name;
BI.each(this.points, function (idx, point) {
tip += ('<div>' + point.seriesName + ':' + BI.contentFormat((point.size || point.y), '#.##;-#.##') + '</div>');
tip += ("<div>" + point.seriesName + ":" + BI.contentFormat((point.size || point.y), "#.##;-#.##") + "</div>");
});
return tip;
};
config.geo = {
"tileLayer": "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
"attribution": "<a><img src='http://webapi.amap.com/theme/v1.3/mapinfo_05.png'>&copy; 2016 AutoNavi</a>"
tileLayer: "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
attribution: "<a><img src='http://webapi.amap.com/theme/v1.3/mapinfo_05.png'>&copy; 2016 AutoNavi</a>"
};
if (this.config.showBackgroundLayer === true && BI.isNotNull(this.config.backgroundLayerInfo)) {
config.geo = {};
if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) {
config.geo.tileLayer = false;
config.geo.wmsUrl = this.config.backgroundLayerInfo.url;
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer;
} else {
config.geo.tileLayer = this.config.backgroundLayerInfo.url;
}
@ -157,4 +157,4 @@ BI.GISMapChart = BI.inherit(BI.AbstractChart, {
}
});
BI.GISMapChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.gis_map_chart', BI.GISMapChart);
BI.shortcut("bi.gis_map_chart", BI.GISMapChart);

28
src/addons/chart/chart/chart.line.js

@ -8,7 +8,7 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.LineChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-line-chart"
})
});
},
_init: function () {
@ -34,7 +34,7 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.LineChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -100,7 +100,7 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: self.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "line";
@ -132,9 +132,9 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -157,14 +157,14 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatChartLineStyle () {
@ -202,13 +202,13 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -294,4 +294,4 @@ BI.LineChart = BI.inherit(BI.AbstractChart, {
}
});
BI.LineChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.line_chart', BI.LineChart);
BI.shortcut("bi.line_chart", BI.LineChart);

52
src/addons/chart/chart/chart.map.js

@ -8,7 +8,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.MapChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-map-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.MapChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -46,7 +46,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
var tip = this.name;
var point = this.points[0];
var index = BI.isNull(point.size) ? 0 : 1;
tip += ('<div>' + point.seriesName + ':' + BI.contentFormat(point.size || point.y, formatterArray[index]) + '</div>');
tip += ("<div>" + point.seriesName + ":" + BI.contentFormat(point.size || point.y, formatterArray[index]) + "</div>");
return tip;
};
config.plotOptions.dataLabels.formatter.valueFormat = function () {
@ -64,7 +64,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
if (this.config.backgroundLayerInfo.type === BICst.WMS_SERVER) {
config.geo.tileLayer = false;
config.geo.wmsUrl = this.config.backgroundLayerInfo.url;
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer
config.geo.wmsLayer = this.config.backgroundLayerInfo.wmsLayer;
} else {
config.geo.tileLayer = this.config.backgroundLayerInfo.url;
}
@ -89,7 +89,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
items.push({
type: "areaMap",
data: []
})
});
}
return [items, config];
@ -117,36 +117,36 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
var settings = items[0].settings;
var legendFormat = formatToolTipAndDataLabel(settings.format || c.NORMAL, settings.num_level || c.NORMAL,
settings.unit || "", settings.numSeparators || c.NUM_SEPARATORS);
to = BI.contentFormat(to, legendFormat)
to = BI.contentFormat(to, legendFormat);
}
return to
return to;
};
}
function formatToolTipAndDataLabel (format, numberLevel, unit, numSeparators) {
var formatter = '#.##';
var formatter = "#.##";
switch (format) {
case self.constants.NORMAL:
formatter = '#.##';
if (numSeparators) formatter = '#,###.##';
formatter = "#.##";
if (numSeparators) formatter = "#,###.##";
break;
case self.constants.ZERO2POINT:
formatter = '#0';
if (numSeparators) formatter = '#,###';
formatter = "#0";
if (numSeparators) formatter = "#,###";
break;
case self.constants.ONE2POINT:
formatter = '#0.0';
if (numSeparators) formatter = '#,###.0';
formatter = "#0.0";
if (numSeparators) formatter = "#,###.0";
break;
case self.constants.TWO2POINT:
formatter = '#0.00';
if (numSeparators) formatter = '#,###.00';
formatter = "#0.00";
if (numSeparators) formatter = "#,###.00";
break;
}
switch (numberLevel) {
case BICst.TARGET_STYLE.NUM_LEVEL.NORMAL:
formatter += '';
formatter += "";
break;
case BICst.TARGET_STYLE.NUM_LEVEL.TEN_THOUSAND:
formatter += BI.i18nText("BI-Wan");
@ -158,7 +158,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
formatter += BI.i18nText("BI-Yi");
break;
case BICst.TARGET_STYLE.NUM_LEVEL.PERCENT:
formatter += '%';
formatter += "%";
break;
}
@ -172,9 +172,9 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, it) {
if (BI.isNull(min) || BI.parseFloat(min) > BI.parseFloat(it.y)) {
min = it.y
min = it.y;
}
})
});
});
switch (change) {
@ -196,11 +196,11 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
range.push({
color: style.color || "rgba(255,255,255,0)",
from: style.range.min,
to: to,
to: to
});
}
color = style.color;
conditionMax = style.range.max
conditionMax = style.range.max;
});
conditionMin = BI.parseFloat(styles[0].range.min);
@ -220,10 +220,10 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
});
}
return range;
} else {
}
defaultStyle.color = defaultColor;
return defaultStyle;
}
}
}
@ -313,7 +313,7 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
self._formatDrillItems(da.drilldown);
}
});
})
});
});
return items;
},
@ -358,4 +358,4 @@ BI.MapChart = BI.inherit(BI.AbstractChart, {
});
BI.MapChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.MapChart.EVENT_CLICK_DTOOL = "EVENT_CLICK_DTOOL";
BI.shortcut('bi.map_chart', BI.MapChart);
BI.shortcut("bi.map_chart", BI.MapChart);

54
src/addons/chart/chart/chart.multiaxis.js

@ -11,7 +11,7 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.MultiAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-axis-chart"
})
});
},
_init: function () {
@ -20,10 +20,10 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
this.xAxis = [{
type: "category",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: "bottom",
gridLineWidth: 0
@ -39,7 +39,7 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.MultiAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -120,7 +120,7 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -161,14 +161,14 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "top"
text: t.text,
align: "top"
}
});
});
@ -193,19 +193,19 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "left"
text: t.text,
align: "left"
}
});
});
}
})
});
},
getXYAxisUnit: function (numberLevelType, position) {
@ -227,16 +227,16 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === this.constants.X_AXIS) {
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit)
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit);
}
if (position === this.constants.LEFT_AXIS) {
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit)
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS) {
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit)
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS_SECOND) {
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit)
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit);
}
return unit === "" ? unit : "(" + unit + ")";
},
@ -294,10 +294,10 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
var newYAxis = {
type: "value",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: idx > 0 ? "right" : "left",
lineWidth: 1,
@ -319,4 +319,4 @@ BI.MultiAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.MultiAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.multi_axis_chart', BI.MultiAxisChart);
BI.shortcut("bi.multi_axis_chart", BI.MultiAxisChart);

54
src/addons/chart/chart/chart.multiaxiscombine.js

@ -11,7 +11,7 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.MultiAxisCombineChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-axis-combine-chart"
})
});
},
_init: function () {
@ -20,10 +20,10 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
this.xAxis = [{
type: "category",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: "bottom",
gridLineWidth: 0
@ -39,7 +39,7 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.MultiAxisCombineChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -123,7 +123,7 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -164,14 +164,14 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "top"
text: t.text,
align: "top"
}
});
});
@ -196,19 +196,19 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": {
"fontFamily": "inherit",
"color": "#808080",
"fontSize": "12px",
"fontWeight": ""
style: {
fontFamily: "inherit",
color: "#808080",
fontSize: "12px",
fontWeight: ""
},
"text": t.text,
"align": "left"
text: t.text,
align: "left"
}
});
});
}
})
});
},
getXYAxisUnit: function (numberLevelType, position) {
@ -230,16 +230,16 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === this.constants.X_AXIS) {
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit)
this.config.xAxisUnit !== "" && (unit = unit + this.config.xAxisUnit);
}
if (position === this.constants.LEFT_AXIS) {
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit)
this.config.leftYAxisUnit !== "" && (unit = unit + this.config.leftYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS) {
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit)
this.config.rightYAxisUnit !== "" && (unit = unit + this.config.rightYAxisUnit);
}
if (position === this.constants.RIGHT_AXIS_SECOND) {
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit)
this.config.rightYAxisSecondUnit !== "" && (unit = unit + this.config.rightYAxisSecondUnit);
}
return unit === "" ? unit : "(" + unit + ")";
},
@ -296,10 +296,10 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
var newYAxis = {
type: "value",
title: {
style: {"fontFamily": "inherit", "color": "#808080", "fontSize": "12px", "fontWeight": ""}
style: {fontFamily: "inherit", color: "#808080", fontSize: "12px", fontWeight: ""}
},
labelStyle: {
"fontFamily": "inherit", "color": "#808080", "fontSize": "12px"
fontFamily: "inherit", color: "#808080", fontSize: "12px"
},
position: idx > 0 ? "right" : "left",
lineWidth: 1,
@ -321,4 +321,4 @@ BI.MultiAxisCombineChart = BI.inherit(BI.AbstractChart, {
}
});
BI.MultiAxisCombineChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.multi_axis_combine_chart', BI.MultiAxisCombineChart);
BI.shortcut("bi.multi_axis_combine_chart", BI.MultiAxisCombineChart);

28
src/addons/chart/chart/chart.percentaccumulatearea.js

@ -8,7 +8,7 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.PercentAccumulateAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-percent-accumulate-area-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.PercentAccumulateAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -84,7 +84,7 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -116,9 +116,9 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -141,14 +141,14 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -168,15 +168,15 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
unit = unit === "" ? unit : "(" + unit + ")";
return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit
return self.config.showLeftYAxisTitle === true ? self.config.leftYAxisTitle + unit : unit;
}
},
@ -242,4 +242,4 @@ BI.PercentAccumulateAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.PercentAccumulateAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.percent_accumulate_area_chart', BI.PercentAccumulateAreaChart);
BI.shortcut("bi.percent_accumulate_area_chart", BI.PercentAccumulateAreaChart);

26
src/addons/chart/chart/chart.percentaccumulateaxis.js

@ -8,7 +8,7 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.PercentAccumulateAxisChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-percent-accumulate-axis-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.PercentAccumulateAxisChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -85,7 +85,7 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
labelRotation: this.config.textDirection,
enableMinorTick: this.config.enableMinorTick,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
// 为了给数据标签加个%,还要遍历所有的系列,唉
@ -115,9 +115,9 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -140,14 +140,14 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function getXYAxisUnit (numberLevelType, position) {
@ -167,10 +167,10 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -237,4 +237,4 @@ BI.PercentAccumulateAxisChart = BI.inherit(BI.AbstractChart, {
}
});
BI.PercentAccumulateAxisChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.percent_accumulate_axis_chart', BI.PercentAccumulateAxisChart);
BI.shortcut("bi.percent_accumulate_axis_chart", BI.PercentAccumulateAxisChart);

14
src/addons/chart/chart/chart.pie.js

@ -8,7 +8,7 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.PieChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-pie-chart"
})
});
},
_init: function () {
@ -24,7 +24,7 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.PieChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -50,7 +50,7 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, 1);
})
});
});
config.legend.style = this.config.chartFont;
@ -107,10 +107,10 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
});
});
return seriesItem;
})
}else{
return items;
});
}
return items;
},
populate: function (items, options) {
@ -149,5 +149,5 @@ BI.PieChart = BI.inherit(BI.AbstractChart, {
}
});
BI.PieChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.pie_chart', BI.PieChart);
BI.shortcut("bi.pie_chart", BI.PieChart);

16
src/addons/chart/chart/chart.radar.js

@ -8,7 +8,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.RadarChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-radar-chart"
})
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
},
labelStyle: this.constants.FONT_STYLE,
formatter: function () {
return this > 0 ? this : (-1) * this
return this > 0 ? this : (-1) * this;
},
gridLineWidth: 0,
position: "bottom"
@ -45,7 +45,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.RadarChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -110,7 +110,7 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -132,13 +132,13 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -182,4 +182,4 @@ BI.RadarChart = BI.inherit(BI.AbstractChart, {
}
});
BI.RadarChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.radar_chart', BI.RadarChart);
BI.shortcut("bi.radar_chart", BI.RadarChart);

28
src/addons/chart/chart/chart.rangearea.js

@ -9,7 +9,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.RangeAreaChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-range-area-chart"
})
});
},
_init: function () {
@ -44,7 +44,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.RangeAreaChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -79,7 +79,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
enableTick: this.config.enableTick,
labelRotation: this.config.textDirection,
gridLineWidth: this.config.showGridLine === true ? 1 : 0,
maxHeight: '40%'
maxHeight: "40%"
});
config.chartType = "area";
@ -112,9 +112,9 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -137,14 +137,14 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style" : self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInYaxis (type, position, formatter) {
@ -154,7 +154,7 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
if (position === item.yAxis) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
}
})
});
});
config.plotOptions.tooltip.formatter.valueFormat = formatter;
}
@ -176,10 +176,10 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -281,4 +281,4 @@ BI.RangeAreaChart = BI.inherit(BI.AbstractChart, {
}
});
BI.RangeAreaChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.range_area_chart', BI.RangeAreaChart);
BI.shortcut("bi.range_area_chart", BI.RangeAreaChart);

56
src/addons/chart/chart/chart.scatter.js

@ -8,7 +8,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
_defaultConfig: function () {
return BI.extend(BI.ScatterChart.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-scatter-chart"
})
});
},
_init: function () {
@ -43,7 +43,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
self.fireEvent(BI.ScatterChart.EVENT_CHANGE, obj);
});
this.combineChart.on(BI.CombineChart.EVENT_ITEM_CLICK, function (obj) {
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj)
self.fireEvent(BI.AbstractChart.EVENT_ITEM_CLICK, obj);
});
},
@ -53,7 +53,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
delete config.zoom;
config.colors = this.config.chartColor;
config.style = formatChartStyle();
config.plotOptions.marker = {"symbol": "circle", "radius": 4.5, "enabled": true};
config.plotOptions.marker = {symbol: "circle", radius: 4.5, enabled: true};
formatCordon();
this.formatChartLegend(config, this.config.chartLegend);
config.plotOptions.dataLabels.enabled = this.config.showDataLabel;
@ -68,7 +68,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
config.yAxis[0].title.text = this.config.showLeftYAxisTitle === true ? this.config.leftYAxisTitle + config.yAxis[0].title.text : config.yAxis[0].title.text;
config.yAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.yAxis[0].title.rotation = this.constants.ROTATION;
config.yAxis[0].maxWidth = '40%';
config.yAxis[0].maxWidth = "40%";
config.xAxis[0].formatter = self.formatTickInXYaxis(this.config.xAxisStyle, this.config.xAxisNumberLevel, this.config.rightNumSeparators);
formatNumberLevelInXaxis(this.config.xAxisNumberLevel);
@ -76,32 +76,32 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
config.xAxis[0].title.text = this.config.showXAxisTitle === true ? this.config.xAxisTitle + config.xAxis[0].title.text : config.xAxis[0].title.text;
config.xAxis[0].title.align = "center";
config.xAxis[0].gridLineWidth = this.config.showGridLine === true ? 1 : 0;
config.xAxis[0].maxHeight = '40%';
config.xAxis[0].maxHeight = "40%";
config.chartType = "scatter";
if (BI.isNotEmptyArray(this.config.tooltip)) {
config.plotOptions.tooltip.formatter = function () {
var y = self.formatTickInXYaxis(self.config.leftYAxisStyle, self.config.leftYAxisNumberLevel, self.config.numSeparators)(this.y);
var x = self.formatTickInXYaxis(self.config.xAxisStyle, self.config.xAxisNumberLevel, self.config.rightNumSeparators)(this.x);
return this.seriesName + '<div>(X)' + self.config.tooltip[0]
+ ':' + x + '</div><div>(Y)' + self.config.tooltip[1] + ':' + y + '</div>'
return this.seriesName + "<div>(X)" + self.config.tooltip[0]
+ ":" + x + "</div><div>(Y)" + self.config.tooltip[1] + ":" + y + "</div>";
};
}
if (config.plotOptions.dataLabels.enabled === true) {
BI.each(items, function (idx, item) {
item.dataLabels = {
"style": self.config.chartFont,
"align": "outside",
"autoAdjust": true,
style: self.config.chartFont,
align: "outside",
autoAdjust: true,
enabled: true,
formatter: {
identifier: "${X}${Y}",
"XFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
XFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
"YFormat": function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
YFormat: function () {
return BI.contentFormat(arguments[0], "#.##;-#.##");
}
}
};
@ -136,9 +136,9 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "top"
style: self.config.chartFont,
text: t.text,
align: "top"
}
});
});
@ -161,14 +161,14 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
value: t.value.div(magnify),
width: 1,
label: {
"style": self.config.chartFont,
"text": t.text,
"align": "left"
style: self.config.chartFont,
text: t.text,
align: "left"
}
});
});
}
})
});
}
function formatNumberLevelInXaxis (type) {
@ -176,8 +176,8 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.x = self.formatXYDataWithMagnify(da.x, magnify);
})
})
});
});
}
function formatNumberLevelInYaxis (type) {
@ -185,7 +185,7 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
BI.each(items, function (idx, item) {
BI.each(item.data, function (id, da) {
da.y = self.formatXYDataWithMagnify(da.y, magnify);
})
});
});
}
@ -206,13 +206,13 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
break;
}
if (position === self.constants.X_AXIS) {
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit)
self.config.xAxisUnit !== "" && (unit = unit + self.config.xAxisUnit);
}
if (position === self.constants.LEFT_AXIS) {
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit)
self.config.leftYAxisUnit !== "" && (unit = unit + self.config.leftYAxisUnit);
}
if (position === self.constants.RIGHT_AXIS) {
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit)
self.config.rightYAxisUnit !== "" && (unit = unit + self.config.rightYAxisUnit);
}
return unit === "" ? unit : "(" + unit + ")";
}
@ -263,4 +263,4 @@ BI.ScatterChart = BI.inherit(BI.AbstractChart, {
}
});
BI.ScatterChart.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut('bi.scatter_chart', BI.ScatterChart);
BI.shortcut("bi.scatter_chart", BI.ScatterChart);

366
src/addons/chart/factory.charts.js

@ -12,55 +12,55 @@ BI.ChartCombineFormatItemFactory = {
case BICst.WIDGET.BAR:
case BICst.WIDGET.ACCUMULATE_BAR:
case BICst.WIDGET.COMPARE_BAR:
item = BI.extend({"type": "bar"}, items);
item = BI.extend({type: "bar"}, items);
break;
case BICst.WIDGET.BUBBLE:
item = BI.extend({"type": "bubble"}, items);
item = BI.extend({type: "bubble"}, items);
break;
case BICst.WIDGET.FORCE_BUBBLE:
item = BI.extend({"type": "forceBubble"}, items);
item = BI.extend({type: "forceBubble"}, items);
break;
case BICst.WIDGET.SCATTER:
item = BI.extend({"type": "scatter"}, items);
item = BI.extend({type: "scatter"}, items);
break;
case BICst.WIDGET.AXIS:
case BICst.WIDGET.ACCUMULATE_AXIS:
case BICst.WIDGET.PERCENT_ACCUMULATE_AXIS:
case BICst.WIDGET.COMPARE_AXIS:
case BICst.WIDGET.FALL_AXIS:
item = BI.extend({"type": "column"}, items);
item = BI.extend({type: "column"}, items);
break;
case BICst.WIDGET.LINE:
item = BI.extend({"type": "line"}, items);
item = BI.extend({type: "line"}, items);
break;
case BICst.WIDGET.AREA:
case BICst.WIDGET.ACCUMULATE_AREA:
case BICst.WIDGET.COMPARE_AREA:
case BICst.WIDGET.RANGE_AREA:
case BICst.WIDGET.PERCENT_ACCUMULATE_AREA:
item = BI.extend({"type": "area"}, items);
item = BI.extend({type: "area"}, items);
break;
case BICst.WIDGET.DONUT:
item = BI.extend({"type": "pie"}, items);
item = BI.extend({type: "pie"}, items);
break;
case BICst.WIDGET.RADAR:
case BICst.WIDGET.ACCUMULATE_RADAR:
item = BI.extend({"type": "radar"}, items);
item = BI.extend({type: "radar"}, items);
break;
case BICst.WIDGET.PIE:
item = BI.extend({"type": "pie"}, items);
item = BI.extend({type: "pie"}, items);
break;
case BICst.WIDGET.DASHBOARD:
item = BI.extend({"type": "gauge"}, items);
item = BI.extend({type: "gauge"}, items);
break;
case BICst.WIDGET.MAP:
item = BI.extend({"type": "areaMap"}, items);
item = BI.extend({type: "areaMap"}, items);
break;
case BICst.WIDGET.GIS_MAP:
item = BI.extend({"type": "pointMap"}, items);
item = BI.extend({type: "pointMap"}, items);
break;
default:
item = BI.extend({"type": "column"}, items);
item = BI.extend({type: "column"}, items);
break;
}
return item;
@ -68,177 +68,177 @@ BI.ChartCombineFormatItemFactory = {
combineConfig: function () {
return {
"title": "",
"chartType": "column",
"plotOptions": {
"rotatable": false,
"startAngle": 0,
"borderRadius": 0,
"endAngle": 360,
"innerRadius": "0.0%",
"layout": "horizontal",
"hinge": "rgb(101,107,109)",
"dataLabels": {
"autoAdjust": true,
"style": {"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"},
"formatter": {
"identifier": "${VALUE}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat,
"XFormat": this._contentFormat2Decimal,
"YFormat": this._contentFormat2Decimal,
"sizeFormat": this._contentFormat2Decimal
title: "",
chartType: "column",
plotOptions: {
rotatable: false,
startAngle: 0,
borderRadius: 0,
endAngle: 360,
innerRadius: "0.0%",
layout: "horizontal",
hinge: "rgb(101,107,109)",
dataLabels: {
autoAdjust: true,
style: {fontFamily: "inherit", color: "inherit", fontSize: "12px"},
formatter: {
identifier: "${VALUE}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat,
XFormat: this._contentFormat2Decimal,
YFormat: this._contentFormat2Decimal,
sizeFormat: this._contentFormat2Decimal
},
"align": "outside",
"enabled": false
align: "outside",
enabled: false
},
"percentageLabel": {
"formatter": {
"identifier": "${PERCENT}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat
percentageLabel: {
formatter: {
identifier: "${PERCENT}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat
},
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"align": "bottom",
"enabled": true
align: "bottom",
enabled: true
},
"valueLabel": {
"formatter": {
"identifier": "${SERIES}${VALUE}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat
valueLabel: {
formatter: {
identifier: "${SERIES}${VALUE}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat
},
"backgroundColor": "rgb(255,255,0)",
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
backgroundColor: "rgb(255,255,0)",
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"align": "inside",
"enabled": true
align: "inside",
enabled: true
},
"hingeBackgroundColor": "rgb(220,242,249)",
"seriesLabel": {
"formatter": {
"identifier": "${CATEGORY}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat
hingeBackgroundColor: "rgb(220,242,249)",
seriesLabel: {
formatter: {
identifier: "${CATEGORY}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat
},
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"align": "bottom",
"enabled": true
align: "bottom",
enabled: true
},
"paneBackgroundColor": "rgb(252,252,252)",
"needle": "rgb(229,113,90)",
"large": false,
"connectNulls": false,
"shadow": true,
"curve": false,
"sizeBy": "area",
"tooltip": {
"formatter": {
"identifier": "${SERIES}${X}${Y}${SIZE}{CATEGORY}${SERIES}${VALUE}",
"valueFormat": this._contentFormat2Decimal,
"seriesFormat": this._contentFormat,
"percentFormat": this._contentFormatPercentage,
"categoryFormat": this._contentFormat,
"XFormat": this._contentFormat2Decimal,
"sizeFormat": this._contentFormat2Decimal,
"YFormat": this._contentFormat2Decimal
paneBackgroundColor: "rgb(252,252,252)",
needle: "rgb(229,113,90)",
large: false,
connectNulls: false,
shadow: true,
curve: false,
sizeBy: "area",
tooltip: {
formatter: {
identifier: "${SERIES}${X}${Y}${SIZE}{CATEGORY}${SERIES}${VALUE}",
valueFormat: this._contentFormat2Decimal,
seriesFormat: this._contentFormat,
percentFormat: this._contentFormatPercentage,
categoryFormat: this._contentFormat,
XFormat: this._contentFormat2Decimal,
sizeFormat: this._contentFormat2Decimal,
YFormat: this._contentFormat2Decimal
},
"shared": false,
"padding": 5,
"backgroundColor": "rgba(0,0,0,0.4980392156862745)",
"borderColor": "rgb(0,0,0)",
"shadow": false,
"borderRadius": 2,
"borderWidth": 0,
"follow": false,
"enabled": true,
"animation": true,
"style": {
"fontFamily": "Microsoft YaHei, Hiragino Sans GB W3",
"color": "#c4c6c6",
"fontSize": "12px",
"fontWeight": ""
shared: false,
padding: 5,
backgroundColor: "rgba(0,0,0,0.4980392156862745)",
borderColor: "rgb(0,0,0)",
shadow: false,
borderRadius: 2,
borderWidth: 0,
follow: false,
enabled: true,
animation: true,
style: {
fontFamily: "Microsoft YaHei, Hiragino Sans GB W3",
color: "#c4c6c6",
fontSize: "12px",
fontWeight: ""
}
},
"maxSize": 80,
"fillColorOpacity": 0.5,
"step": false,
"force": false,
"minSize": 15,
"displayNegative": true,
"categoryGap": "16.0%",
"borderColor": "rgb(255,255,255)",
"borderWidth": 1,
"gap": "22.0%",
"animation": true,
"lineWidth": 2,
"bubble": {
"large": false,
"connectNulls": false,
"shadow": true,
"curve": false,
"sizeBy": "area",
"maxSize": 80,
"minSize": 15,
"lineWidth": 0,
"animation": true,
"fillColorOpacity": 0.699999988079071,
"marker": {
"symbol": "circle",
"radius": 28.39695010101295,
"enabled": true
maxSize: 80,
fillColorOpacity: 0.5,
step: false,
force: false,
minSize: 15,
displayNegative: true,
categoryGap: "16.0%",
borderColor: "rgb(255,255,255)",
borderWidth: 1,
gap: "22.0%",
animation: true,
lineWidth: 2,
bubble: {
large: false,
connectNulls: false,
shadow: true,
curve: false,
sizeBy: "area",
maxSize: 80,
minSize: 15,
lineWidth: 0,
animation: true,
fillColorOpacity: 0.699999988079071,
marker: {
symbol: "circle",
radius: 28.39695010101295,
enabled: true
}
}
},
"dTools": {
"enabled": false,
"style": {
"fontFamily": "Microsoft YaHei, Hiragino Sans GB W3",
"color": "#1a1a1a",
"fontSize": "12px"
dTools: {
enabled: false,
style: {
fontFamily: "Microsoft YaHei, Hiragino Sans GB W3",
color: "#1a1a1a",
fontSize: "12px"
},
"backgroundColor": 'white'
backgroundColor: "white"
},
"dataSheet": {
"enabled": false,
"borderColor": "rgb(0,0,0)",
"borderWidth": 1,
"formatter": this._contentFormat2Decimal,
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
dataSheet: {
enabled: false,
borderColor: "rgb(0,0,0)",
borderWidth: 1,
formatter: this._contentFormat2Decimal,
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
}
},
"borderColor": "rgb(238,238,238)",
"shadow": false,
"legend": {
"borderColor": "rgb(204,204,204)",
"borderRadius": 0,
"shadow": false,
"borderWidth": 0,
"visible": true,
"style": {
"fontFamily": "inherit", "color": "inherit", "fontSize": "12px"
borderColor: "rgb(238,238,238)",
shadow: false,
legend: {
borderColor: "rgb(204,204,204)",
borderRadius: 0,
shadow: false,
borderWidth: 0,
visible: true,
style: {
fontFamily: "inherit", color: "inherit", fontSize: "12px"
},
"position": "right",
"enabled": false
position: "right",
enabled: false
},
"rangeLegend": {
"range": {
"min": 0,
"color": [
rangeLegend: {
range: {
min: 0,
color: [
[
0,
"rgb(182,226,255)"
@ -252,40 +252,40 @@ BI.ChartCombineFormatItemFactory = {
"rgb(36,167,255)"
]
],
"max": 266393
max: 266393
},
"enabled": false
enabled: false
},
"zoom": {"zoomType": "xy", "zoomTool": {"visible": false, "resize": true, "from": "", "to": ""}},
"plotBorderColor": "rgba(255,255,255,0)",
"tools": {
"hidden": false,
"toImage": {"enabled": false},
"sort": {"enabled": false},
"fullScreen": {"enabled": false},
"refresh": {
"enabled": false
zoom: {zoomType: "xy", zoomTool: {visible: false, resize: true, from: "", to: ""}},
plotBorderColor: "rgba(255,255,255,0)",
tools: {
hidden: false,
toImage: {enabled: false},
sort: {enabled: false},
fullScreen: {enabled: false},
refresh: {
enabled: false
}
},
"plotBorderWidth": 0,
"style": "normal",
"colors": ["rgb(99,178,238)", "rgb(118,218,145)"],
"borderRadius": 0,
"borderWidth": 0,
"plotShadow": false,
"plotBorderRadius": 0
plotBorderWidth: 0,
style: "normal",
colors: ["rgb(99,178,238)", "rgb(118,218,145)"],
borderRadius: 0,
borderWidth: 0,
plotShadow: false,
plotBorderRadius: 0
};
},
_contentFormat: function () {
return BI.contentFormat(arguments[0], '')
return BI.contentFormat(arguments[0], "");
},
_contentFormat2Decimal: function () {
return BI.contentFormat(arguments[0], '#.##;-#.##')
return BI.contentFormat(arguments[0], "#.##;-#.##");
},
_contentFormatPercentage: function () {
return BI.contentFormat(arguments[0], '#.##%;-#.##%')
return BI.contentFormat(arguments[0], "#.##%;-#.##%");
}
};

6
src/base/canvas/canvas.js

@ -10,14 +10,14 @@ BI.Canvas = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.Canvas.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-canvas"
})
});
},
_init: function () {
BI.Canvas.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var canvas = document.createElement("canvas");
if (!document.createElement('canvas').getContext) {
if (!document.createElement("canvas").getContext) {
canvas = window.G_vmlCanvasManager.initElement(canvas);
}
this.element.append(canvas);
@ -35,7 +35,7 @@ BI.Canvas = BI.inherit(BI.Widget, {
_getContext: function () {
if (!this.ctx) {
this.ctx = this.canvas.getContext('2d');
this.ctx = this.canvas.getContext("2d");
}
return this.ctx;
},

10
src/base/collection/collection.js

@ -100,7 +100,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
_cellRenderers: function (height, width, x, y) {
this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y);
return this._cellGroupRenderer()
return this._cellGroupRenderer();
},
_cellGroupRenderer: function () {
@ -239,7 +239,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
});
var addedItems = [];
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[1]])
addedItems.push(renderedCells[key[1]]);
});
this.container.addItems(addedItems);
// 拦截父子级关系
@ -315,7 +315,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
if (this.options.overflowX !== !!b) {
this.options.overflowX = !!b;
BI.nextTick(function () {
self.element.css({overflowX: !!b ? "auto" : "hidden"});
self.element.css({overflowX: b ? "auto" : "hidden"});
});
}
},
@ -325,7 +325,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
if (this.options.overflowY !== !!b) {
this.options.overflowY = !!b;
BI.nextTick(function () {
self.element.css({overflowY: !!b ? "auto" : "hidden"});
self.element.css({overflowY: b ? "auto" : "hidden"});
});
}
},
@ -375,4 +375,4 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
});
BI.CollectionView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut('bi.collection_view', BI.CollectionView);
BI.shortcut("bi.collection_view", BI.CollectionView);

20
src/base/combination/combo.js

@ -26,7 +26,7 @@ BI.Combo = BI.inherit(BI.Widget, {
popup: {},
comboClass: "bi-combo-popup",
hoverClass: "bi-combo-hover"
})
});
},
_init: function () {
@ -319,31 +319,31 @@ BI.Combo = BI.inherit(BI.Widget, {
switch (o.direction) {
case "bottom":
case "bottom,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'right', 'left'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break;
case "top":
case "top,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break;
case "left":
case "left,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'bottom', 'top'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break;
case "right":
case "right,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'bottom', 'top'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break;
case "top,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'left', 'right'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break;
case "bottom,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['bottom', 'top', 'left', 'right'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break;
case "left,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['left', 'right', 'top', 'bottom'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break;
case "right,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ['right', 'left', 'top', 'bottom'], o.offsetStyle);
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
@ -368,7 +368,7 @@ BI.Combo = BI.inherit(BI.Widget, {
}
if ("adaptHeight" in p) {
this.resetListHeight(p['adaptHeight']);
this.resetListHeight(p["adaptHeight"]);
}
if ("left" in p) {
this.popupView.element.css({

10
src/base/combination/expander.js

@ -18,7 +18,7 @@ BI.Expander = BI.inherit(BI.Widget, {
popup: {},
expanderClass: "bi-expander-popup",
hoverClass: "bi-expander-hover"
})
});
},
_init: function () {
@ -92,13 +92,13 @@ BI.Expander = BI.inherit(BI.Widget, {
self.element[e](function (e) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
self._popupView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.expander);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander);
self.fireEvent(BI.Expander.EVENT_EXPAND);
}
}, function () {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.expander);
self.fireEvent(BI.Expander.EVENT_COLLAPSE);
}
});
@ -113,7 +113,7 @@ BI.Expander = BI.inherit(BI.Widget, {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander);
self.fireEvent(BI.Expander.EVENT_EXPAND);
} else {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.expander);
self.fireEvent(BI.Expander.EVENT_COLLAPSE);
}
}
@ -122,7 +122,7 @@ BI.Expander = BI.inherit(BI.Widget, {
}
break;
}
})
});
},
_initExpander: function () {

18
src/base/combination/group.button.js

@ -16,7 +16,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
hgap: 0,
vgap: 0
}]
})
});
},
_init: function () {
@ -25,7 +25,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
BI.each(this.options.behaviors, function (key, rule) {
behaviors[key] = BI.BehaviorFactory.createBehavior(key, {
rule: rule
})
});
});
this.behaviors = behaviors;
this.populate(this.options.items);
@ -65,7 +65,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
});
btn.on(BI.Events.DESTROY, function () {
BI.remove(self.buttons, btn);
})
});
});
return buttons;
@ -81,8 +81,8 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
el: it
})
]
})
})
});
});
}
return btns;
},
@ -95,8 +95,8 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
}
return BI.extend({}, item, {
el: btns[i]
})
})
});
});
},
_packageItems: function (items, packBtns) {
@ -117,7 +117,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
// 如果是一个简单的layout
_isSimpleLayout: function () {
var o = this.options;
return o.layouts.length === 1 && !BI.isArray(o.items[0])
return o.layouts.length === 1 && !BI.isArray(o.items[0]);
},
doBehavior: function () {
@ -125,7 +125,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
args.unshift(this.buttons);
BI.each(this.behaviors, function (i, behavior) {
behavior.doBehavior.apply(behavior, args);
})
});
},
prependItems: function (items) {

8
src/base/combination/group.combo.js

@ -27,7 +27,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
}]
}
}
})
});
},
_init: function () {
@ -57,7 +57,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
ch.adjustLength = o.adjustLength;
ch.popup = o.popup;
}
})
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
@ -74,13 +74,13 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
items: children
}, o.popup.el)
})
})
});
this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj);
}
})
});
},
getValue: function () {

6
src/base/combination/group.virtual.js

@ -8,7 +8,7 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
hgap: 0,
vgap: 0
}]
})
});
},
render: function () {
@ -26,8 +26,8 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
el: BI.stripEL(it)
})
]
})
})
});
});
}
return items;
},

8
src/base/combination/loader.js

@ -32,7 +32,7 @@ BI.Loader = BI.inherit(BI.Widget, {
next: {},
hasPrev: BI.emptyFn,
hasNext: BI.emptyFn
})
});
},
_prevLoad: function () {
@ -95,7 +95,7 @@ BI.Loader = BI.inherit(BI.Widget, {
if (type === BI.Events.CLICK) {
self._nextLoad();
}
})
});
}
BI.createWidget(BI.extend({
@ -122,7 +122,7 @@ BI.Loader = BI.inherit(BI.Widget, {
return !!o.hasPrev.apply(this, [{
times: this.times,
count: this.count
}])
}]);
},
hasNext: function () {
@ -133,7 +133,7 @@ BI.Loader = BI.inherit(BI.Widget, {
return !!o.hasNext.apply(this, [{
times: this.times,
count: this.count
}])
}]);
},
prependItems: function (items) {

2
src/base/combination/navigation.js

@ -18,7 +18,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
afterCardCreated: BI.emptyFn,
afterCardShow: BI.emptyFn
})
});
},
render: function () {

10
src/base/combination/searcher.js

@ -24,7 +24,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
// isAutoSearch为false时启用
onSearch: function (op, callback) {
callback([])
callback([]);
},
el: {
@ -39,7 +39,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
masker: { // masker层
offset: {}
}
})
});
},
_init: function () {
@ -79,7 +79,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
self._pauseSearch();
break;
}
})
});
},
_assertPopupView: function () {
@ -268,9 +268,9 @@ BI.Searcher = BI.inherit(BI.Widget, {
return this.popupView.getValue();
} else if (o.adapter && o.adapter.getValue) {
return o.adapter.getValue();
} else {
return this.popupView.getValue();
}
return this.popupView.getValue();
},
populate: function (result, searchResult, keyword) {

12
src/base/combination/switcher.js

@ -19,7 +19,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
masker: {},
switcherClass: "bi-switcher-popup",
hoverClass: "bi-switcher-hover"
})
});
},
_init: function () {
@ -89,13 +89,13 @@ BI.Switcher = BI.inherit(BI.Widget, {
self.element[e](function (e) {
if (self.isEnabled() && self.switcher.isEnabled()) {
self._popupView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_EXPAND);
}
}, function () {
if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_COLLAPSE);
}
});
@ -107,10 +107,10 @@ BI.Switcher = BI.inherit(BI.Widget, {
if (self.isEnabled() && self.switcher.isEnabled()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_EXPAND);
} else {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.switcher);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.switcher);
self.fireEvent(BI.Switcher.EVENT_COLLAPSE);
}
}
@ -119,7 +119,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
}
break;
}
})
});
},
_initSwitcher: function () {

4
src/base/combination/tab.js

@ -16,7 +16,7 @@ BI.Tab = BI.inherit(BI.Widget, {
cardCreator: function (v) {
return BI.createWidget();
}
})
});
},
render: function () {
@ -25,7 +25,7 @@ BI.Tab = BI.inherit(BI.Widget, {
this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"});
this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
})
});
}
this.cardMap = {};
this.layout = BI.createWidget({

2
src/base/combination/tree.button.js

@ -8,7 +8,7 @@ BI.ButtonTree = BI.inherit(BI.ButtonGroup, {
_defaultConfig: function () {
return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-button-tree"
})
});
},
_init: function () {

4
src/base/el.js

@ -24,7 +24,7 @@ BI.EL = BI.inherit(BI.Widget, {
});
this.ele.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
})
});
},
setValue: function (v) {
@ -39,4 +39,4 @@ BI.EL = BI.inherit(BI.Widget, {
this.ele.populate.apply(this, arguments);
}
});
BI.shortcut('bi.el', BI.EL);
BI.shortcut("bi.el", BI.EL);

1228
src/base/formula/codemirror/codemirror.js

File diff suppressed because it is too large Load Diff

2
src/base/formula/codemirror/formula-hint.js

@ -64,7 +64,7 @@
return e.getTokenAt(cur);
},
options);
};
}
CodeMirror.registerHelper("hint", "formula", formulaHint);
function getCompletions (token, context, keywords, options) {

10
src/base/formula/codemirror/formula-mode.js

@ -3,14 +3,14 @@
})(function (CodeMirror) {
"use strict";
CodeMirror.defineMode('formula', function () {
CodeMirror.defineMode("formula", function () {
function wordObj (words) {
var o = {};
for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
return o;
}
var atoms = wordObj(['false', 'true']);
var atoms = wordObj(["false", "true"]);
var keywords = wordObj(BI.FormulaCollections);
function tokenBase (stream, state) {
@ -19,16 +19,16 @@
}
var ch = stream.next();
if (ch === '"' || ch === '\'') {
if (ch === "\"" || ch === "'") {
nextUntilUnescaped(stream, ch);
return "string";
}
if (ch === '\u200b') {
if (ch === "\u200b") {
nextUntilUnescaped(stream, ch);
return "field";
}
if (/[\[\],\(\)]/.test(ch)) {
return 'bracket';
return "bracket";
}
// richie:暂时不需要解析操作符号

55
src/base/formula/codemirror/show-hint.js

@ -140,17 +140,19 @@
var editor = this.cm.options.hintOptions;
var out = {};
for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
if (editor) for (var prop in editor)
if (editor[prop] !== undefined) out[prop] = editor[prop];
if (options) for (var prop in options)
if (options[prop] !== undefined) out[prop] = options[prop];
if (editor) {
for (var prop in editor) {if (editor[prop] !== undefined) out[prop] = editor[prop];}
}
if (options) {
for (var prop in options) {if (options[prop] !== undefined) out[prop] = options[prop];}
}
return out;
}
};
function getText (completion) {
if (typeof completion == "string") return completion;
else return completion.text;
if (typeof completion === "string") return completion;
return completion.text;
}
function buildKeyMap (completion, handle) {
@ -182,25 +184,27 @@
function addBinding (key, val) {
var bound;
if (typeof val != "string")
if (typeof val !== "string") {
bound = function (cm) {
return val(cm, handle);
};
}
// This mechanism is deprecated
else if (baseMap.hasOwnProperty(val))
bound = baseMap[val];
else
bound = val;
else if (baseMap.hasOwnProperty(val)) {bound = baseMap[val];} else {bound = val;}
ourMap[key] = bound;
}
if (custom)
for (var key in custom) if (custom.hasOwnProperty(key))
addBinding(key, custom[key]);
if (custom) {
for (var key in custom) {
if (custom.hasOwnProperty(key)) {addBinding(key, custom[key]);}
}
}
var extra = completion.options.extraKeys;
if (extra)
for (var key in extra) if (extra.hasOwnProperty(key))
addBinding(key, extra[key]);
if (extra) {
for (var key in extra) {
if (extra.hasOwnProperty(key)) {addBinding(key, extra[key]);}
}
}
return ourMap;
}
@ -366,19 +370,13 @@
},
changeActive: function (i, avoidWrap) {
if (i >= this.data.list.length)
i = avoidWrap ? this.data.list.length - 1 : 0;
else if (i < 0)
i = avoidWrap ? 0 : this.data.list.length - 1;
if (i >= this.data.list.length) {i = avoidWrap ? this.data.list.length - 1 : 0;} else if (i < 0) {i = avoidWrap ? 0 : this.data.list.length - 1;}
if (this.selectedHint == i) return;
var node = this.hints.childNodes[this.selectedHint];
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
node = this.hints.childNodes[this.selectedHint = i];
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
if (node.offsetTop < this.hints.scrollTop)
this.hints.scrollTop = node.offsetTop - 3;
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
if (node.offsetTop < this.hints.scrollTop) {this.hints.scrollTop = node.offsetTop - 3;} else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) {this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;}
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
},
@ -406,15 +404,16 @@
var found = [];
for (var i = 0; i < options.words.length; i++) {
var word = options.words[i];
if (word.slice(0, token.string.length) == token.string)
found.push(word);
if (word.slice(0, token.string.length) == token.string) {found.push(word);}
}
if (found.length) return {
if (found.length) {
return {
list: found,
from: CodeMirror.Pos(cur.line, token.start),
to: CodeMirror.Pos(cur.line, token.end)
};
}
});
CodeMirror.commands.autocomplete = CodeMirror.showHint;

2
src/base/formula/config.js

File diff suppressed because one or more lines are too long

14
src/base/formula/formulaeditor.js

@ -6,9 +6,9 @@
BI.FormulaEditor = BI.inherit(BI.Single, {
_defaultConfig: function () {
return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(), {
baseCls: 'bi-formula-editor bi-card',
watermark: '',
value: '',
baseCls: "bi-formula-editor bi-card",
watermark: "",
value: "",
fieldTextValueMap: {},
showHint: true,
lineHeight: 2
@ -21,7 +21,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
textWrapping: true,
lineWrapping: true,
lineNumbers: false,
mode: 'formula',
mode: "formula",
// 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
});
@ -32,7 +32,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
CodeMirror.showHint(cm, CodeMirror.formulaHint, {completeSingle: false});
}
BI.nextTick(function () {
self.fireEvent(BI.FormulaEditor.EVENT_CHANGE)
self.fireEvent(BI.FormulaEditor.EVENT_CHANGE);
});
});
@ -115,9 +115,9 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
insertField: function (field) {
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this.editor.replaceSelection('\u200b' + field + '\u200b');
this.editor.replaceSelection("\u200b" + field + "\u200b");
var to = this.editor.getCursor();
this.editor.markText(from, to, {className: 'fieldName', atomic: true, startStyle: "start", endStyle: "end"});
this.editor.markText(from, to, {className: "fieldName", atomic: true, startStyle: "start", endStyle: "end"});
this.editor.replaceSelection(" ");
this.editor.focus();
},

54
src/base/foundation/message.js

@ -43,28 +43,28 @@ $.extend(BI, {
BI.delay(function () {
toast.element.slideUp(500, function () {
toast.destroy();
})
}, 5000)
})
});
}, 5000);
});
},
_show: function (hasCancel, title, message, callback) {
$mask = $('<div class="bi-z-index-mask">').css({
position: 'absolute',
'zIndex': BI.zIndex_tip - 2,
$mask = $("<div class=\"bi-z-index-mask\">").css({
position: "absolute",
zIndex: BI.zIndex_tip - 2,
top: 0,
left: 0,
right: 0,
bottom: 0,
opacity: 0.5
}).appendTo('body');
$pop = $('<div class="bi-message-depend">').css({
position: 'absolute',
'zIndex': BI.zIndex_tip - 1,
}).appendTo("body");
$pop = $("<div class=\"bi-message-depend\">").css({
position: "absolute",
zIndex: BI.zIndex_tip - 1,
top: 0,
left: 0,
right: 0,
bottom: 0
}).appendTo('body');
}).appendTo("body");
var close = function () {
messageShow.destroy();
$mask.remove();
@ -73,10 +73,10 @@ $.extend(BI, {
if (hasCancel === true) {
controlItems.push({
el: {
type: 'bi.button',
type: "bi.button",
text: BI.i18nText("BI-Basic_Cancel"),
height: 30,
level: 'ignore',
level: "ignore",
handler: function () {
close();
if (BI.isFunction(callback)) {
@ -88,7 +88,7 @@ $.extend(BI, {
}
controlItems.push({
el: {
type: 'bi.button',
type: "bi.button",
text: BI.i18nText("BI-Basic_OK"),
height: 30,
handler: function () {
@ -101,30 +101,30 @@ $.extend(BI, {
});
var conf = {
element: $pop,
type: 'bi.center_adapt',
type: "bi.center_adapt",
items: [
{
type: 'bi.border',
cls: 'bi-message-content bi-card',
type: "bi.border",
cls: "bi-message-content bi-card",
items: {
'north': {
north: {
el: {
type: 'bi.border',
cls: 'bi-message-title bi-background',
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: {
type: 'bi.label',
type: "bi.label",
text: title || BI.i18nText("BI-Basic_Prompt"),
textAlign: 'left',
textAlign: "left",
hgap: 20,
height: 50
}
},
east: {
el: {
type: 'bi.icon_button',
cls: 'bi-message-close close-font',
type: "bi.icon_button",
cls: "bi-message-close close-font",
// height: 50,
handler: function () {
close();
@ -136,7 +136,7 @@ $.extend(BI, {
},
height: 50
},
'center': {
center: {
el: {
type: "bi.text",
cls: "bi-message-text",
@ -147,12 +147,12 @@ $.extend(BI, {
text: message
}
},
'south': {
south: {
el: {
type: "bi.absolute",
items: [{
el: {
type: 'bi.right_vertical_adapt',
type: "bi.right_vertical_adapt",
hgap: 5,
items: controlItems
},

16
src/base/grid/grid.js

@ -73,7 +73,7 @@ BI.GridView = BI.inherit(BI.Widget, {
return {
overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),
overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)
}
};
},
_calculateChildrenToRender: function () {
@ -98,7 +98,7 @@ BI.GridView = BI.inherit(BI.Widget, {
this._renderedRowStartIndex = visibleRowIndices.start;
this._renderedRowStopIndex = visibleRowIndices.stop;
var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex)
var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex);
var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex);
@ -204,7 +204,7 @@ BI.GridView = BI.inherit(BI.Widget, {
});
var addedItems = [];
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]])
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 拦截父子级关系
@ -280,11 +280,11 @@ BI.GridView = BI.inherit(BI.Widget, {
},
setColumnCount: function (columnCount) {
this.options.columnCount = columnCount
this.options.columnCount = columnCount;
},
setRowCount: function (rowCount) {
this.options.rowCount = rowCount
this.options.rowCount = rowCount;
},
setOverflowX: function (b) {
@ -292,7 +292,7 @@ BI.GridView = BI.inherit(BI.Widget, {
if (this.options.overflowX !== !!b) {
this.options.overflowX = !!b;
BI.nextTick(function () {
self.element.css({overflowX: !!b ? "auto" : "hidden"});
self.element.css({overflowX: b ? "auto" : "hidden"});
});
}
},
@ -302,7 +302,7 @@ BI.GridView = BI.inherit(BI.Widget, {
if (this.options.overflowY !== !!b) {
this.options.overflowY = !!b;
BI.nextTick(function () {
self.element.css({overflowY: !!b ? "auto" : "hidden"});
self.element.css({overflowY: b ? "auto" : "hidden"});
});
}
},
@ -360,4 +360,4 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut('bi.grid_view', BI.GridView);
BI.shortcut("bi.grid_view", BI.GridView);

22
src/base/layer/layer.floatbox.js

@ -9,7 +9,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
baseCls: "bi-float-box bi-card",
width: 600,
height: 500
})
});
},
_init: function () {
BI.FloatBox.superclass._init.apply(this, arguments);
@ -41,13 +41,13 @@ BI.FloatBox = BI.inherit(BI.Widget, {
});
this._south = BI.createWidget();
BI.createWidget({
type: 'bi.border',
type: "bi.border",
element: this,
items: {
'north': {
north: {
el: {
type: 'bi.border',
cls: 'bi-message-title bi-background',
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: {
@ -63,8 +63,8 @@ BI.FloatBox = BI.inherit(BI.Widget, {
},
east: {
el: {
type: 'bi.icon_button',
cls: 'bi-message-close close-font',
type: "bi.icon_button",
cls: "bi-message-close close-font",
height: 50,
handler: function () {
self.currentSectionProvider.close();
@ -76,7 +76,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
},
height: 50
},
'center': {
center: {
el: {
type: "bi.absolute",
items: [{
@ -88,7 +88,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
}]
}
},
'south': {
south: {
el: {
type: "bi.absolute",
items: [{
@ -102,7 +102,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
height: 60
}
}
})
});
},
populate: function (sectionProvider) {
@ -116,7 +116,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
sectionProvider.rebuildSouth(this._south);
sectionProvider.on(BI.PopoverSection.EVENT_CLOSE, function () {
self.close();
})
});
},
show: function () {

18
src/base/layer/layer.popup.js

@ -7,7 +7,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-popup-view",
maxWidth: 'auto',
maxWidth: "auto",
minWidth: 100,
// maxHeight: 200,
minHeight: 25,
@ -37,7 +37,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
type: "bi.vertical"
}]
}
})
});
},
_init: function () {
@ -53,12 +53,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
"z-index": BI.zIndex_popup,
"min-width": o.minWidth + "px",
"max-width": o.maxWidth + "px"
}).bind({"click": fn});
}).bind({click: fn});
this.element.bind("mousewheel", fn);
o.stopPropagation && this.element.bind({"mousedown": fn, "mouseup": fn, "mouseover": fn});
o.stopEvent && this.element.bind({"mousedown": stop, "mouseup": stop, "mouseover": stop});
o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn});
o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});
this.tool = this._createTool();
this.tab = this._createTab();
this.view = this._createView();
@ -103,7 +103,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
if (false === o.tool) {
return;
}
return BI.createWidget(o.tool)
return BI.createWidget(o.tool);
},
_createTab: function () {
@ -116,7 +116,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
cls: "list-view-tab",
height: 25,
items: o.tabs
})
});
},
_createToolBar: function () {
@ -134,7 +134,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
shadow: true,
isShadowShowingOnSelected: true
})
})
});
},
getView: function () {
@ -155,7 +155,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
tabHeight = this.tab ? (this.tab.attr("height") || 25) : 0,
toolHeight = ((this.tool && this.tool.attr("height")) || 25) * ((this.tool && this.tool.isVisible()) ? 1 : 0);
this.view.resetHeight ? this.view.resetHeight(h - tbHeight - tabHeight - toolHeight - 2) :
this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"})
this.view.element.css({"max-height": (h - tbHeight - tabHeight - toolHeight - 2) + "px"});
},
setValue: function (selectedValues) {

2
src/base/layer/layer.searcher.js

@ -38,7 +38,7 @@ BI.SearcherView = BI.inherit(BI.Pane, {
type: "bi.vertical"
}]
}
})
});
},
_init: function () {

4
src/base/list/listview.js

@ -35,7 +35,7 @@ BI.ListView = BI.inherit(BI.Widget, {
}
}, o.el)],
element: this
}
};
},
mounted: function () {
@ -106,5 +106,5 @@ BI.ListView = BI.inherit(BI.Widget, {
this.restore();
}
});
BI.shortcut('bi.list_view', BI.ListView);
BI.shortcut("bi.list_view", BI.ListView);

4
src/base/list/virtuallist.js

@ -44,7 +44,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
}
}],
element: this
}
};
},
mounted: function () {
@ -175,5 +175,5 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this.restore();
}
});
BI.shortcut('bi.virtual_list', BI.VirtualList);
BI.shortcut("bi.virtual_list", BI.VirtualList);

16
src/base/pager/pager.js

@ -38,7 +38,7 @@ BI.Pager = BI.inherit(BI.Widget, {
},
hasPrev: BI.emptyFn, // pages不可用时有效
hasNext: BI.emptyFn // pages不可用时有效
})
});
},
_init: function () {
BI.Pager.superclass._init.apply(this, arguments);
@ -81,7 +81,7 @@ BI.Pager = BI.inherit(BI.Widget, {
text: prev,
value: "prev",
disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)
})
});
} else {
view.push(BI.extend({
disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)
@ -126,12 +126,12 @@ BI.Pager = BI.inherit(BI.Widget, {
text: s,
value: s,
selected: true
})
});
} else {
view.push({
text: s,
value: s
})
});
}
}
@ -148,7 +148,7 @@ BI.Pager = BI.inherit(BI.Widget, {
text: last,
value: "last",
disabled: !(pages > groups && dict.end < pages && groups !== 0)
})
});
}
// 当前页不为尾页时,输出下一页
@ -157,18 +157,18 @@ BI.Pager = BI.inherit(BI.Widget, {
view.push((function () {
if (BI.isKey(next)) {
if (pages === false) {
return {text: next, value: "next", disabled: o.hasNext(curr) === false}
return {text: next, value: "next", disabled: o.hasNext(curr) === false};
}
return (dict.flow && curr === pages)
?
{text: next, value: "next", disabled: true}
:
{text: next, value: "next", disabled: !(curr !== pages && next || dict.flow)};
} else {
}
return BI.extend({
disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)
}, next);
}
}()));
}

6
src/base/pane.js

@ -14,7 +14,7 @@ BI.Pane = BI.inherit(BI.Widget, {
tipText: BI.i18nText("BI-No_Selected_Item"),
overlap: true,
onLoaded: BI.emptyFn
})
});
},
_init: function () {
@ -44,7 +44,7 @@ BI.Pane = BI.inherit(BI.Widget, {
if (o.overlap === true) {
if (!BI.Layers.has(this.getName())) {
BI.createWidget({
type: 'bi.vtape',
type: "bi.vtape",
items: [{
el: {
type: "bi.layout",
@ -72,7 +72,7 @@ BI.Pane = BI.inherit(BI.Widget, {
right: 0,
top: 0
}]
})
});
}
},

2
src/base/single/a/a.js

@ -15,7 +15,7 @@ BI.A = BI.inherit(BI.Text, {
target: "_blank",
el: null,
element: "<a/>"
})
});
},
_init: function () {
var o = this.options;

16
src/base/single/bar/bar.loading.js

@ -7,10 +7,10 @@ BI.LoadingBar = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, {
baseCls : (conf.baseCls ||"")+' bi-loading-bar bi-tips',
baseCls: (conf.baseCls || "") + " bi-loading-bar bi-tips",
height: 30,
handler: BI.emptyFn
})
});
},
_init: function () {
BI.LoadingBar.superclass._init.apply(this, arguments);
@ -21,25 +21,25 @@ BI.LoadingBar = BI.inherit(BI.Single, {
text: BI.i18nText("BI-Load_More"),
width: 120,
handler: this.options.handler
})
});
this.loaded.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
})
});
this.loading = BI.createWidget({
type: "bi.layout",
width: this.options.height,
height: this.options.height,
cls: "loading-background cursor-default"
})
});
var loaded = BI.createWidget({
type: "bi.center_adapt",
items: [this.loaded]
})
});
var loading = BI.createWidget({
type: "bi.center_adapt",
items: [this.loading]
})
});
this.cardLayout = BI.createWidget({
type: "bi.card",
element: this,
@ -50,7 +50,7 @@ BI.LoadingBar = BI.inherit(BI.Single, {
el: loading,
cardName: "loading"
}]
})
});
this.invisible();
},

2
src/base/single/button/button.basic.js

@ -24,7 +24,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
isShadowShowingOnSelected: false, // 选中状态下是否显示阴影
trigger: null,
handler: BI.emptyFn
})
});
},
_init: function () {
BI.BasicButton.superclass._init.apply(this, arguments);

4
src/base/single/button/button.node.js

@ -12,7 +12,7 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
return BI.extend( conf, {
baseCls: (conf.baseCls || "") + " bi-node",
open: false
})
});
},
_init: function () {
@ -20,7 +20,7 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
var self = this;
BI.nextTick(function () {
self.setOpened(self.isOpened());
})
});
},
doClick: function () {

10
src/base/single/button/buttons/button.icon.js

@ -10,17 +10,17 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
baseCls: (conf.baseCls || "") + " bi-icon-button horizon-center",
iconWidth: null,
iconHeight: null
})
});
},
_init: function () {
BI.IconButton.superclass._init.apply(this, arguments);
var o = this.options;
this.element.css({
textAlign: 'center'
textAlign: "center"
});
this.icon = BI.createWidget({
type: 'bi.icon',
type: "bi.icon",
width: o.iconWidth,
height: o.iconHeight
});
@ -30,11 +30,11 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
type: "bi.default",
element: this,
items: [this.icon]
})
});
} else {
BI.createWidget({
element: this,
type: 'bi.center_adapt',
type: "bi.center_adapt",
items: [this.icon]
});
}

6
src/base/single/button/buttons/button.image.js

@ -13,7 +13,7 @@ BI.ImageButton = BI.inherit(BI.BasicButton, {
src: "",
iconWidth: "100%",
iconHeight: "100%"
})
});
},
_init: function () {
@ -30,14 +30,14 @@ BI.ImageButton = BI.inherit(BI.BasicButton, {
type: "bi.center_adapt",
element: this,
items: [this.image]
})
});
} else {
BI.createWidget({
type: "bi.adaptive",
element: this,
items: [this.image],
scrollable: false
})
});
}
},

10
src/base/single/button/buttons/button.js

@ -13,13 +13,13 @@
_defaultConfig: function (props) {
var conf = BI.Button.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + ' bi-button',
baseCls: (conf.baseCls || "") + " bi-button",
minWidth: (props.block === true || props.clear === true) ? 0 : 90,
shadow: props.clear !== true,
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
level: 'common',
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
textAlign: "center",
@ -33,7 +33,7 @@
bgap: 0,
lgap: 0,
rgap: 0
})
});
},
_init: function () {
@ -68,7 +68,7 @@
type: "bi.horizontal",
items: [this.icon, this.text]
}]
})
});
} else {
this.text = BI.createWidget({
type: "bi.label",
@ -139,6 +139,6 @@
BI.Button.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut('bi.button', BI.Button);
BI.shortcut("bi.button", BI.Button);
BI.Button.EVENT_CHANGE = "EVENT_CHANGE";
})(jQuery);

2
src/base/single/button/buttons/button.text.js

@ -20,7 +20,7 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
rgap: 0,
text: "",
py: ""
})
});
},
_init: function () {

4
src/base/single/button/listitem/blankiconicontextitem.js

@ -26,7 +26,7 @@ BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.BlankIconIconTextItem.superclass._init.apply(this, arguments);
@ -35,7 +35,7 @@ BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {
type: "bi.layout",
width: o.blankWidth,
height: o.height
})
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",

8
src/base/single/button/listitem/blankicontexticonitem.js

@ -27,7 +27,7 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.BlankIconTextIconItem.superclass._init.apply(this, arguments);
@ -43,7 +43,7 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
value: o.value,
keyword: o.keyword,
height: o.height
})
});
var icon1 = BI.createWidget({
type: "bi.center_adapt",
@ -57,7 +57,7 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
height: o.iconHeight
}
}]
})
});
BI.createWidget({
type: "bi.absolute",
element: this,
@ -79,7 +79,7 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
bottom: 0,
right: 0
}]
})
});
BI.createWidget(BI.extend({
element: this

6
src/base/single/button/listitem/blankicontextitem.js

@ -25,7 +25,7 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.BlankIconTextItem.superclass._init.apply(this, arguments);
@ -33,7 +33,7 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
var blank = BI.createWidget({
type: "bi.layout",
width: o.blankWidth
})
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
@ -46,7 +46,7 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
value: o.value,
keyword: o.keyword,
height: o.height
})
});
this.icon = BI.createWidget({
type: "bi.center_adapt",
width: c.commonWidth,

10
src/base/single/button/listitem/icontexticonitem.js

@ -26,7 +26,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.IconTextIconItem.superclass._init.apply(this, arguments);
@ -42,7 +42,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
value: o.value,
keyword: o.keyword,
height: o.height
})
});
var icon1 = BI.createWidget({
type: "bi.center_adapt",
@ -56,11 +56,11 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
height: o.iconHeight
}
}]
})
});
var blank = BI.createWidget({
type: "bi.layout",
width: c.commonWidth
})
});
BI.createWidget({
type: "bi.absolute",
element: this,
@ -81,7 +81,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
bottom: 0,
right: 0
}]
})
});
BI.createWidget(BI.extend({
element: this

2
src/base/single/button/listitem/icontextitem.js

@ -24,7 +24,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.IconTextItem.superclass._init.apply(this, arguments);

2
src/base/single/button/listitem/texticonitem.js

@ -25,7 +25,7 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.TextIconItem.superclass._init.apply(this, arguments);

2
src/base/single/button/listitem/textitem.js

@ -18,7 +18,7 @@ BI.TextItem = BI.inherit(BI.BasicButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.TextItem.superclass._init.apply(this, arguments);

10
src/base/single/button/node/icontexticonnode.js

@ -24,7 +24,7 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.IconTextIconNode.superclass._init.apply(this, arguments);
@ -40,7 +40,7 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
value: o.value,
keyword: o.keyword,
height: o.height
})
});
var icon1 = BI.createWidget({
type: "bi.center_adapt",
@ -54,12 +54,12 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
height: o.iconHeight
}
}]
})
});
var blank = BI.createWidget({
type: "bi.layout",
width: c.commonWidth,
height: o.height
})
});
BI.createWidget({
type: "bi.absolute",
element: this,
@ -80,7 +80,7 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
bottom: 0,
right: 0
}]
})
});
BI.createWidget(BI.extend({
element: this

6
src/base/single/button/node/icontextnode.js

@ -23,7 +23,7 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.IconTextNode.superclass._init.apply(this, arguments);
@ -40,7 +40,7 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
value: o.value,
keyword: o.keyword,
height: o.height
})
});
this.icon = BI.createWidget({
type: "bi.center_adapt",
width: c.commonWidth,
@ -52,7 +52,7 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
height: o.iconHeight
}
}]
})
});
BI.createWidget(BI.extend({
element: this

4
src/base/single/button/node/texticonnode.js

@ -22,7 +22,7 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.TextIconNode.superclass._init.apply(this, arguments);
@ -39,7 +39,7 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
value: o.value,
keyword: o.keyword,
height: o.height
})
});
this.icon = BI.createWidget({
type: "bi.center_adapt",
width: c.commonWidth,

2
src/base/single/button/node/textnode.js

@ -17,7 +17,7 @@ BI.TextNode = BI.inherit(BI.NodeButton, {
textVgap: 0,
textLgap: 0,
textRgap: 0
})
});
},
_init: function () {
BI.TextNode.superclass._init.apply(this, arguments);

14
src/base/single/editor/editor.code.js

@ -7,8 +7,8 @@
BI.CodeEditor = BI.inherit(BI.Single, {
_defaultConfig: function () {
return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), {
baseCls: 'bi-code-editor',
value: '',
baseCls: "bi-code-editor",
value: "",
watermark: "",
lineHeight: 2,
readOnly: false,
@ -32,7 +32,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height");
this.editor.on("change", function (cm, change) {
BI.nextTick(function () {
self.fireEvent(BI.CodeEditor.EVENT_CHANGE)
self.fireEvent(BI.CodeEditor.EVENT_CHANGE);
});
});
@ -96,7 +96,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
_setEnable: function (b) {
BI.CodeEditor.superclass._setEnable.apply(this, arguments);
this.editor.setOption("readOnly", b === true ? false : "nocursor")
this.editor.setOption("readOnly", b === true ? false : "nocursor");
},
_checkWaterMark: function () {
@ -113,11 +113,11 @@ BI.CodeEditor = BI.inherit(BI.Single, {
param = this.options.paramFormatter(param);
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this.editor.replaceSelection('\u200b' + param + '\u200b');
this.editor.replaceSelection("\u200b" + param + "\u200b");
var to = this.editor.getCursor();
var options = {className: 'param', atomic: true};
var options = {className: "param", atomic: true};
if (BI.isNotNull(param.match(/^<!.*!>$/))) {
options.className = 'error-param';
options.className = "error-param";
}
options.value = value;
this.editor.markText(from, to, options);

14
src/base/single/editor/editor.js

@ -22,7 +22,7 @@ BI.Editor = BI.inherit(BI.Single, {
allowBlank: false,
watermark: "",
errorText: ""
})
});
},
_init: function () {
@ -38,12 +38,12 @@ BI.Editor = BI.inherit(BI.Single, {
allowBlank: o.allowBlank
}));
this.editor.element.css({
"width": "100%",
"height": "100%",
"border": "none",
"outline": "none",
"padding": "0",
"margin": "0"
width: "100%",
height: "100%",
border: "none",
outline: "none",
padding: "0",
margin: "0"
});
if (BI.isKey(this.options.watermark)) {
this.watermark = BI.createWidget({

2
src/base/single/editor/editor.multifile.js

@ -15,7 +15,7 @@ BI.MultifileEditor = BI.inherit(BI.Single, {
maxSize: -1, // 1024 * 1024
accept: "",
url: ""
})
});
},
_init: function () {

12
src/base/single/editor/editor.textarea.js

@ -7,8 +7,8 @@
BI.TextAreaEditor = BI.inherit(BI.Single, {
_defaultConfig: function () {
return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), {
baseCls: 'bi-textarea-editor bi-card',
value: ''
baseCls: "bi-textarea-editor bi-card",
value: ""
});
},
_init: function () {
@ -21,7 +21,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
height: "100%",
cls: "bi-textarea textarea-editor-content display-block"
});
this.content.element.css({"resize": "none"});
this.content.element.css({resize: "none"});
BI.createWidget({
type: "bi.absolute",
element: this,
@ -92,7 +92,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
self.focus();
});
BI.createWidget({
type: 'bi.absolute',
type: "bi.absolute",
element: this,
items: [{
el: this.watermark,
@ -100,7 +100,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
top: 0,
right: 0
}]
})
});
} else {
this.watermark.setText(o.watermark);
this.watermark.setValid(!o.invalid);
@ -144,7 +144,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
this.element.css(style);
this.content.element.css(BI.extend({}, style, {
color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor)
}))
}));
},
getStyle: function () {

2
src/base/single/icon/icon.js

@ -9,7 +9,7 @@ BI.Icon = BI.inherit(BI.Single, {
return BI.extend(conf, {
tagName: "i",
baseCls: (conf.baseCls || "") + " x-icon b-font horizon-center display-block"
})
});
},
_init: function () {
BI.Icon.superclass._init.apply(this, arguments);

6
src/base/single/iframe/iframe.js

@ -12,7 +12,7 @@ BI.Iframe = BI.inherit(BI.Single, {
src: "",
width: "100%",
height: "100%"
})
});
},
_init: function () {
@ -40,11 +40,11 @@ BI.Iframe = BI.inherit(BI.Single, {
},
getWidth: function () {
return this.options.width
return this.options.width;
},
getHeight: function () {
return this.options.height
return this.options.height;
}
});

2
src/base/single/img/img.js

@ -14,7 +14,7 @@ BI.Img = BI.inherit(BI.Single, {
src: "",
width: "100%",
height: "100%"
})
});
},
_init: function () {

2
src/base/single/input/checkbox.js

@ -14,7 +14,7 @@ BI.Checkbox = BI.inherit(BI.IconButton, {
height: 16,
iconWidth: 16,
iconHeight: 16
})
});
},
_init: function () {

2
src/base/single/input/input.js

@ -13,7 +13,7 @@ BI.Input = BI.inherit(BI.Single, {
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn, // 按确定键能否退出编辑
allowBlank: false
})
});
},
_init: function () {

2
src/base/single/input/radio.js

@ -14,7 +14,7 @@ BI.Radio = BI.inherit(BI.IconButton, {
height: 16,
iconWidth: 16,
iconHeight: 16
})
});
},
_init: function () {

10
src/base/single/label/label.js

@ -21,7 +21,7 @@ BI.Label = BI.inherit(BI.Single, {
text: "",
py: "",
keyword: ""
})
});
},
_createJson: function () {
@ -226,7 +226,7 @@ BI.Label = BI.inherit(BI.Single, {
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
})
});
},
_createNotCenterEl: function () {
@ -344,7 +344,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json)
this.text = BI.createWidget(json);
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
@ -424,7 +424,7 @@ BI.Label = BI.inherit(BI.Single, {
type: "bi.layout",
element: this.text,
scrollable: o.whiteSpace === "normal"
})
});
},
doRedMark: function () {
@ -453,7 +453,7 @@ BI.Label = BI.inherit(BI.Single, {
},
setStyle: function (css) {
this.text.setStyle(css)
this.text.setStyle(css);
},
setValue: function (v) {

2
src/base/single/link/link.js

@ -10,7 +10,7 @@ BI.Link = BI.inherit(BI.Label, {
baseCls: (conf.baseCls || "") + " bi-link",
href: "",
target: "_blank"
})
});
},
_createJson: function () {

2
src/base/single/single.js

@ -19,7 +19,7 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null,
tipType: null, // success或warning
value: null
})
});
},
_showToolTip: function (e, opt) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save