24 Jan 2025 09:50 AM
Hi,
We can't seem to be able to fit our requirements for data visualization into the current dashboard visual "Categorical", as we require some additional stacking / grouping.
Is there any plan in the future to be able to deploy our own corporate custom visual for dashboards and / or notebooks, that we could then select from the list of visuals?
Even if the settings page would be a json or a yaml, it would still be quite useful. There's a lot we could do without actually going with full blown custom app extension - without having to do the whole page with a custom app.
As an example, I have a dashboard where I already have 10 + timeseries bar chart.
Now, because of this request I have to add 2 custom non timeseries based stacked bar charts, it seems to me that currently my only option is to rebuild the whole page as a custom extension app page, but it means I have to rebuild the 10 existing visuals as well on the page (customers want all of this on one page).
Thanks,
Zoltan
Solved! Go to Solution.
24 Jan 2025 09:53 AM
Hi @Zoltan ,
Can you be more specific about what you're missing with the categorical bar chart?
JFYI the visualizatiuon already supports stacking / grouping.
24 Jan 2025 10:48 AM
Hi Mikele,
Thanks for the prompt reply.
I can't seem to find how to display these records, so that each bar is a data.area, and each bar is stacked by pg_int. I can do that with Bar chart, but Bar chart requires a time field. Histogram requires a range, that's not applicabe here either - it's just classical sub category.
For the sake of simplicity, here's a sample data that represents the structure that I fetch with some more complext DQL:
data json: """
[{
"pg_int": "1",
"data.area": "01A",
"num_items": 32730
},
{
"pg_int": "2",
"data.area": "02A",
"num_items": 8640
},
{
"pg_int": "1",
"data.area": "02A",
"num_items": 36276
},
{
"pg_int": "2",
"data.area": "02A",
"num_items": 4320
}]
"""
When I look at
https://developer.dynatrace.com/design/components-preview/charts/CategoricalBarChart/ it's quite straight forward how to do stacked bars based on sub categories, but I can't seem to find any information on how to achieve the same with
And neither the doc mentions anything about how to select column for stacking.
Screenshots attached.
/Z
27 Jan 2025 10:14 AM
Hi @Zoltan ,
I think that the issue is the way in which your data is structured. Here are 2x examples that I just created:
Let me know if this helps 🙂
27 Jan 2025 02:32 PM
Hello,
I'm having similar issue with categorical visualization.
The proposed solution seems to work with test data, but I see the record content has to be at the root level.
By working with logs, I managed to build a record similar to your example but the created record is inside a field, not at the root.
If I take your example it would look like this:
data record(r = record(name = "01A", pg_int_1 = 32730, pg_int_2 = 0)),
record(r =record(name = "02A", pg_int_1 = 36276, pg_int_2 = 8640))
How do you do to have the content of the record at the root level to be able to use categorical vizualisation ?
Regards
27 Jan 2025 02:45 PM - edited 27 Jan 2025 02:49 PM
For that you could use the fieldsFlatten command - https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/commands/stru...
data record(r = record(name = "01A", pg_int_1 = 86598, pg_int_2 = 0)),
record(r = record(name = "02A", pg_int_1 = 26253, pg_int_2 = 8640))
| fieldsFlatten r
| fieldsRemove r
27 Jan 2025 03:13 PM
Hello @MikeleH ,
Thanks a lot, at first I thought it was not working with fieldsFlatten but the prefix added by this function seems to do the job and I confirm I'm able to use categorical visualization with it.
Again thank you
Regards