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: ColorMapFunction type in WellLogView #2249

Merged
merged 42 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
44a1de6
New ColorFunction type
iWowik Sep 17, 2024
0887900
Merge branch 'master' into ColorFunctions
iWowik Sep 20, 2024
4fd7478
Fix tests
iWowik Sep 20, 2024
a3330b7
Update Settings.tsx
iWowik Sep 20, 2024
23c91cc
Merge branch 'master' into ColorFunctions
iWowik Sep 20, 2024
1f56363
Merge branch 'master' into ColorFunctions
iWowik Sep 20, 2024
9737e84
Merge branch 'master' into ColorFunctions
iWowik Sep 24, 2024
6226e51
Merge branch 'master' into ColorFunctions
iWowik Sep 24, 2024
4d4db71
remove ColorTable in favor of ColorFunction
iWowik Sep 24, 2024
76b57ef
fix JSON templates
iWowik Sep 24, 2024
3ad797e
remove defColorFunction
iWowik Sep 24, 2024
c660ac4
revert
iWowik Sep 24, 2024
e6348ac
add PropTypes
iWowik Sep 24, 2024
9df8e32
fix PropTypes
iWowik Sep 24, 2024
9b0cb86
more PropTypes
iWowik Sep 25, 2024
fd1ab31
add PropTypes
iWowik Sep 25, 2024
a30a8c3
Merge branch 'master' into ColorFunctions
iWowik Sep 25, 2024
94a2542
Add test snapshot
iWowik Sep 25, 2024
60a2087
Merge branch 'master' into ColorFunctions
iWowik Sep 25, 2024
7737cc1
update test snapshots
iWowik Sep 26, 2024
ec0de38
Fix dialog colorFunction labels
iWowik Sep 26, 2024
288e268
ColorFunction => ColorMapFunction
iWowik Sep 26, 2024
1ba493a
Merge branch 'master' into ColorFunctions
iWowik Sep 26, 2024
6d991f5
colorFunctions => colorMapFunctions
iWowik Sep 26, 2024
9115f99
Merge branch 'master' into ColorFunctions
iWowik Sep 26, 2024
1f61f2c
exampleMapFunctions => exampleColorMapFunctions
iWowik Sep 26, 2024
b17ab7b
Merge branch 'ColorFunctions' of https://github.com/iWowik/webviz-sub…
iWowik Sep 26, 2024
6f48967
fix prettier
iWowik Sep 27, 2024
0b4c798
fix python WLV
iWowik Sep 27, 2024
09d11d7
rename ColorTableTypes.ts to ColorMapFunction.ts
iWowik Sep 27, 2024
a3cba4a
ColorTableTypes.ts => ColorMapFunction.ts
iWowik Sep 27, 2024
37430de
colorMapFunction => colorMapFunctionName
iWowik Oct 1, 2024
b8f632a
Update welllogviewer-demo-welllogviewer--discrete.png
iWowik Oct 1, 2024
c260daa
Merge remote-tracking branch 'upstream/master' into ColorFunctions
iWowik Oct 2, 2024
4585349
Update facies3wells.json
iWowik Oct 2, 2024
078d33f
Merge branch 'master' into ColorFunctions
iWowik Oct 2, 2024
e1e15b7
Update some snapshots
iWowik Oct 2, 2024
5f73a37
Update welllogviewer-components-welllogview--discrete.png
iWowik Oct 2, 2024
bb452d0
Update welllogviewer-demo-welllogviewer--discrete.png
iWowik Oct 2, 2024
b96ea4e
Update welllogviewer-components-welllogview--discrete.png
iWowik Oct 3, 2024
e7d87c1
Merge branch 'master' into ColorFunctions
iWowik Oct 3, 2024
2ee0432
Merge branch 'master' into ColorFunctions
w1nklr Oct 3, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,6 @@ bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

# MS Visual Studio
.vs
12 changes: 6 additions & 6 deletions example-data/facies3wells.json
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@
"name": "discrete",
"type": "stacked",
"color": "red",
"colorTable": "Stratigraphy"
"colorFunction": "Stratigraphy"
},
{ "name": "categorical", "type": "stacked", "color": "green" }
]
Expand Down Expand Up @@ -1909,7 +1909,7 @@
"name": "discrete",
"type": "stacked",
"color": "red",
"colorTable": "Stratigraphy"
"colorFunction": "Stratigraphy"
w1nklr marked this conversation as resolved.
Show resolved Hide resolved
},
{ "name": "categorical", "type": "stacked", "color": "green" }
]
Expand Down Expand Up @@ -1961,13 +1961,13 @@
"name": "discrete",
"type": "stacked",
"color": "red",
"colorTable": "Stratigraphy"
"colorFunction": "Stratigraphy"
w1nklr marked this conversation as resolved.
Show resolved Hide resolved
},
{ "name": "categorical", "type": "stacked", "color": "green" }
]
}
],
"colorTables": [
"colorMapFunctions": [
{
"name": "Physics",
"discrete": false,
Expand Down Expand Up @@ -2198,7 +2198,7 @@
},
{
"name": "Colors_set_1",
"discrete": "true",
"discrete": true,
"colors": [
[0, 255, 13, 186],
[1, 255, 64, 53],
Expand All @@ -2219,7 +2219,7 @@
},
{
"name": "Colors_set_3",
"discrete": "true",
"discrete": true,
"colors": [
[0, 120, 181, 255],
[1, 255, 29, 102],
Expand Down
2 changes: 1 addition & 1 deletion example-data/synclog_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
{
"name": "HKL",
"type": "gradientfill",
"colorTable": "Physics",
"colorFunction": "Physics",
w1nklr marked this conversation as resolved.
Show resolved Hide resolved
"color": "green"
},
{
Expand Down
6 changes: 3 additions & 3 deletions example-data/welllog_template_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"name": "HKLA",
"type": "gradientfill",
"color": "blue",
"colorTable": "Physics",
"inverseColorTable": "Physics"
"colorMapFunction": "Physics",
"inverseColorMapFunction": "Physics"
}
]
},
Expand Down Expand Up @@ -196,7 +196,7 @@
{
"name": "HKL",
"type": "gradientfill",
"colorTable": "Physics",
"colorMapFunction": "Physics",
"color": "green"
},
{
Expand Down
2 changes: 1 addition & 1 deletion example-data/welllog_template_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
{
"name": "discrete",
"type": "stacked",
"colorTable": "Stratigraphy"
"colorFunction": "Stratigraphy"
w1nklr marked this conversation as resolved.
Show resolved Hide resolved
}
]
}
4 changes: 2 additions & 2 deletions example-data/wellpick_colors.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
{
"name": "Colors_set_1",
"discrete": "true",
"discrete": true,
"colors": [
[0, 255, 13, 186],
[1, 255, 64, 53],
Expand Down Expand Up @@ -119,7 +119,7 @@
},
{
"name": "Colors_set_3",
"discrete": "true",
"discrete": true,
"colors": [
[0, 120, 181, 255],
[1, 255, 29, 102],
Expand Down
14 changes: 8 additions & 6 deletions python/src/components/WellLogViewer/WellLogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const WellLogViewerComponent = React.lazy(() =>
}))
);

import type ColorMapFunction from "../components/ColorMapFunction";
import type { WellPickProps } from "../components/WellLogView";

// react-docgen / dash-generate-components/extract-meta.js does not properly parse
// the imported WellLogViewerProps. Hence, we have to recreate them here.
/**
Expand Down Expand Up @@ -52,9 +55,8 @@ type WellLogViewerProps = {
/** Prop containing track template data */
template: object;

/** Prop containing color table data */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
colorTables: any[]; // specify the exact type if known
/** Prop containing color function/table array */
colorMapFunctions: ColorMapFunction[];

/** Orientation of the track plots on the screen. Default is false */
horizontal?: boolean;
Expand All @@ -66,16 +68,16 @@ type WellLogViewerProps = {
selection?: number[];

/** Well picks data */
wellpick?: object;
wellpick?: WellPickProps;

/** Primary axis id: " md", "tvd", "time"... */
primaryAxis?: string;

/** Log mnemonics for axes */
axisTitles?: object;
axisTitles?: Record<string, string>;

/** Names for axes */
axisMnemos?: object;
axisMnemos?: Record<string, string[]>;

/** Set to true for default titles or to array of individual well log titles */
viewTitle?: boolean | string | object; // 'object' might be replaced by a specific type like ReactNode
Expand Down
Loading
Loading