Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am creating a custom bar chart using sampleBarChart to show duration of my tests, in addition in need to show passed and failed tests using different colours for each bar.
These are my data roles in capabilities.json . The Legend data role will contain the result for each test.
"dataRoles": [ { "displayName": "Category Data", "name": "category", "kind": "Grouping" }, { "displayName": "Measure Data", "name": "measure", "kind": "Measure" }, { "displayName": "Legend", "name": "series", "kind": "Grouping" } ],
Current data view mapping.
"dataViewMappings": [ { "conditions": [ { "category": { "max": 1 }, "measure": { "max": 1 } } ], "categorical": { "categories": { "for": { "in": "category" } }, "values": { "group": { "by": "series", "select": [ { "for": { "in": "measure" }} ] } } } } ],
Current code doesn't plot any bars on the chart. However in the dataview of the custom visual online this is what it shows.
Under categories each test ID is shown seperately and under values it groups the durations into two groups passed and failed.
I have not made any other changes to the code. If someone could please help me show the duration of each test and set colour of each bar according to whether that particular test has passed or failed. I have been able to achieve this in the native column chart of Power Bi but I need to be able to do the same in this custom visual because i need to make more changes to this chart.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |