Chartjs-Risers or bars of Dynamically built ChartJs from json not aligning to bottom of y axis

0👍

What was required, was a further iteration thru the JSON array in the data object, getting each value and building it into a js array.

            if (key == "data")
            {
                var dataRec = rec[key];
                var jsonData = JSON.parse(dataRec);
                xValuesArray = [];

                for (var i = 0; i < jsonData.length; i++)
                {
                    var value = jsonData[i];
                    xValuesArray.push(value);
                }
            }
        });

        chartDataset =
        {
            label: label,
            backgroundColor: backgroundColor,
            data: xValuesArray,
        }

        chartDatasets.push(chartDataset);       

Leave a comment