Closed kindkmj closed 5 months ago
List<FlSpot> freList = [];
List<FlSpot> reFreList = [];
@override
void initState() {
freList = List.generate(100,
(index) => FlSpot(index.toDouble(), generateRandomPositiveNumber()));
reFreList = List.generate(100,
(index) => FlSpot(index.toDouble(), generateRandomNegativeNumber()));
super.initState();
}
double generateRandomPositiveNumber() {
Random random = Random();
return (random.nextInt(10) + 1).toDouble();
}
double generateRandomNegativeNumber() {
Random random = Random();
return (-(random.nextInt(10) + 1)).toDouble();
}
SizedBox(
width: 320.w,
height: 242.h,
child: LineChart(
LineChartData(
clipData: FlClipData.all(),
titlesData: FlTitlesData(
rightTitles: AxisTitles(
sideTitles: SideTitles(showTitles: false),
),
topTitles: AxisTitles(
sideTitles: SideTitles(showTitles: false),
),
),
lineBarsData: [
LineChartBarData(
color: black80,
spots: freList,
isStrokeJoinRound: true,
dotData: const FlDotData(
show: false,
),
),
LineChartBarData(
color: blue100,
spots: reFreList,
isStrokeJoinRound: true,
dotData: const FlDotData(
show: false,
),
),
]),
),
)
it is mycode can i scroll LineChart?
i found #71
** Don't make a duplicate issue. You can search in issues to make sure there isn't any already opened issue with your concern.
Is your feature request relasted to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
I'd like to show more data at wide intervals by scrolling left and right. Is it possible??