the required
chartData needs to be populated from a call to the server.
So the flow would be like this:
1. A
servlet which would read your request for data, connect to the DB, and return the data.
2. Call this servlet end point from your Dojo and populate the
chartData with the response received from the servlet.
To return a response from Servlet have a look at JSON. You would basically need to return a JSON array of integers from your servlet.
Hope you are aware of writing a servlet?
So you got to learn the following to achieve your requirement:
1. Writing a Servlet which reads the request parameters for any data your are passing and interact with the DB.
2. Read about JSON and how you can return JSON response from Servlet. For creating JSON content you can have a look at GSON or Jackson Object Mapper.
3. Call this API from your Dojo code.