Cycle trends graph

A Cycle Trends Graph is a valuable tool for visualizing overall menstrual cycle patterns over time. It helps users track and understand changes or irregularities in your cycles by comparing various cycle parameters across multiple months. This graph is useful for identifying your cycle trends such as changes in cycle regularity.

import 'package:menstrual_cycle_widget/menstrual_cycle_widget.dart';

class MenstrualCycleGraphExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Cycle trends graph'),
      ),
      body: MenstrualCycleTrendsGraph(
        isShowMoreOptions: true,
        onPdfDownloadCallback: (pdfPath) async {
          // This function will be called when the user downloads an pdf
          // pdfPath contains the path to the downloaded pdf
        },
        onImageDownloadCallback: (imagePath) async {
          // This function will be called when the user downloads an image
          // imagePath contains the path to the downloaded image
        },
      ),
    );
  }
}

Parameter

Parameters
Datatype
Description
Default Value

loadingText

String

Specify the loading text while fetch data from databse.

Loading...

isShowMoreOptions

bool

Specify as true to show download image and pdf options into right-top of graph.

false

onImageDownloadCallback

Function

Callback this function if user download image. It's return a path of the image.

-

onPdfDownloadCallback

Function

Callback this function if user download pdf. It's return a path of the image.

-

xAxisTitle

String

Specify the title of xAxis

Cycle start date

xAxisTitleTextStyle

TextStyle

Specify the text style of xAxis

TextStyle(color: Colors.black, fontSize: 10)

isShowXAxisTitle

bool

Speficy false if want to hide xAxis title

true

yAxisTitle

String

Specify the title of yAxis

Cycle length (in days)

yAxisTitleTextStyle

TextStyle

Specify the text style of yAxis

TextStyle(color: Colors.black, fontSize: 10)

isShowYAxisTitle

bool

Speficy false if want to hide yAxis title

true

isShowSeriesColor

bool

Speficy false if want to hide series color

true

isShowHeader

bool

Speficy false if want to hide header of graph

true

isShowNormalRangeHint

bool

Speficy false if want to hide normal range hint from graph

true

normalRangeHintTitle

String

Specify the title of normal range hint text

Normal days

normalRangeHintTextStyle

TextStyle

Specify the text style of normal range hint text

TextStyle(color: Colors.black, fontSize: 10)

headerTitle

String

Specify the title of header text

Cycle trends

headerTitleTextStyle

TextStyle

Specify the text style of header title text

TextStyle(color: Colors.black, fontSize: 10)

themeColor

Color

Specify the theme color of graph

Colors.black

Last updated