You need to sign in to do that
Don't have an account?
Mauricio Ramalho
apex:Chart VS Bootstrap conflict
I used this arcticle on Salesforce's documentation to plot some graphic on Visualforce Pages using the apex:chart tag, but it seems that it is not possible to use chart tags and bootstrap on the same page.
The exact same code sample, but only adding the Bootstrap header link causes the graphic to blank out and not render at all.
The data is still there as it is possible to hover the mouse over the invisible data marks.
Am I missing something? Is there a workaround for this?
The exact same code sample, but only adding the Bootstrap header link causes the graphic to blank out and not render at all.
<apex:page controller="ChartController"> <html lang="en"> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> </head> <body> <apex:chart height="400" width="700" data="{!data}"> <apex:axis type="Numeric" position="left" fields="data1" title="Opportunities Closed" grid="true"/> <apex:axis type="Category" position="bottom" fields="name" title="Month of the Year"> </apex:axis> <apex:lineSeries axis="left" fill="true" xField="name" yField="data1" markerType="cross" markerSize="4" markerFill="#FF0000"/> </apex:chart> </body> </html> </apex:page>
The data is still there as it is possible to hover the mouse over the invisible data marks.
Am I missing something? Is there a workaround for this?
you did't missing nothing.. your CSS file will not ref propery.
Follow below steps :
Download the css file from this location and save it in your local.
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
Create zip file thats contains your css file in your case ( bootstrap.min.css) name it as "bootstrapmin.rar"
Upload the zip file in "static resource" name as "ChartCSS"
All set now.
replace your <head></head> section with this below code:
Full VF page code :
Output:
Hope this will help you to solve your issue.
Thanks
karthik