-
Notifications
You must be signed in to change notification settings - Fork 1
/
candlestick-chart-functional-spec.txt
67 lines (62 loc) · 4.19 KB
/
candlestick-chart-functional-spec.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Investor Relations Stock Chart Functional Spec
1 Timeframe Form
1.1 The timeframe form consists of two datepickers, labelled "From:" and "To:",
specifying the first and last day of data to display.
1.1.1 The graph is updated as soon as either the From or To date is modified;
by picking a date from the date picker, hitting the enter key, or
removing focus from the field.
1.2 The two dates are inclusive, e.g. a selection of 05/18/2011 to 05/20/2011
includes the 18th, 19th and 20th May 2011.
1.3 The datepicker is constrained to weekdays. Weekends should be disabled.
1.3.1 Holidays MAY be disabled, but it's not a requirement.
1.3.2 Dates before the first data point or after the last should be disabled
in the datepicker.
1.3.3 If a date is typed into the text field (rather than selected from the
datepicker), any valid date should be accepted, even if it's a weekend
or out of range.
1.4 The From date should always be less than or equal to the To date.
1.4.1 If the From date is changed to a date later than the To date, the To date
should automatically be changed to equal the new From date.
1.4.2 If the To date is changed to the a date earlier than the From date, the From
date should change to match the new To date.
1.5 The range between From and To dates should always cover at least one data point.
1.5.1 If a From date that is later than the latest data point is entered, the From
date should be changed to match to To date.
1.5.2 If a To date that is earlier than the earliest data point is entered, the To
date should be changed to match to From date.
1.5.3 This rule supersedes 1.4 and 1.3.3.
1.6 Default values:
1.6.1 The default To date is the latest date for which data is available.
1.6.2 The default From date is one month prior today (or the earliest date
thereafter for which data exists).
2 Candlestick Chart
2.1 The candlestick chart is a graphical representation of the high, low, open, and close
prices of the stock for each day over the range specified by the timeline form. It
follows the conventions of a traditional candlestick chart, as described by Wikipedia:
http://en.wikipedia.org/wiki/Candlestick_chart
2.1 The x-axis marks the day. Up to five evenly-spaced dates are labelled on the x-axis.
2.2 The y-axis marks the price, and spans from just below the lowest displayed price to
just above the highest displayed price.
2.3 For each day on the x axis, a thin vertical line segment is drawn between the point
of the high price and the point of the low price.
2.4 A rectangle is drawn on top of the line segment, with its top and bottom edges at
the points marking the the open and close price.
2.2.1 If the close price is higher than the open price the rectangle is open.
2.2.2 If the close price is lower than the open price, the rectangle is closed.
2.5 Beneath the candlestick chart, a smaller bar chart shows the volume for each
trading day, with the same x-axis but a different y-axis (marking volume instead
or price).
2.2 Above the chart, a table displays the date, volume, high, low, open, and close
for the highlighted day.
2.2.1 Initially, the most recent day is highlighted.
2.2.2 As the mouse hovers over each column in the chart, that day is highlighted.
2.2.3 A dot visually marks the close price of the highlighted day.
2.2.4 In the volume chart, the bar for the highlighted day changes to a different
color.
3 List View
3.1 A list view can be selected with a radio button (see comps).
3.2 When the list view is selected, the candlestick chart and scrubber bar are hidden,
and a table displaying the date, volume, high, low, open, and close prices is
displayed.
3.3 The data is sorted by date in descending order.
3.4 The segment of data displayed corresponds to the dates in the timeframe form.