Skip to content

Commit

Permalink
improve bubble charts
Browse files Browse the repository at this point in the history
  • Loading branch information
HUSSAR-mtrela committed Dec 18, 2024
1 parent 9695044 commit 8932567
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 24 deletions.
11 changes: 6 additions & 5 deletions samples/charts/data-chart/scatter-bubble-chart-fill-scale.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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"]
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
{
"type": "NumericYAxis",
"name": "yAxis",
"title": "Public Debt",
"title": "Public Debt per GDP (%)",
"titleLeftMargin": 5,
"isLogarithmic": false,
"abbreviateLargeNumbers": true,
"maximumValue": 120
}
],
Expand All @@ -37,6 +37,9 @@
"maximumValue": 50
},
"fillMemberPath": "GdpPerPerson",
"xMemberAsLegendLabel": "Population",
"yMemberAsLegendLabel": "Debt",
"radiusMemberAsLegendLabel": "GDP",
"xAxisRef": "xAxis",
"yAxisRef": "yAxis",
"dataSourceRef": "WorldStats",
Expand Down
38 changes: 29 additions & 9 deletions samples/charts/data-chart/scatter-bubble-chart-styling.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"type": "NumericYAxis",
"name": "yAxis",
"title": "GDP per Capita",
"titleLeftMargin": 5,
"isLogarithmic": true,
"abbreviateLargeNumbers": true
}
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"name": "yAxis",
"isLogarithmic": true,
"logarithmBase": 10,
"title": "Country Debt per GDP"
"title": "Country Debt per GDP (%)"
}
],
"series": [
Expand Down

0 comments on commit 8932567

Please sign in to comment.