| | |
| | | _config.style.height = 'auto' |
| | | _config.style.minHeight = _config.plot.height + 30 |
| | | |
| | | if (!_config.plot.legend || _config.plot.legend === 'hidden') { |
| | | _config.plot.legend = false |
| | | } |
| | | |
| | | if (_config.plot.title) { |
| | | _config.style.minHeight = _config.style.minHeight + 45 |
| | | } |
| | |
| | | chart.axis(plot.Xaxis, plot.$xc) |
| | | chart.axis(_valfield, plot.$yc) |
| | | |
| | | if (!plot.legend || plot.legend === 'hidden') { |
| | | if (!plot.legend) { |
| | | chart.legend(false) |
| | | } else { |
| | | chart.legend({ |
| | |
| | | |
| | | if (!isNaN(max)) { |
| | | max = Math.ceil(max) |
| | | let s = Math.pow(10, (max + '').length - 1) |
| | | let s = max > 10 ? Math.pow(10, (max + '').length - 2) : 1 |
| | | max = Math.ceil(max / s) * s |
| | | } else { |
| | | max = 0 |
| | |
| | | }) |
| | | } |
| | | |
| | | let noLegend = !plot.legend || plot.legend === 'hidden' |
| | | if (noLegend) { |
| | | if (!plot.legend) { |
| | | chart.legend(false) |
| | | } else { |
| | | chart.legend({ |
| | |
| | | view1.scale('value', c) |
| | | view1.axis('value', plot.$yc) |
| | | |
| | | if (!noLegend) { |
| | | if (plot.legend) { |
| | | view1.legend(false) |
| | | } |
| | | |
| | |
| | | |
| | | view2.data(dv.rows) |
| | | |
| | | if (!noLegend) { |
| | | if (plot.legend && plot.Bar_axis) { |
| | | view2.legend(false) |
| | | } |
| | | |
| | |
| | | chart.axis(plot.Xaxis, plot.$xc) |
| | | chart.axis(_valfield, plot.$yc) |
| | | |
| | | if (!plot.legend || plot.legend === 'hidden') { |
| | | if (!plot.legend) { |
| | | chart.legend(false) |
| | | } else { |
| | | chart.legend({ |