Skip to content
Snippets Groups Projects
Commit 80c9217c authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '28-remove-tooltips-on-charts' into 'master'

Resolve "Remove tooltips on charts"

Closes #28

See merge request !20
parents a03e837f 8b7054c7
No related branches found
No related tags found
1 merge request!20Resolve "Remove tooltips on charts"
Pipeline #4525 passed
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=0.0.18
app.versionCode=18
app.versionName=0.0.19
app.versionCode=19
Remove tooltips on charts.
Suppression des infobulles sur les graphiques.
......@@ -30,7 +30,7 @@ class CustomBarChart extends StatelessWidget {
borderData: getBorderData(),
gridData: getGridData(),
titlesData: getTitlesData(),
barTouchData: getBarTouchData(),
barTouchData: BarTouchData(enabled: false),
maxY: getNextRoundNumber(getMaxCountsValue(), this.verticalTicksInterval),
),
);
......@@ -199,30 +199,4 @@ class CustomBarChart extends StatelessWidget {
),
);
}
BarTouchData getBarTouchData() {
return BarTouchData(
enabled: true,
touchTooltipData: BarTouchTooltipData(
tooltipBgColor: Colors.transparent,
tooltipPadding: EdgeInsets.zero,
tooltipMargin: 2,
getTooltipItem: (
BarChartGroupData group,
int groupIndex,
BarChartRodData rod,
int rodIndex,
) {
return BarTooltipItem(
rod.toY.round().toString(),
const TextStyle(
color: AppColors.mainTextColor2,
fontWeight: FontWeight.bold,
fontSize: 10,
),
);
},
),
);
}
}
......@@ -94,28 +94,4 @@ class CustomLineChart extends StatelessWidget {
Widget getHorizontalTitlesWidget(double value, TitleMeta meta) {
return Text('');
}
LineTouchData getLineTouchDataEclecticism() {
return LineTouchData(
handleBuiltInTouches: true,
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.transparent,
tooltipPadding: EdgeInsets.all(8),
tooltipMargin: 2,
getTooltipItems: (List<LineBarSpot> touchedSpots) {
return touchedSpots.map((LineBarSpot touchedSpot) {
final textStyle = TextStyle(
color: AppColors.mainTextColor2,
fontWeight: FontWeight.bold,
fontSize: 10,
);
return LineTooltipItem(
touchedSpot.y.toString(),
textStyle,
);
}).toList();
},
),
);
}
}
......@@ -23,7 +23,7 @@ class ChartTimelineEclecticism extends CustomLineChart {
borderData: getBorderData(),
gridData: getGridData(),
titlesData: getTitlesData(),
lineTouchData: getLineTouchDataEclecticism(),
lineTouchData: const LineTouchData(enabled: false),
minX: horizontalScale['min'],
maxX: horizontalScale['max'],
maxY: 100,
......
......@@ -3,7 +3,7 @@ description: Display scrobbles data and charts
publish_to: 'none'
version: 0.0.18+18
version: 0.0.19+19
environment:
sdk: '^3.0.0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment