Forum Discussion

141507's avatar
141507
Helper I
8 years ago

Use HighCharter Package/hchart() In Power Bi

library(xts)
library("forecast")
library(highcharter)
dates=as.Date(dataset$ReceivedDate,"%Y-%m-%d")
xs=xts(dataset$Volume,dates,frequency=12)
#plot(xs)

arima1 <-arima(xs,order=c(3,0,1),seasonal=list(order=c(0,1,2),period=12))
q=forecast(arima1,h=60,level=c(80,82))
hchart(q)

Hi, 

I am using Highcharter R package for tooltip in the plot.  I am using above code to generate tooltip over the forecast plot. When I use this in R studio, it is plotting well with sufficient tooltips. When I use in power BI, I am getting the message "No image/visuals created". Can you please help us in this regard.

 

Regards,

Senthil D

 

 

7 Replies

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi 141507,


    In Power BI desktop, you need to import your resource data into table from "Get Date" on home page. Then you select the column as value level, please see the fields in blue line. You will find the dataset generates automatically in the black line zone.



    Then please type R script in red line zone, click run, you will get the expected result based on R script.

    Best Regards,
    Angelia

    • 141507's avatar
      141507
      Helper I

      Hi Angelia,

       

      I did the same way only, framed necessary data set and sets as value level. The problem I am facing is visual not created. It says "No image/visual created". I am using hchart function to plot the forecast values.

       

      Is anything to I need to change in my code ?

       

      I shared my R code with this topic intially and attached the screenshots for your reference. Please check and provide us possible suggestions. If you need

       

       

       

       

      Regards,

      Senthil D

      • v-huizhn-msft's avatar
        v-huizhn-msft
        Microsoft Employee

        Hi 141507,

        When executing a R script that results in an error, the R visual is not plotted and an error message like yours is displayed on the canvas. Do you mind share your .pbix file for further analysis?

        Best Regards,
        Angelia