Skip to content

Commit 8148142

Browse files
authored
Merge pull request #135 from YingxuH/update-userguide
Update userguide
2 parents 3e66665 + 0189884 commit 8148142

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

docs/UserGuide.adoc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ This is a passive feature. Relaunch the window to get the updated information.
361361

362362
image::TopSellingProducts.png[align="center"]
363363

364+
=== View the product sales and quantity histogram.
365+
366+
Displays and updates the histogram of product sales and quantity. +
367+
368+
[NOTE]
369+
This is a passive feature. Relaunch the histogram window to udpate the plot.
370+
`F3` key is the short cut for launch/relaunch the window.
371+
372+
image::ViewInventory.png[align="center"]
373+
364374
=== Get the revenue made in a certain period : `revenue`
365375

366376
Gets the revenue made in a selected period. +
@@ -434,7 +444,11 @@ Format: `predict`
434444
=== Plotting sales: `plotsales`.
435445

436446
Plot a graph with the sales of the selected product in the past week. +
437-
Format: `plotsales PRODUCT_INDEX`
447+
Format: `plotsales PRODUCT_INDEX [sd/START_DATE] [ed/END_DATE]`
448+
449+
[NOTE]
450+
The start date and end date attributes are optional. If omitted, the system
451+
will plot the last 7 days by default.
438452

439453
image::SalesPlot.png[align="center"]
440454

docs/images/SalesPlot.png

-56.8 KB
Loading

docs/images/ViewInventory.png

19.1 KB
Loading

src/main/java/seedu/address/logic/commands/statistics/PlotProductSalesCommand.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package seedu.address.logic.commands.statistics;
22

33
import static java.util.Objects.requireNonNull;
4+
import static seedu.address.logic.parser.CliSyntax.PREFIX_END_DATE;
5+
import static seedu.address.logic.parser.CliSyntax.PREFIX_START_DATE;
46
import static seedu.address.model.transaction.DateTime.populateDates;
57

68
import java.util.ArrayList;
@@ -29,8 +31,12 @@ public class PlotProductSalesCommand extends Command {
2931
public static final String COMMAND_WORD = "plotsales";
3032

3133
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Plot the sales of product to the screen\n"
32-
+ "Parameters: INDEX (must be a positive integer)\n"
33-
+ "Example: " + COMMAND_WORD + " 1";
34+
+ "Parameters: INDEX (must be a positive integer) "
35+
+ PREFIX_START_DATE + "START DATE "
36+
+ PREFIX_END_DATE + "END DATE \n"
37+
+ "Example: " + COMMAND_WORD + " 1 "
38+
+ PREFIX_START_DATE + "2020-03-20 10:00 "
39+
+ PREFIX_END_DATE + "2020-03-30 10:00";
3440

3541
public static final String MESSAGE_SUCCESS = "Sales for product %1$s plotted.";
3642
public static final String TITLE = "Sales of %1$s between %2$s and %3$s";

0 commit comments

Comments
 (0)