tracker issue : CF-4203130

select a category, or use search below
(searches all categories and all time range)
Title:

Cfchart format="html" does not work when using <!DOCTYPE html>

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Priyank Shrivastava / ()

Created: 07/23/2018

Components: Charting/Graphing

Versions: 13.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 310739 /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Win 2016

Vote Count: 0

Problem Description:  Cfchart type="html" does not work when using <!DOCTYPE html>

Steps to Reproduce:

<!DOCTYPE html>

<cfchart format="html" type="bar" showlegend="false" chartHeight="400" chartWidth="600" title="Sales report">

    <cfchartseries>

        <cfchartdata item="2012" value=#randrange(10,100)#>

        <cfchartdata item="2013" value=#randrange(10,100)#>

        <cfchartdata item="2014" value=#randrange(10,100)#>

        <cfchartdata item="2015" value=#randrange(10,100)#>

        <cfchartdata item="2016" value=#randrange(10,100)#>

        <cfchartdata item="2017" value=#randrange(10,100)#>

    </cfchartseries>

</cfchart>

Actual Result: It is showing the blank page.

Expected Result: it should display the chart.

Any Workarounds: Remove the <!DOCTYPE html> from the code.

Attachments:

Comments:

If you are using <!DOCTYPE html> it is standard html mode and if not using DOCTYPE, it uses quarks mode that is supported by browsers. For Standard html width and height must have html standard units i.e. px, % etc. Whereas in quarks mode width and height with units fallback to pixel. That's why you not getting chart when using DOCTYPE. Zingchart also expects in same way.
Comment by Ajay Kumar Rai
29433 | July 30, 2018 11:08:32 AM GMT
Can you please provide the specific syntax we need to use? It is not clear in the explanation provided, not is it clear in the documentation. Thanks!
Comment by Alberto Genty
29441 | August 07, 2018 04:24:13 PM GMT
Sorry Ajay... I re-read your post and understand your explanation. Is there anywhere these type of behavior changes are documented? It would be a helpful guide to get ahead of known required code changes in CF2018.
Comment by Alberto Genty
29442 | August 07, 2018 07:00:58 PM GMT