bar chart chnages
This commit is contained in:
parent
ff79f88853
commit
02059e94fd
@ -20,12 +20,12 @@ if (project.hasProperty('google-services.json')) {
|
|||||||
|
|
||||||
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
||||||
if (flutterVersionCode == null) {
|
if (flutterVersionCode == null) {
|
||||||
flutterVersionCode = "48"
|
flutterVersionCode = "49"
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
||||||
if (flutterVersionName == null) {
|
if (flutterVersionName == null) {
|
||||||
flutterVersionName = "1.0.47"
|
flutterVersionName = "1.0.48"
|
||||||
}
|
}
|
||||||
|
|
||||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||||
|
|||||||
@ -1616,7 +1616,7 @@ class ChartWidget extends StatelessWidget {
|
|||||||
|
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
physics: xAxisData.length < 7
|
physics: xAxisData.length > 4
|
||||||
? const NeverScrollableScrollPhysics() // Disable scrolling
|
? const NeverScrollableScrollPhysics() // Disable scrolling
|
||||||
: const AlwaysScrollableScrollPhysics(), // Enable scrolling
|
: const AlwaysScrollableScrollPhysics(), // Enable scrolling
|
||||||
padding: const EdgeInsets.only(top: 10, left: 5),
|
padding: const EdgeInsets.only(top: 10, left: 5),
|
||||||
@ -1680,7 +1680,19 @@ class ChartWidget extends StatelessWidget {
|
|||||||
// String unitMsrLabel = yAxisLabels.isNotEmpty && groupIndex < yAxisLabels.length
|
// String unitMsrLabel = yAxisLabels.isNotEmpty && groupIndex < yAxisLabels.length
|
||||||
// ? yAxisLabels[groupIndex]
|
// ? yAxisLabels[groupIndex]
|
||||||
// : '';
|
// : '';
|
||||||
if (rod.toY == 0) return null;
|
// if (rod.toY == 0) return null;
|
||||||
|
|
||||||
|
if (rod.toY == 0) {
|
||||||
|
return BarTooltipItem(
|
||||||
|
'0', // Display "0" instead of hiding
|
||||||
|
|
||||||
|
const TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return BarTooltipItem(
|
return BarTooltipItem(
|
||||||
(chartConversion != null &&
|
(chartConversion != null &&
|
||||||
@ -1830,7 +1842,18 @@ class ChartWidget extends StatelessWidget {
|
|||||||
barsSpace: 10,
|
barsSpace: 10,
|
||||||
barRods: [
|
barRods: [
|
||||||
BarChartRodData(
|
BarChartRodData(
|
||||||
toY: yAxisData[index],
|
// toY: yAxisData[index],
|
||||||
|
toY: yAxisData[index] == 0
|
||||||
|
? 0.1
|
||||||
|
: yAxisData[index],
|
||||||
|
// toY: yAxisData[index] == 0
|
||||||
|
// ? 0.001
|
||||||
|
// : yAxisData[
|
||||||
|
// index], // gives a slight visible bar
|
||||||
|
|
||||||
|
// color: yAxisData[index] == 0
|
||||||
|
// ? Colors.grey
|
||||||
|
// : bodyColor,
|
||||||
color: bodyColor,
|
color: bodyColor,
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
width: 20,
|
width: 20,
|
||||||
@ -1938,7 +1961,7 @@ class ChartWidget extends StatelessWidget {
|
|||||||
tooltipMargin: 12,
|
tooltipMargin: 12,
|
||||||
getTooltipColor: (group) => Colors.transparent,
|
getTooltipColor: (group) => Colors.transparent,
|
||||||
getTooltipItem: (group, groupIndex, rod, rodIndex) {
|
getTooltipItem: (group, groupIndex, rod, rodIndex) {
|
||||||
if (rod.toY == 0) return null;
|
// if (rod.toY == 0) return null;
|
||||||
|
|
||||||
return BarTooltipItem(
|
return BarTooltipItem(
|
||||||
// formatNumber(rod.toY),
|
// formatNumber(rod.toY),
|
||||||
@ -3705,6 +3728,7 @@ class ChartWidget extends StatelessWidget {
|
|||||||
|
|
||||||
return BarChartRodData(
|
return BarChartRodData(
|
||||||
// toY: value,
|
// toY: value,
|
||||||
|
|
||||||
toY: value == 0 ? minBarHeight : value, // Use the parsed value
|
toY: value == 0 ? minBarHeight : value, // Use the parsed value
|
||||||
color: barColor, // Dynamic color
|
color: barColor, // Dynamic color
|
||||||
width: 20,
|
width: 20,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
name: uae_stat
|
name: uae_stat
|
||||||
description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness."
|
description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness."
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
version: 1.0.47+48
|
version: 1.0.48+49
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.2.3 <4.0.0"
|
sdk: ">=3.2.3 <4.0.0"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user