Couldn't sort by date in bar graph widget in Dashboard

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Couldn't sort by date in bar graph widget in Dashboard

L2 Linker

We couldn't sort by date in bar graph widget in custom dashboard. We are in XSOAR 8.7.

Please assist.

 

 

3 REPLIES 3

L0 Member

Same here. By default, the 'bar chart' is sorted by count. There is no option to sort by date. 

Again, same issue. That is rather annoying that it is not possible to sort by day, week or month.

L0 Member

I found a solution to this at JSON File Widget Example • Cortex XSOAR Administrator Guide • Reader • Palo Alto Networks documentat....  Tested under 6.13.

  1. Create and save the widget.  Group by day, week, or month.
  2. Edit the widget, then click on "Download as JSON" from the edit screen.  Close the edit screen.
  3. Edit the JSON, to add this line to the structure:  
      "sort": [{ "field": "occurred", "asc": true }]​
  4. From the Widget Library, click on the + sign to add a new widget.
  5. Select the "Upload" option from the "+" menu, and upload the modified JSON.
  6. Remove the old widget from your dashboard.
  7. Add the updated widget to your dashboard.

Once this is done, you can add multiple copies of the sorted widget and modify them as needed.

Here's the sample file:

{
    "dataType": "incidents",
    "widgetType": "column",
    "params": {
      "groupBy": [
        "occurred(d)",
        "type"
      ],
      "valuesFormat": "abbreviated",
      "timeFrame": "days"
    },
    "dateRange": {
      "period": {
        "byFrom": "days",
        "fromValue": 7
      }
    },
    "propagationLabels": [
      "all"
    ],
    "customCalculation": {
      "operation": "count",
      "fieldName": "",
      "expression": ""
    },
    "name": "Change Sort Order In Column Chart - Sort by Date",
    "sort": [{ "field": "occurred", "asc": true }]
  }
  • 680 Views
  • 3 replies
  • 2 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!