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")
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = "48"
|
||||
flutterVersionCode = "49"
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = "1.0.47"
|
||||
flutterVersionName = "1.0.48"
|
||||
}
|
||||
|
||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||
|
||||
@ -1616,7 +1616,7 @@ class ChartWidget extends StatelessWidget {
|
||||
|
||||
return SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: xAxisData.length < 7
|
||||
physics: xAxisData.length > 4
|
||||
? const NeverScrollableScrollPhysics() // Disable scrolling
|
||||
: const AlwaysScrollableScrollPhysics(), // Enable scrolling
|
||||
padding: const EdgeInsets.only(top: 10, left: 5),
|
||||
@ -1680,7 +1680,19 @@ class ChartWidget extends StatelessWidget {
|
||||
// String unitMsrLabel = yAxisLabels.isNotEmpty && groupIndex < yAxisLabels.length
|
||||
// ? 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(
|
||||
(chartConversion != null &&
|
||||
@ -1830,7 +1842,18 @@ class ChartWidget extends StatelessWidget {
|
||||
barsSpace: 10,
|
||||
barRods: [
|
||||
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,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
width: 20,
|
||||
@ -1938,7 +1961,7 @@ class ChartWidget extends StatelessWidget {
|
||||
tooltipMargin: 12,
|
||||
getTooltipColor: (group) => Colors.transparent,
|
||||
getTooltipItem: (group, groupIndex, rod, rodIndex) {
|
||||
if (rod.toY == 0) return null;
|
||||
// if (rod.toY == 0) return null;
|
||||
|
||||
return BarTooltipItem(
|
||||
// formatNumber(rod.toY),
|
||||
@ -3705,6 +3728,7 @@ class ChartWidget extends StatelessWidget {
|
||||
|
||||
return BarChartRodData(
|
||||
// toY: value,
|
||||
|
||||
toY: value == 0 ? minBarHeight : value, // Use the parsed value
|
||||
color: barColor, // Dynamic color
|
||||
width: 20,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
name: uae_stat
|
||||
description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness."
|
||||
publish_to: "none"
|
||||
version: 1.0.47+48
|
||||
version: 1.0.48+49
|
||||
|
||||
environment:
|
||||
sdk: ">=3.2.3 <4.0.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user