function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kumar Sanu 8kumar Sanu 8 

how to display dashboard on visualforce Page

<apex:page showheader="true" sidebar="true">
    <apex:iframe src="https://sanuanjali-dev-ed.my.salesforce.com/01Z6F000000F4VY" height="600px" width="70%"/>
</apex:page>

And i am getting This below Error

User-added image
ajay Duggi(Heptarc)ajay Duggi(Heptarc)

Dear kumar,

--- Here mistake is "URL"
Please follow below steps to resolve.
- Open dashboard which you want to show in vf page
- Right Click on Dashboard try to open inspect element
- When you go on dashboard you will get a link "as i given code like" 
- Replace your code to URL.

<apex:page showheader="true" sidebar="true">
<h1> My Dashboard </h1>
    <apex:iframe src="https://ajayk4659-dev-ed.my.salesforce.com/servlet/servlet.ChartServer?rsid=0FL280000009LqR&ruid=00528000000gcXN&did=01Z28000000QH3J&s=7&fs=10&tfg=12&tfs=-16777216&explode=0&c=funnel&cs=0&title=&eh=no&compo=yes&fg=-16777216&bg1=-1&bg2=-1&bgdir=2&dl1=Course%3A+Course+Name&dl2=&l=2&sax=yes&Yman=no&nc=0&actUrl=%2F00O28000002d3GT&sd=1&scv=yes&sct=no&spt=no&bd=yes&cu=INR&ab=X&u=0&vt=0&ab2=Y&u2=1&vt2=0&vl0=Fees+Need+to+Pay&spoc=no&topn=no&gc0=-1&gc1=-1&gc2=-1&sona=0&refreshts=1548505350000" height="600px" width="70%"/>
</apex:page>
I hope it would resolve your problem and let me know if it is not solves.