I want to create STAGE based chart in my salesforce org. Please find the screenshot for the sample.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
You don't need necessarily Visualforce or Apex for this. You could use Visualforce and Apex to dynamically load the stages and build the visual, but since something like the sales cycle is generally something that doesn't change all that at often, many times people just use a formula field for this to avoid having to code the solution.
You basically just need to upload a graphic for each sales cycle stage, and show that particular image depending on the Stage. See the example below
CASE( TEXT(StageName), 'Stage 1', IMAGE("/resource/Stage_1_Image", "Stage1", 50, 600), 'Stage 2', IMAGE("/resource/Stage_2_Image", "Stage2", 50, 600), 'Stage 3', IMAGE("/resource/Stage_3_Image", "Stage3", 50, 600), .... .... 'Stage X', IMAGE("/resource/Stage_X_Image", "StageX", 50, 600), IMAGE("/resource/Default_Image", "Deafault", 50, 600) )
I always suggest trying clicks over code when you can. This will work just fine. I can think of 3 reasons why this may not work and you might want to consider a coded solution (There could be more, but this is what I can think of).
If you don't fall into one of those reasons, then I would suggest first trying the formula field solution as why not leverage the native capabilities of the platform when you can.
You will obviously have to replace my stage names with your own as well as replace the resource file paths with your file names.
You can enable the new Sales Path feature which was introduced in Spring '15 to give you this functionality.
Sales Path can be accessed by clicking Customize > Sales Path > Settings, then click Enable. You can then set up a sales path by clicking New Sales Path and going through the steps.
Sales Path also allows you to give additional information - such as highlighting the fields they need to fill in and links to additional documentation - to your Sales Reps as they go through your Sales Process to help guide them through it.
I wrote a blog on designing the scenario with the Lightning Design System, visualforce & apex.
I hope it helps :)