108 Commits

Author SHA1 Message Date
Joe O'Hallaron
f57d057b05
This was renamed during cross section stuff, but breaks all of the examples which import app.bundle.js, named from this property. (#662) 2023-11-30 15:43:42 -07:00
Joe O'Hallaron
fa9fe313d4
Upgrade babel + plugins, use es2020 preset (#595)
* Upgrade babel + plugins, use es2020 preset, move contour js and transpile it

* Reset js to master

* Fix contours name in webpack config

* Update contours w latest from master

* Galdernit

* Rebuild charting.js

* Upgrade nyc

* Require babel core in opts, not in config
2022-12-20 10:42:46 -07:00
Christopher Root
07c948fb60
Enforces cross-section line draw rule by only allowing one drawn cross section at a time (#611)
* A bit better generalization of the lasso tools by adding a lasso tool
type identifier to each tool subclass.

* Add some new events for when lasso tool buttons are activated or
deactivated. This may be useful to check the case that a cross section
line was deleted as a result of the user drawing a new line.

* Adds a more general-purpose fireEvent utility method to the base
ShapeHandler class that will auto-tag the event with the current
lasso_tool_type. This allows for a more preferred way to check whether
a created shape is a result of a specific tool or not.

* Tags lasso tool shapes with the tool type which may be useful in
callback handlers

* Enforces the restriction that only one cross-section line can be drawn
at a time. It does this by deleting any previously existing line shapes
on a new "create" click.

* Adds an emum that adds more flexibility as to when a ShapeHandler's
destroy() method might be called so derived classes can do more
context-aware destroys, i.e. all shapes being destroyed as a result of
a "cancel", or just the temporary shapes being destroyed after a shape
is successfully completed.

* Fill out the remaining pieces of throwing a DRAW STOPPED event signal
with a reason (cancelled, completed, reset, or deactivated)
2022-12-05 09:30:18 -08:00
Christopher Root
05fe33dca9
Adds Cross Section-ready line draw tool to the suite of lasso tools (#609)
* Adds a first pass of a LatLonPolyLine class that will be used to draw
the single line segment for a cross-section.

* Adds an LineCrossSection example.

* Adds some initial lasso-specific event handling for lasso shapes. This
currently captures lasso shape create, delete, and draggable edit begin,
end.

* Adds a new onDrawEvent() method to raster-draw-mixin that's used as a
conduit to adding event callbacks to the drawEngine instance that 
manages all the drawn lasso shapes. There's room for improvement here
tho.

* Adds new LassoToolSetTypes bitflag enum to control the visibility of
which lasso tools you want to display on a raster-draw-mixin enabled
chart.
2022-12-01 16:22:48 -08:00
Joe O'Hallaron
4896c4cfa2
Contour filtering fix (#602)
* Add spaces when joining with AND, works right now but looks funky
* filter any non existent filters, fix indentation in example
* More careful filtering of filter transforms, only take the goodn's
* Add method to remove layer by name
* Add method to add layer to the bottom of the stack
2022-11-28 15:05:26 -07:00
Christopher Root
d464fd6c70
Adds the initial implementation of cross-section functionality via a new mesh raster layer for imported raster data. (#600) 2022-11-22 08:56:11 -05:00
Joe O'Hallaron
69a6ab4d7e
Reformat contour state (#593)
* First draft polygons layer + lines layer
* Small adjustments to query to get it to work
* Add opacity for contour colors, change colors a bit
* Switch to suggested format
* Include popover stuff in the contour state
* Move interval settings to sub property, default field name for major/minor field, throw error if calling contour sql generate on a non contour layer
* Change field name to is* so that its more clear that its a boolean
* Add some basic validation, throw errors when things are bad, interval -> intervals
2022-11-17 14:29:28 -07:00
Joe O'Hallaron
78e36e551c
Contour polygon layer (#592)
* First draft polygons layer + lines layer

* Small adjustments to query to get it to work

* Add opacity for contour colors, change colors a bit

* Formatting

* Fix lint problems and bug created when refactoring

* Move default opacity to constant, use throughout

* Add validation check for table before generating preflight query. Reject promise if not

* Spiff up check, used extracted data const, formatting
2022-11-16 16:34:52 -07:00
Christopher Root
17975a31c8
Adds windbarb raster chart layer via a new raster layer state parser/validator/vega-generator [DRAFT] (#585)
* Adds a new windbarb raster chart layer that aligns with it BE-
rendering counterpart. Vega-lite-like state json parsing is done
with a more stable parser/validator and vega generator.

Initial changes include:
 * adding a new exampleWindBarbs example with webpack config
 * adding a new windbarb raster layer called raster-layer-windarb-mixin
   * embedded in this file is a first iteration of a more refined raster
     layer state parser/validator and vega generator.
   * once this new parser/validator/generator is in a more solid state,
     the expectation is to change the other existing raster charts to
     it.
 * exposing the new windbarb raster layer in raster-chart, raster-layer
   and index

* Adds initial implementations of other scales that haven't been fully
utilized, namely threshold scale. The scales come with default "auto"
handling. For example, threshold scales use sigma values as stops
for "auto"

* Adds more formal legend support, including options to build legends
for threshold and quantize scales more appropriately.

* Fixes some tests to account for changes in stacked-legend

NOTE: the change to the stacked-legend::should gradient test is
questionable. It's possible the changes made to the stacked-legend may
break legend behavior and the fact that this test is failing might be
and indicator of that. This may require additional investigation to
verify or not behavior changes. Going to land this in the meantime to
unblock and deal with any legend issues secondarily.
2022-11-10 08:45:05 -08:00
Joe O'Hallaron
ba858ee0b8
Implement contour charts (#589)
* Implement contour charts
2022-11-08 11:42:35 -07:00
Chris Matzenbach
a1f06d6b58 Merge pull request #1 from omnisci/matzy/FE-14900_mapd-charting-rebrand
[FE-14900] mapd-charting rebrand
2022-03-09 09:24:25 -06:00
uyanga-gb
235f83124a
Linemap example improvement (#324)
* testing linechart color

* added Bar chart and draw filter to Linemap chart example

* use TIGER roads for Linemap example

* use California roads dataset for Linemap example
2019-04-17 20:41:47 -07:00
Jonathan Rajavuori
e95e507fb7
[FE-4902] Update for mapd-connector changes (#284)
* Format raster-chart.js

* Update to use new connector method renderVegaAsync and updated interface for getResultRowForPixel

* Use getResultRowForPixelAsync

* Update dependencies - master commits of connector and crossfilter for 4902, mapd-data-layer-2 0.0.8
2019-01-16 11:37:22 -06:00
uyanga-gb
5a6b045cec
fix Multilayer and Multilayer Scatterplot examples (#290) 2018-12-26 08:48:35 -08:00
uyanga-gb
615711a47c
fix poly map example and update linemap crossfilter method (#286) 2018-12-18 17:14:54 -08:00
Jonathan Rajavuori
74c9503b84
Update some links to current and public servers (#278) 2018-12-03 17:04:19 -06:00
uyanga-gb
81c6bce539
[FE-7440] Linemap example (#265)
* initial integration of linemap example

* add linemap example

* adding hide popup method for liemap

* add mapdc.js

* update example url and added image for linemap

* add githubusercontent.com image url

* remove local linemap image
2018-11-07 14:21:38 -08:00
Chris Henrick
0a82871fd7
[WIP] MapD3 and Crossfilter Example (#224)
* update crossfilter and connetor dev deps

* mapd3 line chart rendering with cf charts

* render second y-axis

* adapter almost working...

* use dcFlag to cache chart filter strings, not working...

* better handling of composing dc chart filter strings to sql query

* combo chart brushing is crossfitlering other charts, but resets itself

* enable brush crossfiltering on combo chart

* resize combo chart on window resize

* throttle brushMove event, clean up some

* fix typos in comments

* disable combo chart binning & range editor ui

* point @mapd/crossfilter dev dep to latest

* fixed axis labels

* added mapd3 as a dev dep

* included mapd3 in example webpack config

* removed mapd3.js script tag

* tmp fix for css overflow-x bug

* added babel-polyfill to dev deps

* split js file from html

* use babel-polyfill for examples

* clean up
2018-06-14 17:37:43 -07:00
Alex Baden
002bd6ae02
Choropleth API improvements (#226)
* Explicitly differentiate between poly rendering with a geojoin and poly rendering with a single table
* Remove hard coded poly column name
* Simplify usesAutoColors check
* Properly handle poly popup fields
* Handle all possible poly query cases (join / color measure)
* Clear crossfilter when clearing poly layer filter
* Fix examples
2018-06-06 12:23:17 -07:00
Alex Baden
2abcf1e777 poly projection WIP 2018-04-26 10:23:44 -07:00
Chris Viau
81e6783d22
minimal example of using renderVega (#194) 2018-04-26 10:40:44 -04:00
Chris Henrick
8fd24117e0 fix mapd-data-layer import in geoheat example 2018-03-08 15:49:23 -08:00
Tai Dupree
afc4f50838 fix color lookup for popup
click filtering

fix examples

push layer filter to chart filter handlers; filter null values from popup

rewrite query to use table aliases for self-join

change query to use non-join when tables are the same

improved click filtering

fix race between mapbox style load and data fetch

layer filter listeners

import d3
2018-03-08 15:49:23 -08:00
Tai Dupree
fa0c82efaa fix poly raster color scale 2018-03-08 15:49:23 -08:00
Jonathan Huang
8f7f3e89ca [POINT LAYER] add ability to add mark symbols (#114) 2017-11-28 08:21:31 -05:00
Jonathan Huang
66069b7db0 Stacked Legend For Raster (#109)
* add stacked legend to raster

* stacked bar module

* auto behavior for geoheat

* bump legendables
2017-11-28 08:21:31 -05:00
Jonathan Huang
e89bbab693 add tests for raster point layer
progress on sizing spec

finish new point layer genVega

working point raster layer with vega lite spec

fix popup behavior on raster point layer

fix examples

fix examples

add limit to point vega

update transform api and add sampling

update raster poly layer to use setState vega-lite api
2017-11-28 08:21:31 -05:00
Jonathan Huang
af48ce6739 Geo Heatmap Example (#77)
* geoheatmap raster layer

set mapbox token in examples, set cap in example 3, raise poly point cap in other examples (#92)

include all css and js files in one bundle

bump tp webpack 2

begin raster heatmap example

basic heatmap raster layer mixin

fix lint

xyDim getter/setter for heatmap raster layer

raster heatmap layer example with sliders

example to use distinct lang

refactor

use mapd data layer

use webpack dev server for examples

update example build script

calculate proper gap size

update geoheatmap example image

update example image styling

dynamic number of bins on geoheatmap

vega-lite api for heat layer

implement hex binning

update aggregate

ability to switch mark types

update babelrx

manual pixel sizing

add destroy hook

dynamic color domain

linting

use layer.genSQL in genVega

handle aggregation parsing

rebuild

do not set null colordomain

fix test

update bundle

fix test

* tweak example
2017-08-28 15:03:01 -07:00
Eric
3b8960ab1d set mapbox token in examples, set cap in example 3, raise poly point cap in other examples (#92) 2017-08-22 12:05:12 -07:00
Chris Viau
18f32f4515 Expose mapbox access token to map-mixin as .mapbboxToken (#90) 2017-08-17 09:47:06 -04:00
Jonathan Huang
7056312a2d refactor focus-range behavior for coordinate-grid charts (#65)
* refactor focus-range behavior for coordinate-grid charts

add line destory hook

remove range mixin

clean up coordinate-grid

prevent negative height

fix is range check

update range checks

remove dead code

prettify code and fix lint errors

remove comments

* safely access focus-range charts in label-mixin

* adding stacked barchart code, example, docs

* make range filter inclusive

* accessing appropriate data for color stacking in bar chart

* fix tests

* add tests to coordinate-grid-mixin
2017-07-19 14:41:53 -07:00
Eric
a3dabf93fd Raster point size (#74)
* reduce point size range in raster chart examples

* update links for example gifs in README, example index
2017-07-13 17:02:09 -07:00
Jonathan Huang
0981d9e69c [TESTS] add e2e tests for drawing polys in example 5 2017-06-28 19:13:16 -07:00
mLuby
0605995681 use browser-connector 2017-05-24 13:13:30 -07:00
Marc Balaban
58963351bf [DOCS/EXAMPLES] polished docs and examples (#16) 2017-05-05 17:14:07 -07:00
Jonathan Huang
fc7911a2e0 Fix Pointmap Selection Tool Example 5 (#12)
* [EXAMPLES] fix selection tool example

* [TRAVIS] fixed file path for after success
2017-05-05 11:09:34 -07:00
Marc Balaban
8eac076cef [EXAMPLES] updated example links to connect to metis 2017-05-04 15:50:13 -07:00
Jonathan Huang
a79bb576b6 Example fix (#114)
* fix examples and scripts

* fix test scripts

* update license and fix package.json docs + lint scripts

* update coverage requirements
2017-04-30 22:08:35 -07:00
mrblueblue
bb34327114 move example test folder 2017-04-24 20:28:25 -07:00
Jonathan Huang
2e073291c1 clean up examples 2017-04-24 19:59:14 -07:00
Jonathan Huang
31acad6366 [DC EXAMPLES] remove sync requests and fix charts 2017-04-24 19:58:55 -07:00
Christopher Root
e1cd9bc928 Convert mapdc backend-rendered charts to use the new lasso tool, and enable lasso capability for BE scatterplots in immerse (#2492) 2017-04-05 14:56:11 -07:00
Jonathan Huang
df8a8dae36 [DC] vega utils file + fix layer examples (#2288)
* [DC] vega utils file + fix layer examples

* remove arrow function
2017-02-17 15:28:58 -08:00
ʈᵃᵢ
ee47aea4b4 [infra] change examples to use forge (#2283) 2017-02-16 10:20:18 -08:00
Jonathan Huang
7251f1d4e3 mapdc as ES6 Modules (#2255)
* [MAPDC] refactor using es6 modules

add logging module

add more charts and mixins

add bubble overlay, heatmap, boxplot

add more charts

finish moving to new folder

beging moving overrides to new folder

replace mapdc src/

update build script

fix tests

fix mapdc import

fix mapdc import

prebuild mapdc css styles

remove console

redrawAll on rangeFilter update

remove grunt, delete dead files

update tests

minor fixes

fix raster-mixin d3 import

lint

clear cache

fix mapdc style import

fix example styles

* remove dc from scatter-mixin
2017-02-13 15:20:37 -08:00
ʈᵃᵢ
83b97fe8f0 [dc] fixes example 3 by importing mapbox-draw (#2258) 2017-02-13 14:34:21 -08:00
ʈᵃᵢ
698e6a0c7e Range chart axis (#2218)
* [dc] initialize range chart with binParams.binBounds instead of xAxisMin/Max

* fix draw-mixin tests

* revert api

* add mapbox-gl-draw to dc example 2
2017-02-06 15:48:49 -08:00
Jonathan Huang
b340a2baa0 [MAPDC] fix examples (#2187) 2017-02-01 12:05:50 -08:00
Jonathan Huang
5d07bfb938 [MAP MIXIN] init map using async init method, fixes #1713, #1687 (#1885)
* [MAP MIXIN] init map using async init method, fixes #1713, #1687

* [V2] add pointmap tests

* [POINTMAP] load proper bounds for initial render call

* bump coverage

* [POINTMAP] update bounds if initial bounds is not equal to rendered map bounds

* fix map move

* remove console

* fix connection reducer test
2016-12-01 14:54:38 -08:00
Jonathan Huang
a8d5ea15fe Example 5 - Polygon Lasso (#1816)
* [DC] add example 5

[DC] update converGeoJSONtoSQL function

[DC] update dependencies to include sprintf

[DC] example 5, no hover on poly select

[DC] disable hover and clicks on polygon draw mode for lasso tool

[DC] wrap coord filter in parens

[DC] test map draw mixin

[DC] use unlikely statement optimization for polygon queries

* circle experiment

* [DC] add circle control to example 5

* update mapbox-gl-draw build process

* [DC] update circle query

* [DC] add tests for circle geojson to sql

* [DC] update circle lasso formula

* [DC] use distance_in_meters for circle query

* fix tests

* update example
2016-11-17 17:50:08 -08:00