jQuery UI Widgets Forums Chart No Chart Returned

This topic contains 3 replies, has 2 voices, and was last updated by  ivailo 9 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • No Chart Returned #78355

    jjohnston
    Participant

    Column chart below is not returning any results when I know there are results. Can you point out where I might be missing something? Thanks,

    <cfparam name=”bdate” default=”now()”>
    <cfparam name=”edate” default=”now()”>

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
    <cfoutput>

    <html lang=”en”>

    <head>

    <cfscript>
    totcnt = 0;
    jancnt = 0;
    febcnt = 0;
    marcnt = 0;
    aprcnt = 0;
    maycnt = 0;
    juncnt = 0;
    julcnt = 0;
    augcnt = 0;
    sepcnt = 0;
    octcnt = 0;
    novcnt = 0;
    deccnt = 0;
    </cfscript>

    <cfloop query =”qIncidents”>
    <cfif month(incident_date) EQ 1>
    <cfset jancnt = jancnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 2>
    <cfset febcnt = febcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 3>
    <cfset marcnt = marcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 4>
    <cfset aprcnt = aprcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 5>
    <cfset maycnt = maycnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 6>
    <cfset juncnt = juncnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 7>
    <cfset julcnt = julcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 8>
    <cfset augcnt = augcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 9>
    <cfset sepcnt = sepcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 10>
    <cfset octcnt = octcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 11>
    <cfset novcnt = novcnt + 1>
    </cfif>
    <cfif month(incident_date) EQ 12>
    <cfset deccnt = deccnt + 1>
    </cfif>
    <cfset totcnt = totcnt + 1>
    </cfloop>

    <title id=’Description’>Annual Incidents</title>

    <meta http-equiv=X-UA-Compatible content=”IE=edge”>
    <link rel=”stylesheet” href=”../../JavaScript/jqwidgets/jqwidgets/styles/jqx.base.css” type=”text/css” />
    <script type=”text/javascript” src=”../../JavaScript/jqwidgets/jqwidgets/jqxcore.js”></script>
    <script type=”text/javascript” src=”../../JavaScript/jqwidgets/jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”../../JavaScript/jqwidgets/jqwidgets/jqxdraw.js”></script>
    <script type=”text/javascript” src=”../../JavaScript/jqwidgets/jqwidgets/jqxchart.js”></script>
    <script type=”text/javascript”>

    $(document).ready(function () {

    // prepare the data

    var data = [

    { “month”: “Jan”, “min”: 0, “max”: #jancnt# },

    { “month”: “Feb”, “min”: 0, “max”: #febcnt# },

    { “month”: “Mar”, “min”: 0, “max”: #marcnt# },

    { “month”: “Apr”, “min”: 0, “max”: #aprcnt# },

    { “month”: “May”, “min”: 0, “max”: #maycnt# },

    { “month”: “Jun”, “min”: 0, “max”: #juncnt# },

    { “month”: “Jul”, “min”: 0, “max”: #julcnt# },

    { “month”: “Aug”, “min”: 0, “max”: #augcnt# },

    { “month”: “Sep”, “min”: 0, “max”: #sepcnt# },

    { “month”: “Oct”, “min”: 0, “max”: #octcnt# },

    { “month”: “Nov”, “min”: 0, “max”: #novcnt# },

    { “month”: “Dec”, “min”: 0, “max”: #deccnt# }

    ];

    var toolTipCustomFormatFn = function (value, itemIndex, serie, group, categoryValue, categoryAxis) {

    var dataItem = data[itemIndex];

    return ‘<DIV style=”text-align:left”><b>Month: ‘ +

    categoryValue + ‘</b><br />Min: ‘ +

    dataItem.min + ‘°<br />Max: ‘ +

    dataItem.max ‘</DIV>’;

    };

    // prepare jqxChart settings

    var settings = {

    title: “Annual Incidents”,

    description: “From: #Dateformat(bdate,’mm/dd/yyyy’)# To: #DateFormat(edate,’mm/dd/yyyy’)# <br> Total Count: #TotCnt#”,

    enableAnimations: true,

    showLegend: true,

    padding: { left: 5, top: 5, right: 5, bottom: 5 },

    titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },

    enableCrosshairs: true,

    source: #data#,

    colorScheme: ‘scheme05’,

    xAxis:

    {

    dataField: ‘month’,

    unitInterval: 1,

    gridLines: {

    step: 3

    }

    },

    valueAxis:

    {

    minValue: 0,

    maxValue: 50,

    unitInterval: 5,

    title: { text: ‘Count<br>’ },

    labels: {

    horizontalAlignment: ‘right’ }

    }

    },

    seriesGroups:

    [

    {

    type: ‘rangecolumn’,

    columnsGapPercent: 50,

    toolTipFormatFunction: toolTipCustomFormatFn,

    series: [

    { dataFieldTo: ‘max’, displayText: ‘Incidents’, dataFieldFrom: ‘min’, opacity: 1 }

    ]

    }

    ]

    };

    —>

    // setup the chart

    $(‘##chartContainer’).jqxChart(settings);

    });

    </script>

    </head>

    <body class=’default’>

    <div id=’chartContainer’ style=”width:850px; height:500px”>

    </div>

    </body>

    </html>

    </cfoutput>

    No Chart Returned #78364

    ivailo
    Participant

    Hi jjohnston,

    Unfortunately we don’t support integration with ColdFusion.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    No Chart Returned #78401

    jjohnston
    Participant

    Now is this the charts the only thing not supported, or are there other areas that do not support ColdFusion. I know that the jqxMenu does work.

    Thanks,

    Jessica

    No Chart Returned #78443

    ivailo
    Participant

    Hi Jessica,

    The widgets may work with ColdFusion, but we don’t have experience with it.
    Cause of this we don’t support help topic about ColdFusion.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.