• Thad Horning
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi Guys,
A quick help will be much appreciated, i am going to post one piece of VF code. This was working fine before Winter16 Release; Stange that its not working now.
For one of  our application i am using c3js(http://c3js.org) for the chart generation. for which i need some user input to refresh the chart.
So i am using a picklist and a command-button to accomplish this.
After a long work arround i get to know that <apex:form> tag is causing ERROR.
if i will remove the <apex:form> tag its working fine...
Visualforce Code
<apex:page controller="DS_TrendingController" applyBodyTag="true" showHeader="false" docType="html-5.0">    
    <!--  Chart library -->    
    <link rel="stylesheet" type="text/css" href="../resource/chartLib/c3.css"/>    
    <apex:form> 
		 <!--  Some Inputs are required to refresh the chart, to run it for the interval of TODAY, THIS_WEEK, THIS_MONTH.. --> 
	</apex:form>
    <div class="col-md-6">
        <div id="barChart" style=""></div> 
    </div>
  <script src="../resource/chartLib/d3.v3.min.js" charset="utf-8"></script>
  <script src="../resource/chartLib/c3.min.js" charset="utf-8"></script>
  <script>
     var chart2 = c3.generate({
        bindto: '#barChart',
        data: {
          x : 'x',
          columns: [
            ['x','Inprogress','Doc Submitted','Approval','Forecasting','Decission Pending','Closed lost','Closed Won',],
            ['Won',3,0,2,1,0,1,2,],
            ['Lost' ,0,-1,0,0,-1,0,0,],
          ],         
          type: 'bar',
          groups: [
            ['Won', 'Lost']
          ],
          colors: {
            Won: '#00c0ef',
            Lost: '#dd4b39'
          }
        },
        axis: {
            x: {
                type: 'category' // this needed to load string x value
            }
        },
        bar: {
        width: {
            ratio: 0.3 // this makes bar width 50% of length between ticks
        }
       }
      });  
  </script>  
</apex:page>

How to use this JS wiht <apex:form> tag?

Thanks
Jeet
 

  • October 31, 2015
  • Like
  • 0