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
paul-lmipaul-lmi 

documentation for ChartServer servlet

Could someone at SF please provide some documentation on the ChartServer URL params?

 

For instance

 

<instance>/servlet/servlet.ChartServer

?rsid=01a30000000hfxm

&ruid=00530000000vEHU

&s=6

&fs=10

&tfg=12

&tfs=-16777216

&explode=0

&c=line

&cs=1

&title=Tickets+created+by+day

&eh=no

&compo=yes

&fg=-16777216

&bg1=-2236963

&bg2=-1

&bgdir=2

&dl1=Date%2FTime+Opened

&dl2=Ticket+Origin

&l=2&sax=yes

&Yman=no

&nc=0

&actUrl=%2F00O30000001g1Hd

&sd=1

&scv=no

&sct=no

&spt=no

&cu=USD

&ab=Y

&u=1

&vt=0

&ab2=X

&u2=0

&vt2=0

&vl0=Record+Count

&topn=no

&gc0=-4041644

&gc1=-4013484

&gc2=-11222444

&refreshts=1272247391000

 

We'd like to not reinvent the wheel by having to outsource chart images to a third party like google.  I know there was a bunch of hullabaloo about an AppExchange Google Charts implementation and the like, but it's too rough for our needs, and we'd rather build the whole thing on platform.  If Salesforce already has the functionality in-house, why not use it?  Right?

 

If you are wondering why, think real time dashboards.  We're basically fed up with hitting refresh...

paul-lmipaul-lmi

anyone?

paul-lmipaul-lmi

OK, so in my attempt to reverse engineer this, I stumbled onto the fact that there is a way to force a dashboard refresh programmatically, by gaming the Refresh logic directly.

 

https://<instance>.salesforce.com/<dashboard_record_id>?m=poll&hp=1

 

If you were to implement a silent request to this logic and dump the results to NULL/nowhere, you could probably embed the image for the chart directly into your page, and then use an actio poller to autorefresh an outputPanel periodically.

 

I will note, that SF probably keeps a hawk's eye on dashboard refreshes per day, so I wouldn't recommend going to the extreme of doing this once per minute.

 

Still waiting for someone in Salesforce to give us documentation on the chartserver itself, but I'm doubtful we'll get it.

tttt

We don't have a good way yet to let you generate charts using our chart engine from your pages. Using the URL is fragile. On the list of things to do is let you create a chart from visualforce, but this won't come soon.

Your best bet for the short and medium term (e.g. at least 1 year) is to use google or flash charts.