2

I have created a visualforce page by using visualforce chart component, chart components are working perfect in visualforce but after I created force.com site for that page and opened that page outside Salesforce as site page , page is loading properly but there is "vf-chart.css" which is not loading and showing empty css.

In browser, I clicked inspect element went to sources tab-> apexpages/chart folder -> vf-chart.css and this css is empty because of this chart component is not highlighting properly.

Any help will be appreciated??

3
  • If vf-chart.css a CSS file that you have added or one that the platform automatically adds? If it's the former, exactly how do you reference it in your page? (Eric's point is the first thing to check though if it's the former.)
    – Keith C
    Jul 12, 2015 at 18:23
  • vf-chart.css is a standard css by salesforce, which automatically added, I have checked in console and its showing failure message: "Failed to load resource: the server responded with a status of 503 (Service Unavailable)
    – user22075
    Jul 12, 2015 at 19:04
  • It may be that by design or by accident charts don't work in Force.com Sites: from a brief Google I couldn't find any confirmation either way. Sites typically introduce an extra element into the start of the relative path of resources.
    – Keith C
    Jul 12, 2015 at 19:31

1 Answer 1

1

What is the Visibility of the Static Resource:

  1. If it is Private - Then it is not accessible outside of Salesforce
  2. If it is Public - The it will be available to the Sites VF Page

In short, you need to ensure that the visibility of the Static Resource is set to public.

Also, it would be helpful if you inspected the JS console error log to see if it failed to load. If so just another indicator of the issue (private or mistyped resource).

1
  • vf-chart.css is a standard css by salesforce, which automatically added, I have checked in console and its showing failure message: "Failed to load resource: the server responded with a status of 503 (Service Unavailable)"
    – user22075
    Jul 12, 2015 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .