SpagoBI: create a dynamic chart using SpagoBI

ε祈祈猫儿з 提交于 2019-12-12 01:50:01

问题


I am starting with SpagoBI, I managed to display a static chart using Highchart, what I want to do is a dynamic chart means if my data set is updated I want my chart to be updated as well, without manually refreshing the web page. like the example under this link [1] I used SpagoBi studio to deploy the chart, I tested the option of "refresh Seconds" (I edited to 1 second) while deploying but it is not working.

How can I do that?

Update: the chart template:

<HIGHCHART width="100%" height="100%">
  <CHART defaultSeriesType="spline" zoomType="xy"/>
  <TITLE text="Temperature 1"/>
  <LEGEND/>
  <SUBTITLE/>
  <X_AXIS allowDecimals="true" maxZoom="4" min="0" tickWidth="1" type="linear" alias="recvTime">
    <TITLE/>
  </X_AXIS>
  <Y_AXIS maxPadding="0.0" maxZoom="4" tickWidth="1" type="linear" alias="attrValue">
    <TITLE/>
  </Y_AXIS>
  <PLOT_OPTIONS>
    <SPLINE stacking="">
      <DATA_LABELS/>
    </SPLINE>
  </PLOT_OPTIONS>
  <DRILL>
    <PARAM_LIST/>
  </DRILL>
  <SERIES_LIST>
    <SERIES name="Temperature" alias="recvTime,attrValue" type="spline"/>
  </SERIES_LIST>
</HIGHCHART>

[1]http://www.highcharts.com/demo/dynamic-update


回答1:


try setting the refresh_time property:

<HIGHCHART refresh_time='5' width="100%" height="100%" > ....

Hope this help!




回答2:


I'm not able to reproduce your problem with the "Refresh seconds" option... are you using the FIWARE package or another SpagoBI version? Anyway, using the "Refresh seconds" option, the chart will be re-created from scratch at the specified rate, not updated as the Highchart example. Charts provided by SpagoBI with the ExtJS library can be refreshed: just specify "refreshTime" in the template XML root tag:

<EXTCHART refreshTime='10'...

this will let the chart refresh its data without being re-created from scratch. But, refreshing data is still not exactly the "time shifting" functionality as in the Highcharts example; if you are looking for that, you should have a look at the Console[1] engine.

Best regards

Davide

[1] http://wiki.spagobi.org/xwiki/bin/view/spagobi_server/Console



来源:https://stackoverflow.com/questions/31985057/spagobi-create-a-dynamic-chart-using-spagobi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!