Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@senx/discovery-plot
Advanced tools
$ npm install @senx/discovery-plot
<script nomodule src="https://unpkg.com/@senx/discovery-plot/dist/discovery-plot/discovery-plot.js"></script>
<script type="module" src="https://unpkg.com/@senx/discovery-plot/dist/discovery-plot/discovery-plot.esm.js"></script>
<html>
<head>
<title>Test</title>
</head>
<body>
<discovery-plot url="https://warp.senx.io/api/v0/exec">
1 4 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR
</discovery-plot>
<script nomodule src="https://unpkg.com/@senx/discovery-plot/dist/discovery-plot/discovery-plot.js"></script>
<script type="module" src="https://unpkg.com/@senx/discovery-plot/dist/discovery-plot/discovery-plot.esm.js"></script>
</body>
</html>
This Web component displays a Tile based upon a WarpScript (or FLoWS). The WarpScript is executed when the tile renders.
Property | Attribute | Type | Default | Description |
---|---|---|---|---|
debug | debug | boolean | false | Enable debug messages |
options | options | Param / string | new Param() | Serialized JSON options (see Params below) |
type | type | line, area, scatter, step-area, spline-area, spline, step, step-after, step-before, annotation, bar, display, image, map, gauge, linear-gauge, circle, pie, plot, doughnut, rose, tabular, svg | Chart type | |
url | url | string | undefined | exec url of your Warp 10 endpoint or Mobius WebSocket endpoint |
lang | lang | warpscript, flows | warpscript | Language used |
chartTitle | chart-title | string | undefined | Title of the Tile, not mandatory, could be overridden by the dashboard definition (see Dashboard Definition below). |
result | result | DataModel / string | Execution result |
<discovery-plot url="https://warp.senx.io/api/v0/exec">
1 4 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR
</discovery-plot>
Options inherit from higher level.
Name | Type | Default | Description |
---|---|---|---|
type | string | Chart type (line, area, scatter, step-area, spline-area, spline, step, step-after, step-before, annotation, bar, display, image, map, gauge, linear-gauge, circle, pie, plot, doughnut, rose, tabular, svg, input:text, input:list, input:secret, input:autocomplete, input:slider, input:date, input:date-range, button) | |
timeMode | string | 'date' | date, timestamp or custom |
timeZone | string | 'UTC' | Timezone |
timeUnit | string | 'us' | Warp 10 time unit (us, ms, ns) |
scheme | string | 'WARP10' | Color scheme (COHESIVE, COHESIVE_2, BELIZE, VIRIDIS, MAGMA, INFERNO, PLASMA, YL_OR_RD, YL_GN_BU, BU_GN, WARP10, NINETEEN_EIGHTY_FOUR, ATLANTIS, DO_ANDROIDS_DREAM, DELOREAN, CTHULHU, ECTOPLASM, T_MAX_400_FILM ) |
showLegend | boolean | false | Display the chart legend |
fullDateDisplay | boolean | false | Display full date on the XAxis |
unit | string | Unit to be displayed | |
bgColor | string | Background color of tiles | |
datasetColor | string | Only for the param field in execution result. Color of the trace | |
fontColor | string | Font color in tiles | |
borderColor | string | Border color in tiles | |
showLegend | boolean | false | Display chart legend |
responsive | boolean | true | Responsive charts |
showRangeSelector | boolean | false | Display the skyline below line or area charts |
autoRefresh | number | -1 | if positive value, will refresh with a request each autoRefresh second for http requests, milliseconds for WebSocket |
showErrors | boolean | true | Display errors if any |
showStatus | boolean | true | Display the Warp 10 execution status |
expandAnnotation | boolean | false | Expand annotations |
scheme | string | 'WARP10' | Color scheme ( COHESIVE, COHESIVE_2, BELIZE, VIRIDIS, MAGMA, INFERNO, PLASMA, YL_OR_RD, YL_GN_BU, BU_GN, WARP10, NINETEEN_EIGHTY_FOUR, ATLANTIS, DO_ANDROIDS_DREAM, DELOREAN, CTHULHU, ECTOPLASM, T_MAX_400_FILM, MATRIX, CHARTANA) |
eventHandler | string | 'type=Regexp,tag=Regexp' | Only applies on Tiles and Dashboard. See the events chapter below |
Name | Default |
---|---|
--gts-classname-font-color | #004eff |
--gts-labelname-font-color | #19A979 |
--gts-attrname-font-color | #ED4A7B |
--gts-separator-font-color | #a0a0a0 |
--gts-labelvalue-font-color | #000000 |
--gts-attrvalue-font-color | #000000 |
--warp-view-font-color | #000000 |
--warp-view-bg-color | transparent |
Event | Description | Type |
---|---|---|
draw | CustomEvent<void> |
Name | Default |
---|---|
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
---|---|---|
data | GTS , GTS[] , custom data | Data to display, numeric GTS only |
globalParams | Option | Global options (see above) concerning this tile, including chat type |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
Supported option per series are:
1 4 <%
DROP NEWGTS 'g' STORE
1 30 <%
'ts' STORE
$g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP
%> FOR
$g %> FOR STACKTOLIST 'data' STORE
{
'data' $data
'params' [
{ 'datasetColor' '#dc3545' 'xAxis' 0 }
{ 'datasetColor' '#ff9900' 'xAxis' 0 }
{ 'type' 'area' 'datasetColor' '#90d743' 'xAxis' 1 }
{ 'datasetColor' 'white' 'xAxis' 0 }
]
}
Custom data for line and scatter only:
<% [ 0 10 <% DROP [ RAND 10 * 5 - RAND 10 * 5 - ] %> FOR ] %> 'rand' STORE
{
'title' 'Test'
'globalParams' { }
'data' [
{ 'label' 'A' 'values' @rand }
{ 'label' 'B' 'values' @rand }
]
}
Name | Default |
---|---|
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
---|---|---|
data | GTS , GTS[] | Data to display, non-numeric GTS only |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
Supported option per series are:
Name | Default |
---|---|
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
---|---|---|
data | GTS , GTS[] , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
Supported option per series are:
{
"title": "Test",
"columns": [ "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 |
---|---|---|
data | number , string , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
{ 'data' 42 'globalParams' { 'timeMode' 'custom' } }
{ 'data' NOW 'globalParams' { 'timeMode' 'date' } }
{ 'data' NOW 5 s - 'globalParams' { 'timeMode' 'duration' } }
{
'data' '<a href="https://warp10.io/" target="_blank">Warp 10</a>'
'globalParams' { 'bgColor' '#f57f17' 'fontColor' '#bc5100' 'timeMode' 'custom' }
}
{
'data' { 'text' 'SenX.io' 'url' 'https://senx.io' }
'globalParams' { 'bgColor' '#f57f17' 'fontColor' '#bc5100' }
}
Name | Type | Description |
---|---|---|
data | GTS , GTS[] , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
string[]
: considered as GEOJsonGTS[]
: considered as PathName | Type | Description |
---|---|---|
tiles | string[] | List of custom tile layers |
mapType | string | Base tile layer (NONE, DEFAULT, HOT, TOPO, TOPO2, STADIA, STADIA_DARK, TONER, TONER_LITE, TERRAIN, ESRI, SATELLITE, OCEANS, GRAY, GRAYSCALE, WATERCOLOR, CARTODB, CARTODB_DARK) |
startLat | number | Initial latitude position |
startLong | number | Initial longitude position |
startZoom | number | Initial zoom level |
maxNativeZoom | number | Maximum zoom number the tile source has available. If it is specified, the tiles on all zoom levels higher than maxNativeZoom will be loaded from maxNativeZoom level and auto-scaled. |
maxZoom | number | The maximum zoom level up to which this layer will be displayed (inclusive). |
Render dots without lines:
{
'key' 'bases'
'render' 'dots'
"color" "#f44336"
"line" false
}
Render weighted dots:
{
'key' 'sightings'
'render' 'weightedDots'
"color" "#31C0F6cc"
"borderColor" "#31C0F6"
"maxValue" 100
"minValue" 0
}
Name | Default |
---|---|
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
---|---|---|
data | GTS , GTS[] , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
Name | Type | Description |
---|---|---|
maxValue | number | Max value for gauge |
Name | Default |
---|---|
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
---|---|---|
data | GTS , GTS[] , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
Name | Type | Description |
---|---|---|
gauge.horizontal | boolean | Gauge orientation |
Name | Type | Description |
---|---|---|
maxValue | number | Max value for gauge |
Name | Default |
---|---|
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
---|---|---|
data | GTS , GTS[] , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
{ 'key':string 'value':number }[]
npm run dev
FAQs
Discovery Widgets Elements
The npm package @senx/discovery-plot receives a total of 9 weekly downloads. As such, @senx/discovery-plot popularity was classified as not popular.
We found that @senx/discovery-plot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.