dataTables and jqplot joined together
dataTables and jqplot joined together
ivanpiffer
Posts: 0Questions: 0Answers: 0
Hi everybody
I'm using dataTables.js from a couples of days and is wonderful.
But how can I build a dinamic graph using jqplot on dataTables "object"? What's the name of this object?
Can somebody show me an example?
I'm using DOM access and NOW table and graph are separated ... :( :(
I scan the table builded from datatables using a loop but is not correct.
My aim is: if I filter the table I want that the graph automaticaly update :)
So please... help me .
[code]
<!-- /////////// -->
<!-- datatables -->
<!-- /////////// -->
$('#an_chim_std').dataTable
(
{
"sDom": 'W<"clear">lfrtip',
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"oLanguage":
{
"sLengthMenu": "Mostro _MENU_ records per pagina",
"sZeroRecords": "Non ho trovato nulla - sorry",
"sInfo": "Mostro _START_ di _END_ of _TOTAL_ records",
"sInfoEmpty": "Mostro 0 to 0 of 0 records",
"sSearch": "Cerca:",
"sInfoFiltered": "(filtered from _MAX_ total records)",
"sPaginationType": "full_numbers"
}
}
);
<!-- //////////////////// -->
<!-- jqplot on a column -->
<!-- /////////////////// -->
var ph_h2ocompleto=new Array();
$('#an_chim_std tr').each(function()
{
//loops through each td and store contents in ph_h2o
ph_h2o = $(this).find(\"td.ph_h2o\").html();
ph_h2ocompleto=ph_h2ocompleto.concat(ph_h2o)
//alert (\"Ecco il ph_h2o \" + ph_h2o);
//alert (\"Ecco il ph_h2ocompleto \" + ph_h2ocompleto);
})
chart1 = $.jqplot('chart1', [ph_h2ocompleto],
{
-----zap
});
[/code]
I'm using dataTables.js from a couples of days and is wonderful.
But how can I build a dinamic graph using jqplot on dataTables "object"? What's the name of this object?
Can somebody show me an example?
I'm using DOM access and NOW table and graph are separated ... :( :(
I scan the table builded from datatables using a loop but is not correct.
My aim is: if I filter the table I want that the graph automaticaly update :)
So please... help me .
[code]
<!-- /////////// -->
<!-- datatables -->
<!-- /////////// -->
$('#an_chim_std').dataTable
(
{
"sDom": 'W<"clear">lfrtip',
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"oLanguage":
{
"sLengthMenu": "Mostro _MENU_ records per pagina",
"sZeroRecords": "Non ho trovato nulla - sorry",
"sInfo": "Mostro _START_ di _END_ of _TOTAL_ records",
"sInfoEmpty": "Mostro 0 to 0 of 0 records",
"sSearch": "Cerca:",
"sInfoFiltered": "(filtered from _MAX_ total records)",
"sPaginationType": "full_numbers"
}
}
);
<!-- //////////////////// -->
<!-- jqplot on a column -->
<!-- /////////////////// -->
var ph_h2ocompleto=new Array();
$('#an_chim_std tr').each(function()
{
//loops through each td and store contents in ph_h2o
ph_h2o = $(this).find(\"td.ph_h2o\").html();
ph_h2ocompleto=ph_h2ocompleto.concat(ph_h2o)
//alert (\"Ecco il ph_h2o \" + ph_h2o);
//alert (\"Ecco il ph_h2ocompleto \" + ph_h2ocompleto);
})
chart1 = $.jqplot('chart1', [ph_h2ocompleto],
{
-----zap
});
[/code]
This discussion has been closed.