jQuery UI Widgets Forums Chart Display a Variable in display Text

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Display a Variable in display Text #61607

    rafaelcalijuri
    Participant

    Hi all,
    How can I display the name variable in displaytext in this column chart?

    <html>
    <head>
    <title id=’Description’>jqxChart Column Series Example</title>

    <link rel=”stylesheet” type=”text/css”href=”css/jqx.base.css” />

    <script type=”text/javascript” src=”js/jquery.js”></script>
    <script type=”text/javascript” src=”js/grafico/jqxcore.js”></script>
    <script type=”text/javascript” src=”js/grafico/jqxdraw.js”></script>
    <script type=”text/javascript” src=”js/grafico/jqxchart.core.js”></script>
    <script type=”text/javascript” src=”js/grafico/jqxdata.js”></script>

    <script type=”text/javascript”>

    $(document).ready(function () {
    // prepare chart data as an array
    var DadosColuna = [
    {Unidade: “A0285”, Nome: “Unidade 1”, Pendencias: 13},
    {Unidade: “A0293”, Nome: “Unidade 2”, Pendencias: 19},
    ];

    // prepare jqxChart settings
    var settings = {
    title: “Comparativo de PendĂȘncias entre as Unidades”,
    description: “”,
    showLegend: false,
    enableAnimations: false,
    padding: { left: 5, top: 5, right: 5, bottom: 5 },
    titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
    source: DadosColuna,
    xAxis:
    {
    dataField: ‘Unidade’,
    showGridLines: true,

    textRotationAngle: -90,

    },

    colorScheme: ‘scheme01’,
    seriesGroups:
    [
    {
    type: ‘column’,
    columnsGapPercent: 50,
    valueAxis:
    {
    unitInterval: 5,
    displayValueAxis: true,
    description: ‘PendĂȘncias’
    },
    series: [
    { dataField: ‘Pendencias’, displayText: Nome,},
    //I need to display DadosColuna.Nome above
    ]
    },

    ]
    };
    // setup the chart
    $(‘#chartContainer’).jqxChart(settings);
    });
    </script>
    </head>
    <body class=’default’>
    <div id=’chartContainer’ style=”width:856px; height:500px;”>
    </div>
    </body>
    </html>

    Display a Variable in display Text #61642

    Dimitar
    Participant

    Hello rafaelcalijuri,

    In this case, if Nome is defined, the displayText will be a string with the value of Nome.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.