You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have run into a weird situation when using peity with DataTables DataTables is used to display traffic-related information in tabular format and I'd like to add a small bar or line graph to every row with peity:
$('#sources').DataTable( {
/* ... */
"columnDefs": [
{
"targets": 5,
"data": "volume",
"render": function ( data ) {
return '<span class="bar-trend">'+ data.trend +'</span>';
}
}
],
"createdRow": function ( row, data, index ) {
$('span.bar-trend', row).peity("line");
}
Though the svg is generated the points are obviously miscalculated for this sequence 41,48,49,47,74,64,71,47:
If I put it elsewhere statically in the HTML, it shows up correctly. points in this case: 0 15.5 0 7.1891891891891895 4.571428571428571 5.77027027027027 9.142857142857142 5.567567567567567 13.714285714285714 5.972972972972974 18.285714285714285 0.5 22.857142857142854 2.5270270270270263 27.428571428571427 1.1081081081081088 32 5.972972972972974 32 15.5
Please advise how I could fix it.
The text was updated successfully, but these errors were encountered:
Hi, I have run into a weird situation when using
peity
with DataTables DataTables is used to display traffic-related information in tabular format and I'd like to add a small bar or line graph to every row withpeity
:Though the
svg
is generated thepoints
are obviously miscalculated for this sequence41,48,49,47,74,64,71,47
:<svg class="peity" height="16" width="32"><polygon fill="#c6d9fd" points="0 -0.5 0 0.05405405405405406 0 0.14864864864864868 0 0.16216216216216217 0 0.1351351351351351 0 0.5 0 0.3648648648648649 0 0.45945945945945943 0 0.1351351351351351 0 -0.5"></polygon><polyline fill="none" points="0 0.05405405405405406 0 0.14864864864864868 0 0.16216216216216217 0 0.1351351351351351 0 0.5 0 0.3648648648648649 0 0.45945945945945943 0 0.1351351351351351" stroke="#4d89f9" stroke-width="1" stroke-linecap="square"></polyline></svg>
If I put it elsewhere statically in the HTML, it shows up correctly. points in this case:
0 15.5 0 7.1891891891891895 4.571428571428571 5.77027027027027 9.142857142857142 5.567567567567567 13.714285714285714 5.972972972972974 18.285714285714285 0.5 22.857142857142854 2.5270270270270263 27.428571428571427 1.1081081081081088 32 5.972972972972974 32 15.5
Please advise how I could fix it.
The text was updated successfully, but these errors were encountered: