We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello everyone,
I created a custom visuals and I see that Robbon Chart can toggle the switch above to disable the color below. When the switch is on, I cannot select the color, but when it is off, I can select the color. I want to ask how to do that with code, can anyone show me a sample code or link to instructions on how to do this? Below is an illustrative example image
Solved! Go to Solution.
Hi ,Base on my description, it seems like you want to disable a setting with a toggle switch in a custom visual. Then you'll need to modify the capabilities.json file and the visual's code.
Solved: Format Panel Toggle Switch to Reveal More Options - Microsoft Fabric Community
First ensure that your objects are all configured up in your capabilities.json and they have a corresponding setting object so that they appear in the pane.
If we start with a new visual, I've added these to the capabilities under the dataPoint object:
"toggle": {
"displayName": "Show my Property",
"type": {
"bool": true
}
},
"hideOnToggle": {
"displayName": "I Get Hidden if This Works",
"type": {
"text": true
}
}
I'll add a couple of extra properties to the dataPointSettings class in settings.ts, e.g.:
// Test toggle
public toggle: boolean = true;
// Should hide if toggle off
public hideOnToggle: string = 'Hiya!';
}
Best Regards
Hi ,Base on my description, it seems like you want to disable a setting with a toggle switch in a custom visual. Then you'll need to modify the capabilities.json file and the visual's code.
Solved: Format Panel Toggle Switch to Reveal More Options - Microsoft Fabric Community
First ensure that your objects are all configured up in your capabilities.json and they have a corresponding setting object so that they appear in the pane.
If we start with a new visual, I've added these to the capabilities under the dataPoint object:
"toggle": {
"displayName": "Show my Property",
"type": {
"bool": true
}
},
"hideOnToggle": {
"displayName": "I Get Hidden if This Works",
"type": {
"text": true
}
}
I'll add a couple of extra properties to the dataPointSettings class in settings.ts, e.g.:
// Test toggle
public toggle: boolean = true;
// Should hide if toggle off
public hideOnToggle: string = 'Hiya!';
}
Best Regards
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |