{ "widgettype": "VBox", "options": {"width": "100%", "gap": "8px"}, "subwidgets": [ { "widgettype": "HBox", "options": {"gap": "4px"}, "subwidgets": [ {"widgettype": "Button", "id": "btn_all", "options": {"label": "累计", "i18n": true}}, {"widgettype": "Button", "id": "btn_year", "options": {"label": "当年", "i18n": true}}, {"widgettype": "Button", "id": "btn_month", "options": {"label": "当月", "i18n": true}}, {"widgettype": "Button", "id": "btn_today", "options": {"label": "当天", "i18n": true}} ] }, { "widgettype": "ChartBar", "id": "financial_chart", "options": { "height": "180px", "data_url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}", "data_params": {"period": "all"}, "nameField": "metric", "valueFields": ["value"] } } ], "binds": [ {"wid": "btn_all", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "all"}}, {"wid": "btn_year", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "year"}}, {"wid": "btn_month", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "month"}}, {"wid": "btn_today", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "today"}} ] }