The plugin has a setting page
From here the adim is promted to enter data sample for 5 weeks, 7 days each week i.e week_1 = 1,2,42,50,790,123,5995
the values are stored in the wp_options table and when the admin visits the dashboard the values are then displayed with options to get the fisrt 7, 15 or 30 days.
The plugin:
- implements a rest api that returns an array of values for the days requested. ie request days=5 will return an array of the 1st five values from week 1.
- implements a widget on the dashboard to print a chart for the selected days.
- implements an options page to act as the settings page for the plugin.
- The plugin uses react to load the widget. Run
npm i
in the plugin folder to load dependencies. - To run the plugin in development mode run npm script
watch
. - To run the plugin in production mode run npm script
build
to build a production version.