0

Bar Chart: Interactive/Drill Down

I have a bar charts for number of stops by month, week, and day. I have another bar chart with # of stops per machine in the line (to get a breakdown of total stops). I can manually change the TimeStart, AggregateInterval, and TimeDuration values of my "per machine" bar chart as needed. I'd like to make this change automatically though based on the bar that the user clicks in another bar chart. For example, if I click a bar (e.g. in the month chart), my "by machine" chart would change to be for a week using the start date/time of the week I select in my total stops per week bar chart. 

Is anything like this possible? I thought maybe scripting but I haven't used scripting much yet and wasn't sure. 

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi James Wise

    Unfortunately we don't have a way of doing this currently. There is an OnClick function available, but it wouldn't recognize which bar you are actually clicking within the chart. I will copy this request over to our Axiom Features section.

    Like 1
    • Steve Mason Thank you! One more thought.... What about being able to use the "Date Time Picker" control in Axiom to fill in the "TimeStart" of a bar chart? I'm not sure that buys us much over just editing the bar chart and changing the TimeStart but just curious if you would have an existing example of using that with scripting to change the bar chart.

      Like
    • James Wise 

      That would probably work. I just don't have any example of it. It would be a little nicer than having to put the application in edit mode though. You would essentially update the start time of the bar chart whenever the datetime picker is updated with the OnDateTimeChange function.

      Like
    • Thank you, I got it. In case it helps others.....

      • My date time picker is called "DTP_StopCharts".
      • My stop charts are named: ByMachine, Calendar, Card
      • My script has the following
        • First, I default the date time picker to today for when they open the app (OnScreenVisible)
        • Second, I use the OnDateTimeChange of the picker to update the start date of the bar charts

      Copy/Paste of the relevant script sections are below

            public void OnScreenVisible()
              {
              //Default Date Time Picker value to today (so stop starts are for today by default)
              DTP_StopCharts.DateTime=System.DateTime.Today;

              public void DTP_StopCharts_OnDateTimeChange(object sender, DateTime dateTime)
              {
                  //Update Start Date of stop charts based on date time picker value
                  //Had to use ".Date" otherwise it was returning UTC time (e.g. 4 AM during Daylight Savings instead of 12 AM)
                  ByMachine.TimeStart=DTP_StopCharts.DateTime.Date.ToString();
                  Calendar.TimeStart=DTP_StopCharts.DateTime.Date.ToString();
                  Card.TimeStart=DTP_StopCharts.DateTime.Date.ToString();
              }

      Like 1
Like Follow
  • Status Answered
  • 8 mths agoLast active
  • 4Replies
  • 50Views
  • 3 Following