Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
Anonymous
Not applicable

Create a Custom Chart in R without Data Input

Hi guys,

 

I have successfully created a chart in R and would like to distribute it to other people in my team as a custom chart pbiviz. After following Datacad tutorial here, I have managed to create a custom visual pbiviz file. However, it would require data for the visualisation to run and if you change to other dataset by ticking in fields in PowerBI, the chart will remain the same. I have tried to add this code at the beginning of my script.r file in after using " pbiviz new chart -t rhtml" command and hope it will only be active if there is no dataset. 

"""
if(!exists( "dataset" ))
{
second = c(120, 60, 30, 20)
first = c(100, 60, 40, 30)
stage = c("Started", "Thinking", "Trial", "Final")
dataset <- data.frame(stage,first,second)
}
"""

However, after importing the chart into PowerBI and clicking on new dataset on fields, the new data is still not imported into the chart but the chart only use the default dataset mentioned above.

Is there anyway I can create a custom chart in R without specifying the data and then the data can be choose later by ticking in Fields?

 

Thank you,

 

 

@R  @CustomChart @pbiviz

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi RicoZhou,

 

I have tried Charticulator but it didn't provide the same functionalities like R plotly package. I would like to input the data in a R-custom chart (or python custom chart).

 

So sorry, it didn't answer my question.

 

Thanks

Anonymous
Not applicable

Hi @Anonymous 

I think you can try to build a customer visual by charticulator and import this visual from file into power bi.

You may refer to this blog and video to learn more details.

Video: Creating custom visuals in Power BI using R script, JSON, and Charticulator | Community Webinars

Blog: Build your custom visual with Charticulator and Power BI

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.