fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

Migrate to 0.70.x

Open biodegradable000 opened this issue 11 months ago • 3 comments

I am struggling to migrate from 0.69 to 0.70.x because I cannot find any documentation on it.

My problem is that in the SideTitleWidget the axisside property has disappeared. Instead, I need to add a "meta" property but I have no clue how to use it. I'm sorry if this is obvious, but I have searched everywhere I can think of. I don't find any example showing how to use it, I can't find any documentation where the property is mentioned and I also cannot find any migration guide here

What am I missing? Thanks a lot for pointing me to the right direction!

biodegradable000 avatar Feb 13 '25 09:02 biodegradable000

If you're using the SideTitleWidget as part of the SideTitles data, the getTitlesWidget builder gives you a TitleMeta object.

      AxisTitles(
        sideTitles: SideTitles(
          getTitlesWidget: (double value, TitleMeta meta) {
            return SideTitleWidget(
              meta: meta,
              child: MyTitleWidget(value),
            );
          },
        ),
      )

Otherwise, you'll have to construct your own TitleMeta. Snooping through the code, you'll only need to worry about the sideTitles and rotationQuarterTurns parameters, everything else is ignored (for now).

I agree that it's poorly documented; the SideTitleWidget doc comment still refers to the old axisSide parameter.

PvtPuddles avatar Feb 14 '25 13:02 PvtPuddles

It's also not in the changelog...

julia-orthopy avatar Apr 24 '25 11:04 julia-orthopy

is it so hard documenting a change?

milindgoel15 avatar May 26 '25 10:05 milindgoel15