How to filter chart input of X and Y axis using dropdown menu. RRS feed

  • Question

  • User816268407 posted

    I want to build a dashboard of employee data. I am looking to filter the data by selecting the values using dropdown and build chart based on these selections. Basically I want to change the attribute values at runtime for ex. I want to see chart of particular employee by selecting his name from 1st dropdown, likewise I also want to select another value from dropdown say his target sales and the chart should be rendered accordingly.

    Tuesday, March 30, 2021 4:46 PM


  • User409696431 posted

    Are you using the asp.net chart control?   If so, there are many examples at https://www.4guysfromrolla.com/articles/072209-1.aspx

    You would modify your database query for the chart based on the values in the dropdowns and re-render the chart.  Note the example at the end of https://www.4guysfromrolla.com/articles/072909-1.aspx which shows a chart driven by selections from dropdowns.  (The example is in VB.net but would be easily written in C#.)  If you want to examine the complete code, the article includes a link at the bottom ("Attachments") to download the code for the examples.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 31, 2021 4:52 AM