forked from hpcc-systems/Visualization
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gordon Smith <[email protected]>
- Loading branch information
1 parent
962c56a
commit 22f7c15
Showing
15 changed files
with
3,129 additions
and
7,544 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,47 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "test-browser", | ||
"type": "msedge", | ||
"request": "launch", | ||
"url": "http://localhost:8888", | ||
"webRoot": "${workspaceFolder}", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js", | ||
"!**/node_modules/**" | ||
], | ||
}, | ||
{ | ||
"name": "test-node", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"run-script", | ||
"test-node" | ||
], | ||
"runtimeExecutable": "npm", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js", | ||
"!**/node_modules/**" | ||
], | ||
}, | ||
{ | ||
"name": "index.html", | ||
"type": "chrome", | ||
"request": "launch", | ||
"url": "file:///${workspaceRoot}/index.html", | ||
"type": "msedge", | ||
"url": "file:///${workspaceFolder}/index.html", | ||
"runtimeArgs": [ | ||
"--disable-web-security" | ||
], | ||
"webRoot": "${workspaceRoot}" | ||
"webRoot": "${workspaceFolder}", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js", | ||
"!**/node_modules/**" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { browserTpl } from "@hpcc-js/esbuild-plugins"; | ||
import pkg from "./package.json" with { type: "json" }; | ||
|
||
// config --- | ||
await Promise.all([ | ||
browserTpl("src/index.ts", "dist/index", { | ||
keepNames: true, | ||
alias: { | ||
"d3-array": "@hpcc-js/common", | ||
"d3-brush": "@hpcc-js/common", | ||
"d3-collection": "@hpcc-js/common", | ||
"d3-color": "@hpcc-js/common", | ||
"d3-dispatch": "@hpcc-js/common", | ||
"d3-drag": "@hpcc-js/common", | ||
"d3-dsv": "@hpcc-js/common", | ||
"d3-ease": "@hpcc-js/common", | ||
"d3-format": "@hpcc-js/common", | ||
"d3-interpolate": "@hpcc-js/common", | ||
"d3-scale": "@hpcc-js/common", | ||
"d3-selection": "@hpcc-js/common", | ||
"d3-time-format": "@hpcc-js/common", | ||
"d3-transition": "@hpcc-js/common", | ||
"d3-zoom": "@hpcc-js/common" | ||
}, | ||
external: [ | ||
...Object.keys(pkg.dependencies), | ||
] | ||
}) | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,85 @@ | ||
<!doctype html> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>@hpcc-js/chart</title> | ||
|
||
<script> | ||
if (window.location.protocol === "file:" || window.location.origin.indexOf("http://localhost") === 0) { | ||
document.write('<link rel="stylesheet" href="../../packages/common/font-awesome/css/font-awesome.min.css">'); | ||
document.write('<script type="text/javascript" src="../../packages/loader/dist/index.js"><' + '/script>'); | ||
} else { | ||
document.write('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hpcc-js/common/font-awesome/css/font-awesome.min.css">'); | ||
document.write('<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@hpcc-js/loader"><' + '/script>'); | ||
<title>Home</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-color: #f0f0f0; | ||
} | ||
</script> | ||
|
||
<script> | ||
var hpccLoader = window["@hpcc-js/loader"]; | ||
</script> | ||
h1 { | ||
text-align: center; | ||
margin-top: 50px; | ||
} | ||
|
||
<style> | ||
#placeholder, | ||
.placeholder { | ||
position: absolute; | ||
left: 8px; | ||
top: 8px; | ||
right: 8px; | ||
bottom: 8px; | ||
#placeholder { | ||
width: 100%; | ||
height: 500px; | ||
background-color: #fff; | ||
margin-top: 20px; | ||
} | ||
</style> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@observablehq/runtime": "https://cdn.jsdelivr.net/npm/@observablehq/[email protected]/dist/runtime.js", | ||
|
||
"@hpcc-js/util": "../util/dist/index.js", | ||
"@hpcc-js/common": "../common/dist/index.js", | ||
"@hpcc-js/api": "../api/dist/index.js", | ||
"@hpcc-js/chart": "../chart/dist/index.js", | ||
"@hpcc-js/codemirror": "../codemirror/dist/index.js", | ||
"@hpcc-js/comms": "../comms/dist/index.js", | ||
"@hpcc-js/dgrid": "../dgrid/dist/index.js", | ||
"@hpcc-js/dgrid2": "../dgrid2/dist/index.js", | ||
"@hpcc-js/react": "../react/dist/index.js", | ||
"@hpcc-js/html": "../html/dist/index.js", | ||
"@hpcc-js/graph": "../graph/dist/index.js", | ||
"@hpcc-js/layout": "../layout/dist/index.js", | ||
"@hpcc-js/other": "../other/dist/index.js", | ||
"@hpcc-js/map": "../map/dist/index.js", | ||
"@hpcc-js/map-deck": "../map-deck/dist/index.js", | ||
"@hpcc-js/observablehq-compiler": "../observablehq-compiler/dist/index.js" | ||
} | ||
} | ||
</script> | ||
<link rel="stylesheet" href="./dist/index.css"> | ||
</head> | ||
|
||
<body onresize="doResize()"> | ||
<div id="placeholder"> | ||
</div> | ||
<script> | ||
var app; | ||
hpccLoader.amd().then(function (require) { | ||
require(["lib-umd/test"], function (testMod) { | ||
<h1>ESM Quick Test</h1> | ||
<div id="placeholder"></div> | ||
<script type="module"> | ||
import { Polygons } from "@hpcc-js/map-deck"; | ||
|
||
app = new testMod.Test() | ||
.target("placeholder") | ||
.render(); | ||
|
||
}); | ||
}); | ||
window.__widget = new Polygons() | ||
.target("placeholder") | ||
.columns(["h3index", "polys", "weight"]) | ||
.data([ | ||
["822647fffffffff", [[-89.7485370040972, 36.65876042006413], [-87.99076359407903, 37.38207405857687], [-87.95138172303123, 39.0147883106185], [-89.72621630626134, 39.94722184718561], [-91.54335025644869, 39.22565620613393], [-91.52528283315517, 37.57043047609912]], 46], | ||
["82489ffffffffff", [[-98.24787904177958, 28.91983357142504], [-96.56734672388515, 29.86373079369924], [-96.66289038040519, 31.61953062690852], [-98.49387337240059, 32.44435492016832], [-100.2117838202375, 31.48993750697799], [-100.061214992845, 29.72188188001257]], 14], | ||
["82450ffffffffff", [[-88.35361313416331, 18.71869881492448], [-86.86052253318431, 19.58510743293509], [-86.81165399779584, 21.27218577811605], [-88.29590003003726, 22.12073073961633], [-89.8335894971924, 21.24816786632389], [-89.8417414487811, 19.53349485374346]], 15], | ||
["824447fffffffff", [[-91.44305997299979, 29.03851386192278], [-89.78916802666802, 29.87606801972664], [-89.7794734704032, 31.59073781085478], [-91.4744264324729, 32.49146921600194], [-93.17771064982072, 31.65113143450284], [-93.13595107051557, 29.91330256038463]], 26], | ||
["82265ffffffffff", [[-91.49084714009673, 34.20071647537129], [-89.75917248139794, 34.98489313139716], [-89.7485370040972, 36.65876042006413], [-91.52528283315517, 37.57043047609912], [-93.31108179083483, 36.78541768537119], [-93.26521175979074, 35.09010839353649]], 22], | ||
["8244b7fffffffff", [[-76.8312173516333, 23.34286288063484], [-75.445541089086, 24.01255660121923], [-75.25188715193887, 25.56875428660015], [-76.47218493325147, 26.49429123770877], [-77.90890704647856, 25.83560088252219], [-78.0732653483983, 24.24011047374086]], 1], | ||
["8226cffffffffff", [[-96.66289038040519, 31.61953062690852], [-94.94582051780957, 32.51690625937428], [-95.01750723130108, 34.24608056480459], [-96.86314528739003, 35.09305545301956], [-98.62272599746812, 34.18804644137447], [-98.49387337240059, 32.44435492016832]], 38], | ||
["8248b7fffffffff", [[-97.90563426634658, 23.58979436809323], [-96.29745134025397, 24.55902528467453], [-96.38475070596915, 26.33013314194643], [-98.13038997835126, 27.14553087371657], [-99.77344403948946, 26.16294928512754], [-99.63585556147724, 24.37894428550873]], 14], | ||
["82445ffffffffff", [[-89.7794734704032, 31.59073781085478], [-88.10173760069401, 32.37535444162421], [-88.0658863098819, 34.05983621723471], [-89.75917248139794, 34.98489313139716], [-91.49084714009673, 34.20071647537129], [-91.4744264324729, 32.49146921600194]], 13], | ||
["822677fffffffff", [[-91.4762617917987, 42.44495953871468], [-93.4580322172988, 41.74324949577916], [-93.40741416499294, 40.11435457093053], [-91.54335025644869, 39.22565620613393], [-89.7262163062613, 39.94722184718562], [-89.5783976626672, 41.51855472869031]], 21] | ||
]) | ||
.polygonColumn("polys") | ||
.weightColumn("weight") | ||
.render() | ||
; | ||
|
||
</script> | ||
<script> | ||
function doResize() { | ||
if (app) { | ||
app | ||
.resize() | ||
.lazyRender(); | ||
} | ||
window.__widget?.resize()?.render(); | ||
} | ||
</script> | ||
</body> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.