forked from 0x2620/oxjs
self.setOption ~> that.update
This commit is contained in:
parent
9ee0742b53
commit
005d50c389
56 changed files with 919 additions and 933 deletions
|
|
@ -34,6 +34,12 @@ Ox.Chart = function(options, self) {
|
|||
width: 512
|
||||
})
|
||||
.options(options || {})
|
||||
.update({
|
||||
width: function() {
|
||||
self.$chart.empty();
|
||||
renderChart();
|
||||
}
|
||||
})
|
||||
.addClass('OxChart')
|
||||
.css({
|
||||
width: self.options.width + 'px',
|
||||
|
|
@ -266,13 +272,6 @@ Ox.Chart = function(options, self) {
|
|||
return $element;
|
||||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'width') {
|
||||
self.$chart.empty();
|
||||
renderChart();
|
||||
}
|
||||
}
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue