locked
Kendo UI Example : Barchart based on LS Query result RRS feed

  • Question

  • First of all, I am new to anything related to the HTML Client. 

    I have followed the Kendo UI example and have created a bar chart with a hardcoded JSON Object as the example did before the WebAPI Section (On which i am totally lost...)

    A "real world" scenario would be to show the chart based on data from a query that has some parameters that can be changed on the screen, such as a dropdown to choose between "bar, lounge or dining" to be displayed. 

    I realize the WebApi does something of that nature, however is it possible to implement this simply based on screen data ? 


    Friday, April 26, 2013 12:00 AM

Answers

  • Hi,

    Just a suggestion: Please re-use your thread instead of creating multiple ones asking the same question. That will help everyone.

    I believe I answered your question here.

    Best regards,
    Huy Nguyen

    • Marked as answer by Angie Xu Tuesday, May 7, 2013 2:43 AM
    Monday, April 29, 2013 9:13 PM

All replies

  • There are various solutions to your question.

    Since the HTML Client is implemented as a Single Page Application (SPA), you might have to rethink "typical" solutions to solving this problem.

    What I mean by this that there is a Location Browse screen that allows the user to choose which location to view the details on. When the user navigates to the View Details screen for the Location and choose the Reports tab, they will see the chart for that location.

    If you want a chart for the data in each seating area, one possible solution would be to follow the present SPA model and implement a Seating Area Browse screen from within the Location View Details screen and allow a user to go to a View Details screen for particular seating area, along with a Reports tab for a chart for that seating area, instead of a drop down box (which doesn't exist in the HTML client because it is not a touch-centric control) as you brought up.

    I'll also mention that the Kendo DataViz control provides a way to programmatically update the data you are getting from the WebAPI endpoint, just in case you need to refresh the data (you would need to create a button in the command bar to refresh the chart and then write a custom method). You can also use the Kendo control to monitor for change events on the data.

    Also, the Kendo control has several options for server or client side aggregate functions (average, count, min, max, and sum), data grouping, data sorting, as well as server or client side filtering functions.

    Lastly, you can always pass parameters into a WebAPI endpoint as part of the URL through the normal HTML convention of using the "?" followed by the parameter/value pairs separated by the "&" character.

    Just be careful when using parameters to return different data, especially if the shape of the dataset chages, because the custom control is setup to render only one dataset shape. You could spend a lot of time paramaterizing the attributes of the custom control to dynamically adapt to different data, but it will be prone to conplexity and errors. It is usually best to keep the model simple and implement seperate custome controls for different datasets.

    Let me know if I'm being to vaugue...


    -Christopher DeMars

    Friday, April 26, 2013 7:15 PM
  • Hi,

    Just a suggestion: Please re-use your thread instead of creating multiple ones asking the same question. That will help everyone.

    I believe I answered your question here.

    Best regards,
    Huy Nguyen

    • Marked as answer by Angie Xu Tuesday, May 7, 2013 2:43 AM
    Monday, April 29, 2013 9:13 PM