Skip to content

warp view datagrid

xavier edited this page Nov 23, 2020 · 3 revisions

Data grid

type = datagrid

datagrid

CSS vars

  • Size
    • --warp-view-datagrid-cell-padding
  • Colors
    • --warp-view-font-color
    • --warp-view-datagrid-odd-bg-color
    • --warp-view-datagrid-odd-color
    • --warp-view-datagrid-even-bg-color
    • --warp-view-datagrid-even-color
    • --warp-view-pagination-border-color
    • --warp-view-pagination-bg-color
    • --warp-view-pagination-active-bg-color
    • --warp-view-pagination-active-color
    • --warp-view-pagination-active-border-color
    • --warp-view-pagination-hover-bg-color
    • --warp-view-pagination-hover-color
    • --warp-view-pagination-hover-border-color
    • --warp-view-pagination-disabled-color
    • --gts-classname-font-color
    • --gts-labelname-font-color
    • --gts-attrname-font-color
    • --gts-separator-font-color
    • --gts-labelvalue-font-color
    • --gts-attrvalue-font-color,

Specific attributes

See common attributes

Name Type Default Description
elemsCount number 15 Rows per page
windowed number 5 Pages displayed

Events

See common events

Data format

GTS, GTS array or complex data.

Specific complex data params

See common params

{
'title' 'Test'
'columns'  [ 'Name' 'A' 'B' 'C' 'D' ]
'rows' [
      [ 'label X' 15 56 44 22 ]
      [ 'label Y' 1 5 4 2 ]
      [ 'label Z' 14 45 78 12 ]
    ]
}
Name Type Description
key string Override the computed label

Specific options and globalParams

See common options

Name Type Default Description
timeMode string 'date' date, timestamp

Sample

<warpview-tile
          url="https://warp.senx.io/api/v0/exec"
          responsive="true"
          type="datagrid">
          {
'title' 'Test'
'columns'  [ 'Name' 'A' 'B' 'C' 'D' ]
'rows' [
  [ 'label X' 15 56 44 22 ]
  [ 'label Y' 1 5 4 2 ]
  [ 'label Z' 14 45 78 12 ]
]
} 'values' STORE
{ 'data' $values }
</warpview-tile>
<warpview-tile
          url="https://warp.senx.io/api/v0/exec"
          responsive="true"
          type="datagrid">
0 5 <% 'j' STORE
    NEWGTS 'series' $j TOSTRING + RENAME 'gts' STORE
    0 10 <%
        'i' STORE
        $gts NOW $i RAND + STU * - RAND RAND RAND 1000.0 * RAND  ADDVALUE DROP
    %> FOR
    $gts
%> FOR
</warpview-tile>