fix: sect_currency urldata crash, switch to render_urldata method
The 4 period buttons used actiontype:urldata which calls
_buildDataHandler requiring desc.status_of[data.status] mapping.
Neither was provided, causing 'Cannot read properties of
undefined (reading undefined)' crash.
Fix: use actiontype:method with method:render_urldata (ChartBar's
inherited EchartsExt method). ChartBar's data_url now uses
data_params={'period':'all'} for default, buttons pass {period:x}
via render_urldata params.
This commit is contained in:
parent
8ae3c1154e
commit
990c35a953
@ -17,16 +17,17 @@
|
||||
"id": "financial_chart",
|
||||
"options": {
|
||||
"height": "180px",
|
||||
"data_url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=all",
|
||||
"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": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=all"}},
|
||||
{"wid": "btn_year", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=year"}},
|
||||
{"wid": "btn_month", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=month"}},
|
||||
{"wid": "btn_today", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=today"}}
|
||||
{"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"}}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user