Skip to content

Commit 2925561

Browse files
nielsdejongBennuFireMarius Conjeaud“Bastienbastienhubert
authored
2.2.3 Release (#349)
* Master to dev Release (#259) * TableChart : Auto-hide columns prefixed with __ * Master to dev Release (#259) * Added prettier (config based on neo4j/nx repository) * Added eslint and husky (config based on neo4j/nx repository) * Updated eslint config to be as light as possible with Typescript * Updated all files with prettier and linter, refactored files to avoid errors * Added Eslint check step in Github workflows * Updated all files with prettier and linter after rebase on Develop branch * Squash Security Bumbs (#281) * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.2...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump loader-utils from 1.4.0 to 1.4.2 Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Update yarn.lock * yarn gallery util 3.2.1 * bump * remove lodash 4.17.15 lock * remove minimatch 3.0.4 lock * remove d3 color lock * remove node.fet color lock * ut * no node fetch * lod * lod2 * ncheck * d3 init Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niels de Jong <[email protected]> * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery (#264) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.2...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixes #160 (#269) * Fix : Replace parameter in iFrame URLs (#276) * Fix : Replace parameter in iFrame URLs * Fix wrong merge conflict Co-authored-by: Marius Conjeaud <[email protected]> * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery (#290) * Bump loader-utils from 1.4.0 to 1.4.2 (#265) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.2...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niels de Jong <[email protected]> * Crash on Boolean options parameter selection (#285) * bug on non string values * Fix merge conflicts * Fix merge conflicts * Fix merge conflicts * Fix merge conflicts * Fix merge conflicts Co-authored-by: Niels de Jong <[email protected]> * Hotfix for Neo4j container issues with 5.3 (#293) * Updated deployment scripts to use minimal build without source maps (#271) * Changed build script to use mimimal (no source map) deployment * Added TODOs based on comments * Changing card image download logic (#273) * feature(): Changing download logic for card download by downloading the entire card instead of just the view. This kind of change adds also the buttons to the downloaded image, that is not ideal. * fix(download report image): added missing ref for card expanded view * Removed package-lock.json Co-authored-by: Alfred Rubin <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * Dynamic Card titles (#270) * change of names * Resolving conflicts * Bug fix * Refactoring * Fixed replacement of params in card headers Co-authored-by: Niels de Jong <[email protected]> * Docs on custom map provider (#282) * Docs on custom map provider * Update docs/modules/ROOT/pages/user-guide/reports/map.adoc Co-authored-by: MariusC <[email protected]> Co-authored-by: MariusC <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * Added release notes, bumped version number * Fixed style issues introduced by 2.2.1 + some of the console warnings in development mode * Some more minor style fixes in modal text * Fixed unclear phrasing in extensions modal * Added wine dashboard to gallery (#298) * Added wine dashboard * Updated wine dashboard in gallery * Added jokes dashboard (#300) * Added citation graph (#306) * Bump json5 from 1.0.1 to 1.0.2 (#302) Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niels de Jong <[email protected]> * Bump json5 from 2.2.1 to 2.2.3 in /docs (#303) Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v2.2.1...v2.2.3) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump json5 from 1.0.1 to 1.0.2 in /gallery (#304) Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niels de Jong <[email protected]> * Added assessment gallery * Bump convict from 6.2.3 to 6.2.4 in /docs (#307) Bumps [convict](https://github.com/mozilla/node-convict) from 6.2.3 to 6.2.4. - [Release notes](https://github.com/mozilla/node-convict/releases) - [Changelog](https://github.com/mozilla/node-convict/blob/master/CHANGELOG.md) - [Commits](https://github.com/mozilla/node-convict/commits) --- updated-dependencies: - dependency-name: convict dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niels de Jong <[email protected]> * use link (#295) add a link to the neodash repo * upgrade to @neo4j-cypher/react-codemirror package (#286) * upgrade to neo4j-cypher/react-codemirror package * bump @neo4j-cypher/react-codemirror * remove unused old cypher editor component * fix integration tests (missing className) * bump @neo4j-cypher/react-codemirror * bump @neo4j-cypher/react-codemirror * bump @neo4j-cypher/react-codemirror * bump @neo4j-cypher/react-codemirror to latest add codemirror markdown packages as an experiment * enable switching between cypher/markdown languages * update yarn.lock * fix lint errors * update @neo4j-cypher/react-codemirror to latest (fix line number text height) * Fixed breaking integration tests Co-authored-by: Niels de Jong <[email protected]> * Added step to release pipeline to publish to neo4jlabs/neodash on Docker Hub (#299) * Added new Docker image publish location * Refactoring docs to point to new docker image location * Fixed URL reference for gallery docs * [Feature Request] Refresh button #166 (#277) * [Feature Request] Refresh button #166 * [Feature Request] Refresh button #166 * Added conditional setting of last run timestamp * Added option to turn on/off refreshing/download/fullscreening for each report * enabled refreshing/fullscreening/image download on a per report basis * Moved refresh rate, fullscreening, and screenshots to advanced settings for each report * Disabled database selector for text/markdown reports Co-authored-by: Marius Conjeaud <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * Bump @neo4j-cypher/react-codemirror to pre 18 (#309) * update @neo4j-cypher/react-codemirror for bugfix fixes a bug where syntax highlighting markers weren't being cleared properly * oops use ^ in package version * bump again for pre-release 19 * condensed display for tables #167 (#278) * condensed display for tables #167 * condensed display for tables #167 * #167 Fix half-displayed row in compact table * Fix overflowing row for compact table * Added safe boolean checking for compaction setting Co-authored-by: Marius Conjeaud <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * update editor for minification bugfix (constructor.name) (#311) * Fixed doc page title * Added instructions on deploying a buildt to a webserver * Isoa3, a2 and n3 support (#284) * Isoa3, a2 and n3 support * Changed choropleth polymap source to neodash repository Co-authored-by: Niels de Jong <[email protected]> * Added error boundary for reports (#313) * Added error boundary for reports * Minor correction in README * More small changes to the README * More small changes to the README * Added release notes, bumped version number * Parameter Selector Display option (#274) * Selector display vs value * extra changes . some test changes * Fix typo * FIx on Parameter selec * Minor style fixes --------- Co-authored-by: Niels de Jong <[email protected]> * Feature/style with parameters (#330) * StyleWithParams * Stability fixes for rule-based styling on parameters * Fix for rule-based styling in graph charts --------- Co-authored-by: Niels de Jong <[email protected]> * Feature/rule based styling on top of scheme (#331) * Added utils for chart colors and updated coloring function in PieChart component * on bars * Reuse existing color util instead of new one --------- Co-authored-by: “Bastien <“[email protected]”> Co-authored-by: Niels de Jong <[email protected]> * Refactoring the parameter selector chart and updating MUI component (#301) * Refactoring the parameter selector chart and updating MUI component version * Continued refactoring of parameter selector component * Finished refactoring of parameters. Also fixed the weird bug where values were set incorrectly * updated release notes * Refactoring based on the new parameter display values * Finished refactor and merging of parameter display setting * Updated release notes again * finalized changelog and release notes * Fixed typo in about modal screen * Stacked Bars Colors Fix (#343) * Stacked Bars COlors FIx * Workaround source map warning * No multicolor on singles * fix on long lists * Fixed bug in manual label name specification of param selector (#344) * Passed all dashboard parameters to parameter populating query * Bump http-cache-semantics from 4.1.0 to 4.1.1 (#334) Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](https://github.com/kornelski/http-cache-semantics/commits) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Harold Agudelo <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * Fix for numbers. (#346) * Scatter plot (#341) * Scatter plot Add advanced setting to line charts to turn it into a scatter plot * Scatter plot Add advanced setting to line charts to turn it into a scatter plot * Added docs and refactored settings retrieval --------- Co-authored-by: Harold Agudelo <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * Added release notes for 2.2.3 (#348) * Added release notes for 2.2.3 * Added release notes for 2.2.3 * Added fix for link parsing in documentation portal * Quickfix for auto-resetting param display text when advanced setting is toggled * Updated release notes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Harold Agudelo <[email protected]> Co-authored-by: Marius Conjeaud <[email protected]> Co-authored-by: “Bastien <“[email protected]”> Co-authored-by: Bastien Hubert <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Neil Menezes <[email protected]> Co-authored-by: MariusC <[email protected]> Co-authored-by: alfredorubin96 <[email protected]> Co-authored-by: Alfred Rubin <[email protected]> Co-authored-by: ioilmio <[email protected]> Co-authored-by: Jon Harris <[email protected]> Co-authored-by: Jon Ander Oribe <[email protected]>
1 parent 3923f64 commit 2925561

File tree

17 files changed

+55
-35
lines changed

17 files changed

+55
-35
lines changed

.github/workflows/master-deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
context: .
8080
file: ./Dockerfile
8181
push: true
82-
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.2.2
82+
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.2.3
8383
build-docker-legacy:
8484
needs: build-test
8585
runs-on: ubuntu-latest
@@ -103,7 +103,7 @@ jobs:
103103
context: .
104104
file: ./Dockerfile
105105
push: true
106-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.2.2
106+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.2.3
107107
# build-npm:
108108
# needs: build-test
109109
# runs-on: ubuntu-latest

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ RUN chown -R nginx:nginx /usr/share/nginx/html/
3838
USER nginx
3939
EXPOSE 5005
4040
HEALTHCHECK cmd curl --fail http://localhost:5005 || exit 1
41-
LABEL version="2.2.2"
41+
LABEL version="2.2.3"

changelog.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
## NeoDash 2.2.3
2+
This releases fixes a small set of bugs that slipped through the 2.2.3 release, and adds some minor features:
3+
- Added support for scatter plots by overriding a parameter in the line chart.
4+
- Added the ability to use dashboard parameter as filters in custom parameter selector queries.
5+
- Fixed breaking bug in parameter selector settings causing a white-screen error.
6+
- Fixed auto-coloring of bar charts (resolved back to logic of 2.2.1 and earlier).
7+
- Added a quick fix for automatically resetting the parameter display value when the property display override is toggled.
8+
- Upversioned outdated dashboards and in the NeoDash Gallery.
9+
10+
111
## NeoDash 2.2.2
2-
The NeoDash 2.2.2 release is packed with a bunch of new usuability features:
12+
The NeoDash 2.2.2 release is packed with a bunch of new usability features:
313
- Changed the built-in Cypher editor to a brand-new [CodeMirror Editor](https://github.com/neo4j-contrib/cypher-editor).
414
- Rebuilt the **Parameter Select** component from scratch for improved stability, performance and extendability:
515
- Added an optional setting to the parameter selector to display a different property from the one that is set by the selector.

docs/modules/ROOT/pages/developer-guide/deploy-a-build.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Depending on the webserver type and version, this could be different directory.
3434
As an example - to copy the files to an nginx webserver using `scp`:
3535

3636
```bash
37-
scp neodash-2.2.2 username@host:/usr/share/nginx/html
37+
scp neodash-2.2.3 username@host:/usr/share/nginx/html
3838
```
3939

4040
NeoDash should now be visible by visiting your (sub)domain in the browser.

docs/modules/ROOT/pages/user-guide/reports/line-chart.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ image::line2.png[Multi Line Chart]
4545
[width="100%",cols="13%,2%,6%,79%",options="header",]
4646
|===
4747
|Name |Type |Default Value |Description
48+
|Plot Type |List |line | Whether to use a line plot (with connections) or a scatter plot of disjointed points
49+
4850
|Show Legend |on/off |off |If enabled, shows a legend at the top right
4951
of the visualization.
5052

docs/modules/ROOT/pages/user-guide/reports/map.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ relationship property to map to the arrow width. This lets you define
109109
widths on a relationship-specific level, if you have a property that
110110
directly maps to the width value.
111111

112-
|Map Provider URL|Text|https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png| When specified, overrides Open Street map provider with a custom map tiles provider.
112+
|Map Provider URL|Text|https://\{s}.tile.openstreetmap.org/\{z}/\{x}/\{y}.png| When specified, overrides Open Street map provider with a custom map tiles provider.
113113

114114
|Intensity Property (for heatmap)|Text|intensity|Optionally, and only for heatmaps, the node property to use as the intensity of that point on the heatmap. If left empty, all points will have the same intensity of 1. If one of the nodes in the results doesn't have the specific property, its intensity will be set to 0.
115115

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neodash",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "NeoDash - Neo4j Dashboard Builder",
55
"neo4jDesktop": {
66
"apiVersion": "^1.2.0"

release-notes.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
## NeoDash 2.2.2
2-
The NeoDash 2.2.2 release is packed with a bunch of new usuability features:
3-
- Changed the built-in Cypher editor to a brand-new [CodeMirror Editor](https://github.com/neo4j-contrib/cypher-editor).
4-
- Rebuilt the **Parameter Select** component from scratch for improved stability, performance and extendability:
5-
- Added an optional setting to the parameter selector to display a different property from the one that is set by the selector.
6-
- Use this to - for example - let users choose a name and set an ID for use by other reports.
7-
- Fields no longer reset randomly when parameters are changed.
8-
- Freetext fields are no longer slow - perform as fast as the other selectors.
9-
- Add the option to use rule-based styling based on dashboard parameters.
10-
- Changed rule-based styling on bar and pie charts to override color scheme instead of clear the scheme.
11-
- Extended the [Example Gallery](https://neodash-gallery.graphapp.io/) with several new demos.
12-
- Adding intermediate report error boundaries for improved app stability.
13-
- Changed docker image name to `neo4jlabs/neodash`.
14-
- Improved documementation for developers.
15-
- Fixed inconsistent styling between different pop-up screens, and fixed report title placeholders.
1+
## NeoDash 2.2.3
2+
This releases fixes a small set of bugs that slipped through the 2.2.3 release, and adds some minor features:
3+
- Added support for scatter plots by overriding a parameter in the line chart.
4+
- Added the ability to use dashboard parameter as filters in custom parameter selector queries.
5+
- Fixed breaking bug in parameter selector settings causing a white-screen error.
6+
- Fixed auto-coloring of bar charts (resolved back to logic of 2.2.1 and earlier).
7+
- Added a quick fix for automatically resetting the parameter display value when the property display override is toggled.
8+
- Upversioned outdated dashboards and in the NeoDash Gallery.

src/card/settings/custom/CardSettingsContentPropertySelect.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const NeoCardSettingsContentPropertySelect = ({
5555
if (settings.type == undefined) {
5656
onReportSettingUpdate('type', 'Node Property');
5757
}
58+
5859
if (!parameterName && settings.entityType && settings.propertyType) {
5960
const entityAndPropertyType = `neodash_${settings.entityType}_${settings.propertyType}`;
6061
const formattedParameterId = formatParameterId(settings.id);
@@ -188,6 +189,13 @@ const NeoCardSettingsContentPropertySelect = ({
188189
const overridePropertyDisplayName =
189190
settings.overridePropertyDisplayName !== undefined ? settings.overridePropertyDisplayName : false;
190191

192+
// If the override is off, and the two values differ, set the display value to the original one again.
193+
if (overridePropertyDisplayName == false && propertyInputText !== propertyInputDisplayText) {
194+
onReportSettingUpdate('propertyTypeDisplay', settings.propertyType);
195+
setPropertyInputDisplayText(propertyInputText);
196+
updateReportQuery(settings.entityType, settings.propertyType, settings.propertyType);
197+
}
198+
191199
return (
192200
<div>
193201
<p style={{ color: 'grey', fontSize: 12, paddingLeft: '5px', border: '1px solid lightgrey', marginTop: '0px' }}>
@@ -201,7 +209,6 @@ const NeoCardSettingsContentPropertySelect = ({
201209
onChange={(e) => {
202210
handleParameterTypeUpdate(e.target.value);
203211
}}
204-
style={{ width: '25%' }}
205212
label='Selection Type'
206213
type='text'
207214
style={{ width: 350, marginLeft: '5px', marginTop: '0px' }}
@@ -310,7 +317,7 @@ const NeoCardSettingsContentPropertySelect = ({
310317
id='autocomplete-property-display'
311318
options={
312319
manualPropertyNameSpecification
313-
? [settings.propertyTypeDisplay || settins.propertyType]
320+
? [settings.propertyTypeDisplay || settings.propertyType]
314321
: propertyRecords.map((r) => (r._fields ? r._fields[0] : '(no data)'))
315322
}
316323
getOptionLabel={(option) => (option ? option : '')}

src/chart/bar/BarChart.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ const NeoBarChart = (props: ChartProps) => {
110110

111111
// Compute bar color based on rules - overrides default color scheme completely.
112112
const getBarColor = (bar) => {
113-
let { index } = bar;
114-
let colorIndex = index;
115-
if (index >= chartColorsByScheme.length) {
116-
colorIndex = index % chartColorsByScheme.length;
113+
let { data, id } = bar;
114+
let colorIndex = Object.keys(data).indexOf(id);
115+
if (colorIndex >= chartColorsByScheme.length) {
116+
colorIndex %= chartColorsByScheme.length;
117117
}
118118

119119
const dict = {};

0 commit comments

Comments
 (0)