4 Replies Latest reply: Feb 25, 2013 3:53 PM by 58474 RSS

    add chart series on demand

    58474
      Hi all,
      I'm running Apex 4.2.1

      I have requirement to create a chart where at the top I'll have a list of departments, every time a user click on a Department a new series should be added to the chart with information about that department.

      Can that be done in Apex?

      Thank you,

      Edited by: gsirvas on Feb 25, 2013 1:33 PM
        • 1. Re: add chart series on demand
          716769
          You can create a checkbox item containing your department values and write your chart query that it filters the values based on the item value.
          • 2. Re: add chart series on demand
            58474
            The problem is that the list of departments needs to be dynamic because departments can be added at any time so If i hardcode the list of departments I'll also have to change the app. So the list of departments is gonna have to be either a report or a functionality in a chart that allows me to add series on fly.
            Thank you,

            Edited by: gsirvas on Feb 25, 2013 3:33 PM
            • 3. Re: add chart series on demand
              TexasApexDeveloper
              So how do you add departments? Are they store in a table? If so then you could have a method for the user to select the required departments, and build your query for your chart as a function returning query. In the function you can determine what departments have been selected..


              here is a blog with an example: http://ruepprich.wordpress.com/2011/03/31/apex-4-charts-dynamically-adding-a-series-2/

              Thank you,

              Tony Miller
              Ruckersville, VA
              • 4. Re: add chart series on demand
                58474
                That is correct, they are stored in a table.
                Thanks for the link I'll give it a try.