Execute a Stored Procedure from mySQL database table into my Bar Chart & Easy Chart

I am trying to implement Bar Chart & Easy Chart for my logged KWh values. These values have been logged in a mySQL database table and I am trying to extract KWh Consumption on variable time-period basis. For this purpose, I have created a Stored Procedure in mySQL & am trying to Call this Stored Procedure into Bar Chart & Easy Chart with a selectivity on basis of Historical Date/Popup Calendar.
I tested the same with a Table and Column Selector, which worked quite easily. The script which I implemented on my Table & Column Selector is as follows;-
<call = system.db.createSProcCall(“meter_historian.Test”)
<results = call.getResultSet()

<table = event.source.parent.getComponent("Table") <table.data = results <event.source.Data_in= results <event.source.Data_out= results

How could I use similar script onto my Bar Chart & Easy Chart.


Does it need to be a script? Just bind the DATA property of the Easy Chart or Bar Chart to an SQL query. In your query, call the SP with whatever parameters you need. (Note, my example shown is probably for calling an SP in MS SQL…)

The parameters you call can be bound to elements on your page to a calendar selector so it’s dynamic.

I tried applying SP directly into SQL query binding of Data property but it didn’t fetch the data.
And even if it did, how will I provide column selectivity, i.e. selectivity similar to Column Selector and Table. I tried binding Column Selector with Bar Chart but that didn’t work either.
Could you suggest a better way to provide selectivity so that it stays interactive for the User. He just has to select respective datetime and his choice of tags & Bar Chart component does the rest.

P.S. I saw a somewhat similar feature in Demo wherein Ad-Hoc Chart was prepared with Tag Browser & DB selection. I would need a simplified version of what’s done in there.