jQuery UI Widgets Forums Chart Sorting in Chart not working

Tagged: , ,

This topic contains 4 replies, has 2 voices, and was last updated by  paulcobben 7 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Sorting in Chart not working #91388

    paulcobben
    Participant

    Hello, we are evaluating jqwidgets and are not able to sort the data for the jqxchart.
    Can anyone tell us what we are doing wrong.

    Here is the code:
    <!DOCTYPE html>
    <html lang=”en”>
    <head>
    <title id=’Description’>Licentie Compliancy</title>
    <meta name=”description” content=”Licentie Compliancy” />
    <link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
    <script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script>
    <script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
    <script type=”text/javascript” src=”jqwidgets/jqxdraw.js”></script>
    <script type=”text/javascript” src=”jqwidgets/jqxchart.core.js”></script>
    <script type=”text/javascript” src=”jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript”>
    $(document).ready(function () {
    // prepare chart data
    var sourceLic =
    {
    datatype: “csv”,
    datafields: [
    { name: ‘Applicatie’ },
    { name: ‘SCCM’ },
    { name: ‘TopDesk’ },
    { name: ‘Verschil’ }
    ],
    columnDelimiter: “;”,
    sortcolumn: ‘Verschil’,
    sortdirection: ‘asc’,
    url: ‘SparkleFlow-Data/licentie.csv’
    };
    var dataAdapter = new $.jqx.dataAdapter(
    sourceLic,
    {
    async: false,
    autoBind: true,
    loadError: function (xhr, status, error)
    {
    alert(‘Error loading “‘ + source.url + ‘” : ‘ + error);
    }
    });

    // prepare jqxChart settings
    var settings = {
    title: “Licentie compliancy”,
    description: “TopDesk-SCCM”,
    showLegend: false,
    enableAnimations: true,
    padding: { left: 20, top: 5, right: 20, bottom: 5 },
    titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
    source: dataAdapter,
    colorScheme: ‘scheme02’,
    columnSeriesOverlap: false,
    xAxis:
    {
    dataField: ‘Applicatie’,
    labels: { angle: 90}
    },
    valueAxis:
    {
    title: { visible: true }
    },
    seriesGroups:
    [
    {
    type: ‘column’,
    useGradient: false,
    valueAxis:
    {
    visible: true,
    unitInterval: 5,
    title: { text: ‘Verschil’ },
    formatFunction: function (value, itemIndex, serie, group)
    {
    return value;
    }
    },
    orientation: ‘horizontal’, // render values on X-axis
    columnsGapPercent: 10,
    series: [
    { dataField: ‘Verschil’, displayText: ‘Verschil’, toolTipFormatFunction: function(value, itemIndex, serie, group, categoryValue, categoryAxis) {
    return ‘<DIV style=”text-align:left”;><b>Applicatie: </b>’ + categoryValue
    + ‘<br /><b>Verschil:</b> ‘ + value + ‘ </DIV>’
    },
    // Modify this function to return the desired colors.
    // jqxChart will call the function for each data point.
    // Sequential points that have the same color will be
    // grouped automatically in a line segment
    colorFunction: function (value, itemIndex, serie, group) {
    return (value < 0) ? ‘#d9534f’ : ‘#5cb85c’;
    } }
    ]
    }
    ]
    };
    // setup the chart
    $(‘#chartContainer’).jqxChart(settings);
    });
    </script>
    </head>
    <body class=’default’>
    <div id=’chartContainer’ style=”width:1150px; height:800px;”>
    </div>
    </body>
    </html>

    Sorting in Chart not working #91397

    Peter Stoev
    Keymaster

    Hi paulcobben,

    We do not have and never had sorting functionality in our Charting.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Sorting in Chart not working #91401

    paulcobben
    Participant

    Sorry for the misleading title.

    As you can see, I tried to sort the data before importing in the Chart.
    At the dataadapter I tried to sort the data before giving it to the jqxChart.

    Sorting in Chart not working #91405

    Peter Stoev
    Keymaster

    Hi paulcobben,

    Yeah, but it does not support that functionality. You probably saw that in the Grid, but the Chart has no sorting as well as the data adapter.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Sorting in Chart not working #91409

    paulcobben
    Participant

    Thanks for your answer, but It would be nice if it would be supported in the future.
    Most functions are very good and easy to implement.
    We will buy and start using this product.
    Thanks for your support.

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

You must be logged in to reply to this topic.