With Web Socket

{ 'title' 'Discovery WebSocket' 'tiles' [ { 'title' 'WebSocket test' 'x' 0 'y' 0 'w' 12 'h' 2 'type' 'area' 'options' { 'autoRefresh' 200 } 'endpoint' 'wss://sandbox.senx.io/api/v0/mobius' 'macro' <% NEWGTS 'data' RENAME 'gts' STORE NOW 'now' STORE $now 10 s - $now <% 200 ms + %> <% 'i' STORE $i 1e-6 * SIN 'v' STORE $gts $i RAND 10.0 * RAND 10.0 * NaN $v ADDVALUE DROP %> FORSTEP $gts SORT 'data' STORE { 'data' $data 'globalParams' { 'type' <% $now 1 s / 2 % 0 == %> <% 'scatter' %> <% 'area' %> IFTE } } %> } ] }
{
  'title' 'Discovery WebSocket'
  'tiles' [   
    {
      'title' 'WebSocket test'
      'x' 0 'y' 0 'w' 12 'h' 2
      'type' 'area'
      'options' { 'autoRefresh' 200 } // each 200ms
      'endpoint' 'wss://sandbox.senx.io/api/v0/mobius'
      'macro' <%
        NEWGTS 'data' RENAME 'gts' STORE
        NOW  'now' STORE
        $now 10 s - $now
        <% 200 ms + %>
        <%
          'i' STORE
          $i 1e-6 * SIN 'v' STORE
          $gts $i RAND 10.0 * RAND 10.0 * NaN $v ADDVALUE DROP
        %> FORSTEP
        $gts SORT 'data' STORE
        { 'data' $data 'globalParams' { 'type' <% $now 1 s / 2 % 0 == %> <% 'scatter' %> <% 'area' %> IFTE } }
      %>
    }
  ]
}

Found an issue on this page or something missing?

Tell us onSlack iconThe Lounge, the Warp 10 Community Slack.