Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(series): markSizeAccessor and BubbleSeries (alpha) #559

Merged
merged 60 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1d937ce
feat(series): dot accessor
nickofthyme Mar 31, 2020
aa434d4
refactor: tweak radius calculation
nickofthyme Mar 31, 2020
627fe6e
chore: add dot value to tooltip
nickofthyme Apr 1, 2020
39f1066
refactor: cleanup
nickofthyme Apr 1, 2020
aca819a
fix: dot labeling when value is null
nickofthyme Apr 1, 2020
46d8f17
fix: remove unnecessary errors
nickofthyme Apr 1, 2020
7bbeba8
refactor: rename dot to mark throughout
nickofthyme Apr 1, 2020
cd88f07
fix: move delauney types to dev deps
nickofthyme Apr 1, 2020
d3f1e2b
refactor: check for markSizeAccessor before creating radius fn
nickofthyme Apr 1, 2020
b1d48ff
fix: remove pow shorthand
nickofthyme Apr 1, 2020
7fc9950
fix: linear map set method logic
nickofthyme Apr 1, 2020
b32a7e6
refactor: change voronoi naming
nickofthyme Apr 2, 2020
8ff0c27
refactor: point geo check before spatial uppsert
nickofthyme Apr 2, 2020
c2311a9
fix: various errors found in VRT
nickofthyme Apr 3, 2020
fab6300
Merge branch 'master' into feat/dot-accessor
nickofthyme Apr 3, 2020
28ec199
fix: update snapshots with VRT changes
nickofthyme Apr 6, 2020
9063b3e
fix: ts type errors and improve scale types
nickofthyme Apr 7, 2020
9f0b7ab
fix: update scale error handling
nickofthyme Apr 7, 2020
108d6a5
fix: type errors in unit tests
nickofthyme Apr 7, 2020
c638e14
fix: update jest test snapshots
nickofthyme Apr 7, 2020
a0f237a
fix: fix failed jest tests from mark changes
nickofthyme Apr 7, 2020
370d9fa
fix: scaleOrThrow offset
nickofthyme Apr 8, 2020
f6a3b9f
fix: function return type
nickofthyme Apr 8, 2020
dd6e157
fix: function return type error
nickofthyme Apr 8, 2020
efbb203
cleanup: random number generator code
nickofthyme Apr 8, 2020
b14d7e4
fix: ie11 issue, add delaunay file locally
nickofthyme Apr 8, 2020
e487540
Merge branch 'master' into feat/dot-accessor
nickofthyme Apr 8, 2020
af41659
fix: transpile error in ie11, verify bubble chart in ie 11
nickofthyme Apr 9, 2020
3de4a69
refactor: add BubbleSeries type, upadated to use spatial index
nickofthyme Apr 9, 2020
3a00802
fix: coincident point issue, temporary fix
nickofthyme Apr 9, 2020
28d2643
cleanup: random value logic and bubble examples
nickofthyme Apr 9, 2020
46cc771
Merge branch 'master' into feat/dot-accessor
nickofthyme Apr 9, 2020
6f8a426
chore: add delaunay to prettier ignore
nickofthyme Apr 9, 2020
24824da
fix: wrangle delaunay types in once and forall
nickofthyme Apr 9, 2020
a85993c
docs: fix license headers and NOTICE file
markov00 Apr 10, 2020
5c45f80
cleanup: variable naming
nickofthyme Apr 13, 2020
70772d1
fix: issue related to buffer and mixed charts
nickofthyme Apr 13, 2020
9228104
feat: allow rednering of grouped point sets on single layer
nickofthyme Apr 13, 2020
f92e8df
docs: update bubble section with alpha
nickofthyme Apr 14, 2020
56649d0
test: fix broken tests for isPointOnGeometry
nickofthyme Apr 14, 2020
7fad07c
test: mocks cleanup, clean fix ydomain tests
nickofthyme Apr 14, 2020
c01ff6e
feat: mergePartial to allow Maps and Sets
nickofthyme Apr 15, 2020
bce7d9f
test: Rendering bands and geometry mocks
nickofthyme Apr 15, 2020
e5d8a2c
feat: add option to mergePartial and fix type
nickofthyme Apr 15, 2020
dc5ba80
test: refactor rendering bars tests to use mocks
nickofthyme Apr 15, 2020
7c2b6eb
fix: duplicate values in tooltip
nickofthyme Apr 15, 2020
460ea2e
fix: tooltip header visibility condition
nickofthyme Apr 15, 2020
824bd09
fix: jest-extended matchers setup
nickofthyme Apr 15, 2020
5ee40ae
fix: ordinal values with BubbleSeries
nickofthyme Apr 15, 2020
804e023
refactor: remove flatMap usage, fails in jest env
nickofthyme Apr 15, 2020
dfa7cc1
fix: prevent spatial index from returning values when point is out of…
nickofthyme Apr 15, 2020
bf94125
test: add test coverage for changes
nickofthyme Apr 15, 2020
529d7e0
Merge branch 'master' into feat/dot-accessor
nickofthyme Apr 15, 2020
53ae456
fix: tooltip header for bars, update screenshots
nickofthyme Apr 16, 2020
0b9d3ca
fix: ordinal spatial selection
nickofthyme Apr 16, 2020
8d54786
fix: internal type error
nickofthyme Apr 17, 2020
c46965b
test: fix test to match new indexing logic
nickofthyme Apr 17, 2020
ddcb014
chore: cleanup internal types and comments
nickofthyme Apr 17, 2020
6706665
Merge branch 'master' into feat/dot-accessor
nickofthyme Apr 17, 2020
d3bdb4f
Merge branch 'master' into feat/dot-accessor
nickofthyme Apr 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/dist
/coverage
/.vscode
src/utils/d3-delaunay/*
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*.md
*.mdx
*.mdx
20 changes: 19 additions & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,22 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

---
This product also includes code that is adapted from [email protected],
which is available under a "ISC" license.

Copyright 2018 Observable, Inc.

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
roots: ['<rootDir>/src'],
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom-fourteen',
setupFilesAfterEnv: ['jest-extended', '<rootDir>/scripts/setup_enzyme.ts', '<rootDir>/scripts/custom_matchers.ts'],
setupFilesAfterEnv: ['<rootDir>/scripts/setup_enzyme.ts', '<rootDir>/scripts/custom_matchers.ts'],
coveragePathIgnorePatterns: ['<rootDir>/src/mocks/', '<rootDir>/node_modules/'],
clearMocks: true,
globals: {
Expand Down
1 change: 1 addition & 0 deletions scripts/custom_matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License. */

import { matcherErrorMessage } from 'jest-matcher-utils';
import 'jest-extended'; // require to load jest-extended matchers

// ensure this is parsed as a module.
export {};
Expand Down
7 changes: 4 additions & 3 deletions src/chart_types/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@

export {
AreaSeries,
BarSeries,
LineSeries,
Axis,
BarSeries,
BubbleSeries,
HistogramBarSeries,
LineAnnotation,
LineSeries,
RectAnnotation,
HistogramBarSeries,
} from './xy_chart/specs';

export * from './xy_chart/utils/specs';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/xy_chart/annotations/annotation_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function scaleAndValidateDatum(dataValue: any, scale: Scale, alignWithTic
const isContinuous = scale.type !== ScaleType.Ordinal;
const scaledValue = scale.scale(dataValue);
// d3.scale will return 0 for '', rendering the line incorrectly at 0
if (isNaN(scaledValue) || (isContinuous && dataValue === '')) {
if (scaledValue === null || (isContinuous && dataValue === '')) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function computeYDomainLineAnnotationDimensions(

const annotationValueYposition = yScale.scale(dataValue);
// avoid rendering non scalable annotation values
if (isNaN(annotationValueYposition)) {
if (annotationValueYposition === null) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/xy_chart/crosshair/crosshair_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function getSnapPosition(
totalBarsInCluster = 1,
): { band: number; position: number } | undefined {
const position = scale.scale(value);
if (position === undefined) {
if (position === null) {
return;
}

Expand Down
Loading