From 8932567b067f8377b1cbde229ba3664d9f46c450 Mon Sep 17 00:00:00 2001 From: mtrela Date: Wed, 18 Dec 2024 04:21:56 -0500 Subject: [PATCH] improve bubble charts --- .../scatter-bubble-chart-fill-scale.json | 11 +++--- ...scatter-bubble-chart-multiple-sources.json | 21 ++++++---- .../scatter-bubble-chart-single-source.json | 7 +++- .../scatter-bubble-chart-styling.json | 38 ++++++++++++++----- .../scatter-bubble-chart-tooltip.json | 2 +- 5 files changed, 55 insertions(+), 24 deletions(-) diff --git a/samples/charts/data-chart/scatter-bubble-chart-fill-scale.json b/samples/charts/data-chart/scatter-bubble-chart-fill-scale.json index a001362b..d3ab45f1 100644 --- a/samples/charts/data-chart/scatter-bubble-chart-fill-scale.json +++ b/samples/charts/data-chart/scatter-bubble-chart-fill-scale.json @@ -20,9 +20,10 @@ { "type": "NumericYAxis", "name": "yAxis", - "isLogarithmic": true, - "logarithmBase": 10, - "title": "Public Debt per GDP" + "title": "Public Debt per GDP (%)", + "titleLeftMargin": 5, + "isLogarithmic": false, + "maximumValue": 120 } ], "series": [ @@ -49,8 +50,8 @@ "type": "ValueBrushScale", "isLogarithmic": false, "minimumValue": 0, - "maximumValue": 100000, - "brushes": ["#1AA1E2", "#189AD9", "#1692CE", "#1385BC", "#0F79AB", "#0C6B99", "#095E88", "#055277", "#024669", "#003F5E"] + "maximumValue": 260000, + "brushes": ["#89b5fa", "#146cf7", "#5290f2"] } } ] diff --git a/samples/charts/data-chart/scatter-bubble-chart-multiple-sources.json b/samples/charts/data-chart/scatter-bubble-chart-multiple-sources.json index bbe3102e..6cccce15 100644 --- a/samples/charts/data-chart/scatter-bubble-chart-multiple-sources.json +++ b/samples/charts/data-chart/scatter-bubble-chart-multiple-sources.json @@ -23,9 +23,10 @@ { "type": "NumericYAxis", "name": "yAxis", - "title": "GDP per Capita", - "isLogarithmic": true, - "abbreviateLargeNumbers": true + "title": "Public Debt per GDP (%)", + "titleLeftMargin": 5, + "isLogarithmic": false, + "maximumValue": 120 } ], "series": [ @@ -36,8 +37,11 @@ "xAxisRef": "xAxis", "yAxisRef": "yAxis", "xMemberPath": "Population", - "yMemberPath": "GDP", - "radiusMemberPath": "Population", + "yMemberPath": "PublicDebt", + "radiusMemberPath": "GdpPerPerson", + "xMemberAsLegendLabel": "Population", + "yMemberAsLegendLabel": "Debt", + "radiusMemberAsLegendLabel": "GDP", "dataSourceRef": "CountryStatsAfrica", "markerType": "Circle", "showDefaultTooltip": true, @@ -55,8 +59,11 @@ "xAxisRef": "xAxis", "yAxisRef": "yAxis", "xMemberPath": "Population", - "yMemberPath": "GDP", - "radiusMemberPath": "Population", + "yMemberPath": "PublicDebt", + "radiusMemberPath": "GdpPerPerson", + "xMemberAsLegendLabel": "Population", + "yMemberAsLegendLabel": "Debt", + "radiusMemberAsLegendLabel": "GDP", "dataSourceRef": "CountryStatsEurope", "markerType": "Circle", "showDefaultTooltip": true, diff --git a/samples/charts/data-chart/scatter-bubble-chart-single-source.json b/samples/charts/data-chart/scatter-bubble-chart-single-source.json index 57fcaa70..0a7f3ad5 100644 --- a/samples/charts/data-chart/scatter-bubble-chart-single-source.json +++ b/samples/charts/data-chart/scatter-bubble-chart-single-source.json @@ -17,9 +17,9 @@ { "type": "NumericYAxis", "name": "yAxis", - "title": "Public Debt", + "title": "Public Debt per GDP (%)", + "titleLeftMargin": 5, "isLogarithmic": false, - "abbreviateLargeNumbers": true, "maximumValue": 120 } ], @@ -37,6 +37,9 @@ "maximumValue": 50 }, "fillMemberPath": "GdpPerPerson", + "xMemberAsLegendLabel": "Population", + "yMemberAsLegendLabel": "Debt", + "radiusMemberAsLegendLabel": "GDP", "xAxisRef": "xAxis", "yAxisRef": "yAxis", "dataSourceRef": "WorldStats", diff --git a/samples/charts/data-chart/scatter-bubble-chart-styling.json b/samples/charts/data-chart/scatter-bubble-chart-styling.json index 9865e38f..d46c3b65 100644 --- a/samples/charts/data-chart/scatter-bubble-chart-styling.json +++ b/samples/charts/data-chart/scatter-bubble-chart-styling.json @@ -24,6 +24,7 @@ "type": "NumericYAxis", "name": "yAxis", "title": "GDP per Capita", + "titleLeftMargin": 5, "isLogarithmic": true, "abbreviateLargeNumbers": true } @@ -37,13 +38,16 @@ "yAxisRef": "yAxis", "xMemberPath": "Population", "yMemberPath": "GDP", - "radiusMemberPath": "Population", + "radiusMemberPath": "WorkedHours", + "xMemberAsLegendLabel": "Population", + "yMemberAsLegendLabel": "GDP", + "radiusMemberAsLegendLabel": "Worked Hours", "dataSourceRef": "CountryStatsAfrica", "markerType": "Circle", - "markerOutline": "rgb(62, 202, 62)", - "markerBrush": "rgb(69, 179, 224)", + "markerOutline": "rgb(2, 158, 30)", + "markerBrush": "rgb(2, 158, 30)", "markerFillOpacity": 0.5, - "markerThickness": 2, + "markerThickness": 1, "showDefaultTooltip": true, "radiusScale": { "type": "SizeScale", @@ -60,13 +64,16 @@ "yAxisRef": "yAxis", "xMemberPath": "Population", "yMemberPath": "GDP", - "radiusMemberPath": "Population", + "radiusMemberPath": "WorkedHours", + "xMemberAsLegendLabel": "Population", + "yMemberAsLegendLabel": "GDP", + "radiusMemberAsLegendLabel": "Worked Hours", "dataSourceRef": "CountryStatsEurope", "markerType": "Circle", - "markerOutline": "rgb(171, 6, 221)", - "markerBrush": "rgb(135, 156, 235)", + "markerOutline": "rgb(95, 2, 171)", + "markerBrush": "rgb(95, 2, 171)", "markerFillOpacity": 0.5, - "markerThickness": 2, + "markerThickness": 1, "showDefaultTooltip": true, "radiusScale": { "type": "SizeScale", @@ -77,7 +84,20 @@ }, { "type": "DataToolTipLayer", - "name": "dataToolTipLayer" + "name": "dataToolTipLayer", + "valueRowMarginTop": 1, + "labelTextMarginTop": 1, + "titleTextMarginTop": 1, + "unitsTextMarginTop": 1, + "valueRowMarginBottom": 1, + "labelTextMarginBottom": 1, + "titleTextMarginBottom": 1, + "unitsTextMarginBottom": 1, + "unitsTextMarginRight": 5, + "valueTextMarginLeft": 10, + "labelTextMarginLeft": 5, + "groupingMode": "Grouped", + "LayoutMode": "Vertical" } ] } diff --git a/samples/charts/data-chart/scatter-bubble-chart-tooltip.json b/samples/charts/data-chart/scatter-bubble-chart-tooltip.json index 9c833a80..d9763c58 100644 --- a/samples/charts/data-chart/scatter-bubble-chart-tooltip.json +++ b/samples/charts/data-chart/scatter-bubble-chart-tooltip.json @@ -25,7 +25,7 @@ "name": "yAxis", "isLogarithmic": true, "logarithmBase": 10, - "title": "Country Debt per GDP" + "title": "Country Debt per GDP (%)" } ], "series": [