* Fix bug 40120.

This commit is contained in:
songchenxuan
2023-11-03 09:53:17 +08:00
parent 734d6b74b6
commit 9e366e3e30
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -17,6 +17,12 @@ function ajaxGetChart(check = true, chart = DataStorage.chart, echart = window.e
var data = JSON.parse(resp);
if(echart)
{
if(chartParams.settings[0].type == 'waterpolo')
{
data.series[0].label.formatter = function(params) { return (params.value * 100).toFixed(2) + '%';};
data.tooltip.formatter = function(params) { return (params.value * 100).toFixed(2) + '%';};
}
echart.resize();
echart.clear();
echart.setOption(data, true);
+2 -2
View File
@@ -620,9 +620,9 @@ class chartModel extends model
$molecule = $this->dao->query($moleculeSQL)->fetch();
$denominator = $this->dao->query($denominatorSQL)->fetch();
$percent = round($molecule->count / $denominator->count, 2);
$percent = round($molecule->count / $denominator->count, 4);
$series = array(array('type' => 'liquidFill', 'data' => array($percent), 'outline' => array('show' => false), 'label' => array('fontSize' => 30)));
$series = array(array('type' => 'liquidFill', 'data' => array($percent), 'outline' => array('show' => false), 'label' => array('fontSize' => 26)));
$tooltip = array('show' => true);
$options = array('series' => $series, 'tooltip' => $tooltip);