- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-16-2024 11:45 PM
Hi,
I am considering setting non-datetime type data on the horizontal axis of a Widget.
However, it doesn't seem possible to create such a graph from the Widget creation screen.
If it is possible to create a graph using methods such as script-based creation, I would appreciate it if you could tell me how. I have checked the page at the following link, but I could not understand a specific solution.
(This sentence is being translated by Chat-GPT.)
10-08-2024 01:19 AM
Hi @MEiunyo1 ,
You need to create an automation with "widget" tag and from the dashboard menu please click + sign and select script. From this screen, you need to select the script that you developed. In the admin guide, there are sample scripts for each type. For your need, you can use the below structure and change the returned data. For example, I changed the date with A,B,C,D,E.
data = [
{"name": "2018-04-12", "data": [10], "groups": [{"name": "Unclassified", "data": [10] }]},
{"name": "2018-04-10", "data": [3], "groups": [{"name": "Unclassified", "data": [2] }, {"name": "Access", "data": [1] }]},
{"name": "2018-04-17", "data": [1], "groups": [{"name": "Unclassified", "data": [1] }]},
{"name": "2018-04-16", "data": [34], "groups": [{"name": "Unclassified", "data": [18] }, {"name": "Phishing", "data": [14] }]},
{"name": "2018-04-15", "data": [17], "groups": [{"name": "Access", "data": [17] }]}
];
demisto.results(json.dumps(data));
10-08-2024 01:19 AM
Hi @MEiunyo1 ,
You need to create an automation with "widget" tag and from the dashboard menu please click + sign and select script. From this screen, you need to select the script that you developed. In the admin guide, there are sample scripts for each type. For your need, you can use the below structure and change the returned data. For example, I changed the date with A,B,C,D,E.
data = [
{"name": "2018-04-12", "data": [10], "groups": [{"name": "Unclassified", "data": [10] }]},
{"name": "2018-04-10", "data": [3], "groups": [{"name": "Unclassified", "data": [2] }, {"name": "Access", "data": [1] }]},
{"name": "2018-04-17", "data": [1], "groups": [{"name": "Unclassified", "data": [1] }]},
{"name": "2018-04-16", "data": [34], "groups": [{"name": "Unclassified", "data": [18] }, {"name": "Phishing", "data": [14] }]},
{"name": "2018-04-15", "data": [17], "groups": [{"name": "Access", "data": [17] }]}
];
demisto.results(json.dumps(data));
10-08-2024 05:15 PM
Hi, @gyldz .
Thank you for your wonderful reply.
So you can create such graphs using scripts.
I'll look into the scripts for creating the graphs I want to make right away.
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!