Issue #624 on hold

how to created multiple arrays created at runtime and holded by main object and pass to jqplot?

UMAR MALIK
created an issue

I am having a hard time plotting a graph where i have to create the series array dynamically. The number of equipments i get i have to create that much number of series of arrays to represent each equipment seperately on graph. Help me out i am stuck i have created an array of arrays dynamically but when i pass it to jqplot linear graph nothing happens. Firebug shows be the correct structure of arrays i develop at runtime.

//create the main array var TrendData = []; // unique equipments represent array of equipments fetched from db // i loop and create a new array for each equipment dynamically (i guess here is the problem, but firebug shows me correct format) for (var i in uniqueEquipments) { TrendData[uniqueEquipments[i]] = []; //after creating arrays i have to add series point to all the arrays one by one for (var i = 0; i < uniqueEquipments.length; i++) { var name = uniqueEquipments[i].toString(); if (typeof TrendData[name] == "object")// == uniqueEquipments[i].toString()) { $.each(data, function (index, value) {

                            ticks.push(data[index].ChartDate);

if (name == data[index].EquipmentName) // i insert every point based on a particular equipment to concerned array// // name holds the name of equipment. TrendData[name].push(parseFloat(dReturn)); // HOW DO I PASS TRENDDATA TO JQPLOT. PLEASE HELP

                                }
                            }
                            });
                    }
                }

Comments (2)

  1. Log in to comment