Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
My problem is regarding a custom visual using plotly.
My code:
source('./r_files/flatten_HTML.r')
############### Library Declarations ###############
libraryRequireInstall("plotly");
####################################################
################### Actual code ####################
dataset<-Values
p<-plot_ly(
domain = list(x = c(0, 1), y = c(0, 1)),
value = dataset[1],
title = list(text = "Speed"),
type = "indicator",
mode = "gauge+number+delta",
delta = list(reference = dataset[2]),
gauge = list(
axis =list(range = list(NULL, 300)),
steps = list(
list(range = c(0, 250),color = "gray")),
threshold = list(
line = list(color = "red",width = 4),
thickness = 0.75,
value = dataset[3]
)))
p <- p %>%
layout(
margin = list(l=20,r=30),
paper_bgcolor = "white",
font = list(color = "darkblue", family = "Arial"))
internalSaveWidget(p, 'out.html');
####################################################
################ Reduce paddings ###################
ReadFullFileReplaceString('out.html', 'out.html', ',"padding":[0-9]*,', ',"padding":0,')
####################################################
Here is what I get as a plot in R - with the same code:
And here is what i get in Power Bi:
How do i get the steps, threshold and numbers shown in Power Bi.
If you need any other info feel free to reach out.
Best regards
Fellow Power Bi user, Thomas
Hi @Thomas_Nielsen ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.
Best Regards
Lucien
Hi @Thomas_Nielsen ,
Refer the following article ,it tells how to Create a basic radial gauge:
refer:
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-radial-gauge-charts
Best Regards
Lucien
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |