* Fix bug for setting.
This commit is contained in:
@@ -1521,6 +1521,36 @@ class screenModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get waterpolo option.
|
||||
*
|
||||
* @param object $component
|
||||
* @param object $chart
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getWaterPoloOption($component, $chart)
|
||||
{
|
||||
if(!$chart->settings)
|
||||
{
|
||||
$component->request = json_decode('{"requestDataType":0,"requestHttpType":"get","requestUrl":"","requestIntervalUnit":"second","requestContentType":0,"requestParamsBodyType":"none","requestSQLContent":{"sql":"select * from where"},"requestParams":{"Body":{"form-data":{},"x-www-form-urlencoded":{},"json":"","xml":""},"Header":{},"Params":{}}}');
|
||||
$component->events = json_decode('{"baseEvent":{},"advancedEvents":{}}');
|
||||
$component->key = "PieCircle";
|
||||
$component->chartConfig = json_decode('{"key":"WaterPolo","chartKey":"VWaterPolo","conKey":"VCWaterPolo","title":"水球图","category":"Mores","categoryName":"更多","package":"Charts","chartFrame":"common","image":"water_WaterPolo.png"}');
|
||||
$component->option = json_decode('{"type":"nomal","series":[{"type":"liquidFill","radius":"90%","roseType":false}],"backgroundColor":"rgba(0,0,0,0)"}');
|
||||
|
||||
return $this->setComponentDefaults($component);
|
||||
}
|
||||
else
|
||||
{
|
||||
$setting = json_decode($chart->settings, true)[0];
|
||||
$options = $this->loadModel('chart')->genWaterPolo(json_decode($chart->fieldSettings, true), $setting, $chart->sql, json_decode($chart->filters, true));
|
||||
|
||||
$component->option->dataset = $options['series'][0]['data'][0];
|
||||
return $this->setComponentDefaults($component);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build radar chart.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user