Skip to content

Commit 0f4b2fa

Browse files
committed
improve bubble samples
1 parent 8932567 commit 0f4b2fa

File tree

4 files changed

+119
-79
lines changed

4 files changed

+119
-79
lines changed

samples/charts/data-chart/scatter-bubble-chart-fill-scale.json

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,27 @@
55
"name": "chart",
66
"isHorizontalZoomEnabled": true,
77
"isVerticalZoomEnabled": true,
8-
"chartTitle": "Public Debt vs. Population",
9-
"subtitle": "GDP per Capita",
8+
"chartTitle": "Population vs. Public Debt vs. GDP",
9+
"titleTopMargin": 10,
10+
"titleBottomMargin": 0,
1011
"axes": [
1112
{
1213
"type": "NumericXAxis",
1314
"name": "xAxis",
14-
"minimumValue": 10000,
15+
"title": "Population",
16+
"minimumValue": 100,
1517
"maximumValue": 10000000000,
1618
"isLogarithmic": true,
17-
"abbreviateLargeNumbers": true,
18-
"title": "Population"
19+
"abbreviateLargeNumbers": true
1920
},
2021
{
2122
"type": "NumericYAxis",
2223
"name": "yAxis",
2324
"title": "Public Debt per GDP (%)",
24-
"titleLeftMargin": 5,
25-
"isLogarithmic": false,
26-
"maximumValue": 120
25+
"titleLeftMargin": 10,
26+
"isLogarithmic": true,
27+
"abbreviateLargeNumbers": true,
28+
"maximumValue": 1000
2729
}
2830
],
2931
"series": [
@@ -40,11 +42,17 @@
4042
"maximumValue": 120
4143
},
4244
"fillMemberPath": "GdpPerPerson",
45+
"yMemberAsLegendUnit": "%",
46+
"yMemberAsLegendLabel": "Debt",
47+
"xMemberAsLegendLabel": "Population",
48+
"radiusMemberAsLegendLabel": "GDP",
49+
"title": "Country",
4350
"xAxisRef": "xAxis",
4451
"yAxisRef": "yAxis",
4552
"dataSourceRef": "WorldStats",
4653
"markerType": "Circle",
4754
"markerOutline": "black",
55+
"markerThickness": 1,
4856
"showDefaultTooltip": true,
4957
"fillScale": {
5058
"type": "ValueBrushScale",
@@ -53,6 +61,26 @@
5361
"maximumValue": 260000,
5462
"brushes": ["#89b5fa", "#146cf7", "#5290f2"]
5563
}
64+
},
65+
{
66+
"type": "DataToolTipLayer",
67+
"name": "dataToolTipLayer",
68+
"valueRowMarginTop": 1,
69+
"labelTextMarginTop": 1,
70+
"titleTextMarginTop": 1,
71+
"unitsTextMarginTop": 1,
72+
"valueRowMarginBottom": 1,
73+
"labelTextMarginBottom": 1,
74+
"titleTextMarginBottom": 1,
75+
"unitsTextMarginBottom": 1,
76+
"unitsTextMarginRight": 5,
77+
"valueTextMarginLeft": 10,
78+
"labelTextMarginLeft": 1,
79+
"groupingMode": "Grouped",
80+
"layoutMode": "Vertical",
81+
"badgeShape": "Hidden",
82+
"includedColumns": ["X", "Y", "Radius"],
83+
"headerRowVisible": false
5684
}
5785
]
5886
}

samples/charts/data-chart/scatter-bubble-chart-multiple-sources.json

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
{
2424
"type": "NumericYAxis",
2525
"name": "yAxis",
26-
"title": "Public Debt per GDP (%)",
27-
"titleLeftMargin": 5,
28-
"isLogarithmic": false,
29-
"maximumValue": 120
26+
"title": "GDP per Capita",
27+
"maximumValue": 1000000,
28+
"titleLeftMargin": 10,
29+
"isLogarithmic": true,
30+
"abbreviateLargeNumbers": true
3031
}
3132
],
3233
"series": [
@@ -37,11 +38,11 @@
3738
"xAxisRef": "xAxis",
3839
"yAxisRef": "yAxis",
3940
"xMemberPath": "Population",
40-
"yMemberPath": "PublicDebt",
41-
"radiusMemberPath": "GdpPerPerson",
41+
"yMemberPath": "GDP",
42+
"radiusMemberPath": "WorkedHours",
4243
"xMemberAsLegendLabel": "Population",
43-
"yMemberAsLegendLabel": "Debt",
44-
"radiusMemberAsLegendLabel": "GDP",
44+
"yMemberAsLegendLabel": "GDP",
45+
"radiusMemberAsLegendLabel": "Work Hours",
4546
"dataSourceRef": "CountryStatsAfrica",
4647
"markerType": "Circle",
4748
"showDefaultTooltip": true,
@@ -59,11 +60,11 @@
5960
"xAxisRef": "xAxis",
6061
"yAxisRef": "yAxis",
6162
"xMemberPath": "Population",
62-
"yMemberPath": "PublicDebt",
63-
"radiusMemberPath": "GdpPerPerson",
63+
"yMemberPath": "GDP",
64+
"radiusMemberPath": "WorkedHours",
6465
"xMemberAsLegendLabel": "Population",
65-
"yMemberAsLegendLabel": "Debt",
66-
"radiusMemberAsLegendLabel": "GDP",
66+
"yMemberAsLegendLabel": "GDP",
67+
"radiusMemberAsLegendLabel": "Work Hours",
6768
"dataSourceRef": "CountryStatsEurope",
6869
"markerType": "Circle",
6970
"showDefaultTooltip": true,
@@ -73,6 +74,23 @@
7374
"minimumValue": 10,
7475
"maximumValue": 50
7576
}
77+
},
78+
{
79+
"type": "DataToolTipLayer",
80+
"name": "dataToolTipLayer",
81+
"valueRowMarginTop": 1,
82+
"labelTextMarginTop": 1,
83+
"titleTextMarginTop": 1,
84+
"unitsTextMarginTop": 1,
85+
"valueRowMarginBottom": 1,
86+
"labelTextMarginBottom": 1,
87+
"titleTextMarginBottom": 1,
88+
"unitsTextMarginBottom": 1,
89+
"unitsTextMarginRight": 5,
90+
"valueTextMarginLeft": 10,
91+
"labelTextMarginLeft": 1,
92+
"groupingMode": "Grouped",
93+
"layoutMode": "Vertical"
7694
}
7795
]
7896
}

samples/charts/data-chart/scatter-bubble-chart-single-source.json

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
{
2-
"strings": {
3-
"legendTitle": "Total Population of Selected Countries"
4-
},
1+
{
52
"descriptions": {
63
"content": {
74
"type": "DataChart",
85
"name": "chart",
6+
"chartTitle": "Population vs. Public Debt vs. GDP",
7+
"titleTopMargin": 10,
8+
"titleBottomMargin": 0,
99
"axes": [
1010
{
1111
"type": "NumericXAxis",
1212
"name": "xAxis",
1313
"title": "Population",
14+
"minimumValue": 100,
15+
"maximumValue": 10000000000,
1416
"isLogarithmic": true,
1517
"abbreviateLargeNumbers": true
1618
},
1719
{
1820
"type": "NumericYAxis",
1921
"name": "yAxis",
2022
"title": "Public Debt per GDP (%)",
21-
"titleLeftMargin": 5,
22-
"isLogarithmic": false,
23-
"maximumValue": 120
23+
"titleLeftMargin": 10,
24+
"isLogarithmic": true,
25+
"abbreviateLargeNumbers": true,
26+
"maximumValue": 1000
2427
}
2528
],
2629
"series": [
@@ -36,9 +39,10 @@
3639
"minimumValue": 10,
3740
"maximumValue": 50
3841
},
39-
"fillMemberPath": "GdpPerPerson",
40-
"xMemberAsLegendLabel": "Population",
42+
"title": "Country",
43+
"yMemberAsLegendUnit": "%",
4144
"yMemberAsLegendLabel": "Debt",
45+
"xMemberAsLegendLabel": "Population",
4246
"radiusMemberAsLegendLabel": "GDP",
4347
"xAxisRef": "xAxis",
4448
"yAxisRef": "yAxis",
@@ -48,7 +52,22 @@
4852
},
4953
{
5054
"type": "DataToolTipLayer",
51-
"name": "dataToolTipLayer"
55+
"name": "dataToolTipLayer",
56+
"valueRowMarginTop": 1,
57+
"labelTextMarginTop": 1,
58+
"titleTextMarginTop": 1,
59+
"unitsTextMarginTop": 1,
60+
"valueRowMarginBottom": 1,
61+
"labelTextMarginBottom": 1,
62+
"titleTextMarginBottom": 1,
63+
"unitsTextMarginBottom": 1,
64+
"unitsTextMarginRight": 5,
65+
"valueTextMarginLeft": 10,
66+
"labelTextMarginLeft": 1,
67+
"groupingMode": "Grouped",
68+
"layoutMode": "Vertical",
69+
"badgeShape": "Hidden",
70+
"headerRowVisible": false
5271
}
5372
]
5473
}

samples/charts/data-chart/scatter-bubble-chart-styling.json

Lines changed: 24 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,57 @@
11
{
2-
"strings": {
3-
"legendTitle": "Total Population of Selected Countries"
4-
},
52
"descriptions": {
6-
"legend": {
7-
"type": "Legend",
8-
"name": "legend",
9-
"orientation": "Horizontal"
10-
},
113
"content": {
124
"type": "DataChart",
135
"name": "chart",
14-
"legendRef": "legend",
6+
"chartTitle": "Population vs. Public Debt vs. GDP",
7+
"titleTopMargin": 10,
8+
"titleBottomMargin": 0,
159
"axes": [
1610
{
1711
"type": "NumericXAxis",
1812
"name": "xAxis",
1913
"title": "Population",
14+
"minimumValue": 100,
15+
"maximumValue": 10000000000,
2016
"isLogarithmic": true,
2117
"abbreviateLargeNumbers": true
2218
},
2319
{
2420
"type": "NumericYAxis",
2521
"name": "yAxis",
26-
"title": "GDP per Capita",
27-
"titleLeftMargin": 5,
22+
"title": "Public Debt per GDP (%)",
23+
"titleLeftMargin": 10,
2824
"isLogarithmic": true,
29-
"abbreviateLargeNumbers": true
25+
"abbreviateLargeNumbers": true,
26+
"maximumValue": 1000
3027
}
3128
],
3229
"series": [
3330
{
3431
"type": "BubbleSeries",
3532
"name": "bubbleSeries1",
36-
"title": "African Countries",
37-
"xAxisRef": "xAxis",
38-
"yAxisRef": "yAxis",
39-
"xMemberPath": "Population",
40-
"yMemberPath": "GDP",
41-
"radiusMemberPath": "WorkedHours",
42-
"xMemberAsLegendLabel": "Population",
43-
"yMemberAsLegendLabel": "GDP",
44-
"radiusMemberAsLegendLabel": "Worked Hours",
45-
"dataSourceRef": "CountryStatsAfrica",
46-
"markerType": "Circle",
47-
"markerOutline": "rgb(2, 158, 30)",
48-
"markerBrush": "rgb(2, 158, 30)",
49-
"markerFillOpacity": 0.5,
50-
"markerThickness": 1,
51-
"showDefaultTooltip": true,
52-
"radiusScale": {
53-
"type": "SizeScale",
54-
"isLogarithmic": false,
55-
"minimumValue": 10,
56-
"maximumValue": 50
57-
}
58-
},
59-
{
60-
"type": "BubbleSeries",
61-
"name": "bubbleSeries2",
62-
"title": "European Countries",
33+
"title": "Country",
6334
"xAxisRef": "xAxis",
6435
"yAxisRef": "yAxis",
6536
"xMemberPath": "Population",
66-
"yMemberPath": "GDP",
67-
"radiusMemberPath": "WorkedHours",
37+
"yMemberPath": "PublicDebt",
38+
"radiusMemberPath": "GdpPerPerson",
39+
"yMemberAsLegendUnit": "%",
40+
"yMemberAsLegendLabel": "Debt",
6841
"xMemberAsLegendLabel": "Population",
69-
"yMemberAsLegendLabel": "GDP",
70-
"radiusMemberAsLegendLabel": "Worked Hours",
71-
"dataSourceRef": "CountryStatsEurope",
42+
"radiusMemberAsLegendLabel": "GDP",
43+
"dataSourceRef": "WorldStats",
7244
"markerType": "Circle",
73-
"markerOutline": "rgb(95, 2, 171)",
74-
"markerBrush": "rgb(95, 2, 171)",
45+
"markerOutline": "rgb(0, 0, 0)",
46+
"markerBrush": "rgb(67, 162, 250)",
7547
"markerFillOpacity": 0.5,
7648
"markerThickness": 1,
7749
"showDefaultTooltip": true,
7850
"radiusScale": {
7951
"type": "SizeScale",
8052
"isLogarithmic": false,
8153
"minimumValue": 10,
82-
"maximumValue": 50
54+
"maximumValue": 80
8355
}
8456
},
8557
{
@@ -95,9 +67,12 @@
9567
"unitsTextMarginBottom": 1,
9668
"unitsTextMarginRight": 5,
9769
"valueTextMarginLeft": 10,
98-
"labelTextMarginLeft": 5,
70+
"labelTextMarginLeft": 1,
9971
"groupingMode": "Grouped",
100-
"LayoutMode": "Vertical"
72+
"layoutMode": "Vertical",
73+
"badgeShape": "Hidden",
74+
"includedColumns": ["X", "Y", "Radius"],
75+
"headerRowVisible": false
10176
}
10277
]
10378
}

0 commit comments

Comments
 (0)