1
<cfchart format="png"  
        backgroundcolor="white" 
        title="My Chart" 
        showxgridlines="false" 
        showygridlines="false" 
        chartwidth="380"
        chartheight="250"
        yaxistitle="(value1)"
        showborder="true"
        gridlines="5"
        showmarkers="no"
        style="../jscript/ApstatBar_vac.js"     
        >
        <cfchartseries serieslabel="title1" type="bar" datalabelstyle="value" seriescolor="##B4B2B2">
            <cfloop index="counter1" from=1 to="#arraylen(xleavles_grph)#" step="1">
                <cfchartdata item="#xleavles_grph[counter1]#" value="#ser1Values_grph[counter1]#" >
            </cfloop>
        </cfchartseries>
        <cfchartseries serieslabel="title2" type="line" datalabelstyle="value" seriescolor="blue">
            <cfloop index="counter1" from=1 to="#arraylen(xleavles_grph)#" step="1">
                <cfchartdata item="" value="#ser2Values_grph[counter1]#" >
            </cfloop>
        </cfchartseries>

I am getting the error:

cfchartseries does not match current parent item cfchart

and thereby the chart is not shown when the page is rendered.

Some help would be really appreciated.

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
Kiran
  • 33
  • 8
  • Worked for me, with the addition of ``. Please post a self contained example that reproduces the error. – SOS Nov 27 '17 at 22:09
  • i tried with – Kiran Nov 28 '17 at 05:20
  • What do you mean "Not showing the chart"? Same error message or the chart isn't visible? Like I said, it worked for me so something is different on your end. You need to create a *self contained* example that produces the error on your end, including sample values. – SOS Nov 28 '17 at 21:07
  • @Ageax The chart isn't visible. All i am getting is a small placeholder like square. Here is the link to the image that i receive after running the page https://imgur.com/a/mPQFu.Everything else other than chart works fine in the page. – Kiran Nov 29 '17 at 11:50
  • @Ageax. This is more confusing now. At first when i was checking the page i was printing the page as PDF ie , Now for the sake of verifying i just tried commenting the cfdocument tag Now the chart works perfectly.Wonder why it wont work when it is set to be PDF – Kiran Nov 29 '17 at 11:56
  • "printing the page as PDF" Oh, embedding an image in a PDF is totally different. The missing image / red x just means the engine had problems accessing the chart image. There's already answers in the archives about that. Do a search on "embedding cfchart in pdf". This is for but the problem is resolved the same way. You could also use cfimage action="writeToBrowser" inside the cfdocument.. – SOS Nov 29 '17 at 19:00
  • @Ageax.THANKS let me check that – Kiran Nov 30 '17 at 04:00
  • Sorry, forgot the link https://stackoverflow.com/questions/37600156/cfchart-not-printing-in-pdf – SOS Nov 30 '17 at 06:25

0 Answers0