Chart/Plotly/Trace/Box.pm untested

filter: Statementstmt 0.0% 0 / 152 Branchbran 0.0% 0 / 12 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 0.0% 0 / 13 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 192 CC 6 SCAR 27.3
CC
6
Cov
0%
TO_JSON
42.0
type
2.0
BEGIN
2.0
CRAP 15.3
1 package Chart::Plotly::Trace::Box;
2 use Moose;
3 use MooseX::ExtraArgs;
4 use Moose::Util::TypeConstraints qw(enum union);
5 if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
6 Moose::Util::TypeConstraints::type('PDL');
7 }
8  
9 use Chart::Plotly::Trace::Box::Hoverlabel;
10 use Chart::Plotly::Trace::Box::Legendgrouptitle;
11 use Chart::Plotly::Trace::Box::Line;
12 use Chart::Plotly::Trace::Box::Marker;
13 use Chart::Plotly::Trace::Box::Selected;
14 use Chart::Plotly::Trace::Box::Stream;
15 use Chart::Plotly::Trace::Box::Transform;
16 use Chart::Plotly::Trace::Box::Unselected;
17  
18 our $VERSION = '0.042'; # VERSION
19  
20 # ABSTRACT: Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The second quartile (Q2, i.e. the median) is marked by a line inside the box. The fences grow outward from the boxes' edges, by default they span +/- 1.5 times the interquartile range (IQR: Q3-Q1), The sample mean and standard deviation as well as notches and the sample, outlier and suspected outliers points can be optionally added to the box plot. The values and positions corresponding to each boxes can be input using two signatures. The first signature expects users to supply the sample values in the `y` data array for vertical boxes (`x` for horizontal boxes). By supplying an `x` (`y`) array, one box per distinct `x` (`y`) value is drawn If no `x` (`y`) {array} is provided, a single box is drawn. In this case, the box is positioned with the trace `name` or with `x0` (`y0`) if provided. The second signature expects users to supply the boxes corresponding Q1, median and Q3 statistics in the `q1`, `median` and `q3` data arrays respectively. Other box features relying on statistics namely `lowerfence`, `upperfence`, `notchspan` can be set directly by the users. To have plotly compute them or to show sample points besides the boxes, users can set the `y` data array for vertical boxes (`x` for horizontal boxes) to a 2D array with the outer length corresponding to the number of boxes in the traces and the inner length corresponding the sample size.
21  
22 sub TO_JSON {
23 my $self = shift;
24 my $extra_args = $self->extra_args // {};
25 my $meta = $self->meta;
26 my %hash = %$self;
27 for my $name ( sort keys %hash ) {
28 my $attr = $meta->get_attribute($name);
29 if ( defined $attr ) {
30 my $value = $hash{$name};
31 my $type = $attr->type_constraint;
32 if ( $type && $type->equals('Bool') ) {
33 $hash{$name} = $value ? \1 : \0;
34 }
35 }
36 }
37 my $plotly_meta = delete $hash{'pmeta'};
38 if ( defined $plotly_meta ) {
39 $hash{'meta'} = $plotly_meta;
40 }
41 %hash = ( %hash, %$extra_args );
42 delete $hash{'extra_args'};
43 if ( $self->can('type') && ( !defined $hash{'type'} ) ) {
44 $hash{type} = $self->type();
45 }
46 return \%hash;
47 }
48  
49 sub type {
50 my @components = split( /::/, __PACKAGE__ );
51 return lc( $components[-1] );
52 }
53  
54 has alignmentgroup => (
55 is => "rw",
56 isa => "Str",
57 documentation =>
58 "Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.",
59 );
60  
61 has boxmean => (
62 is => "rw",
63 documentation =>
64 "If *true*, the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If *sd* the standard deviation is also drawn. Defaults to *true* when `mean` is set. Defaults to *sd* when `sd` is set Otherwise defaults to *false*.",
65 );
66  
67 has boxpoints => (
68 is => "rw",
69 documentation =>
70 "If *outliers*, only the sample points lying outside the whiskers are shown If *suspectedoutliers*, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see `outliercolor`) If *all*, all sample points are shown If *false*, only the box(es) are shown with no sample points Defaults to *suspectedoutliers* when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to *all* under the q1/median/q3 signature. Otherwise defaults to *outliers*.",
71 );
72  
73 has customdata => (
74 is => "rw",
75 isa => "ArrayRef|PDL",
76 documentation =>
77 "Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, *scatter* traces also appends customdata items in the markers DOM elements",
78 );
79  
80 has customdatasrc => ( is => "rw",
81 isa => "Str",
82 documentation => "Sets the source reference on Chart Studio Cloud for `customdata`.",
83 );
84  
85 has dx => ( is => "rw",
86 isa => "Num",
87 documentation => "Sets the x coordinate step for multi-box traces set using q1/median/q3.",
88 );
89  
90 has dy => ( is => "rw",
91 isa => "Num",
92 documentation => "Sets the y coordinate step for multi-box traces set using q1/median/q3.",
93 );
94  
95 has fillcolor => (
96 is => "rw",
97 isa => "Str",
98 documentation =>
99 "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.",
100 );
101  
102 has hoverinfo => (
103 is => "rw",
104 isa => "Str|ArrayRef[Str]",
105 documentation =>
106 "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.",
107 );
108  
109 has hoverinfosrc => ( is => "rw",
110 isa => "Str",
111 documentation => "Sets the source reference on Chart Studio Cloud for `hoverinfo`.",
112 );
113  
114 has hoverlabel => ( is => "rw",
115 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Box::Hoverlabel", );
116  
117 has hoveron => ( is => "rw",
118 isa => "Str",
119 documentation => "Do the hover effects highlight individual boxes or sample points or both?",
120 );
121  
122 has hovertemplate => (
123 is => "rw",
124 isa => "Str|ArrayRef[Str]",
125 documentation =>
126 "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:\$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `<extra>` is displayed in the secondary box, for example \"<extra>{fullData.name}</extra>\". To hide the secondary box completely, use an empty tag `<extra></extra>`.",
127 );
128  
129 has hovertemplatesrc => ( is => "rw",
130 isa => "Str",
131 documentation => "Sets the source reference on Chart Studio Cloud for `hovertemplate`.",
132 );
133  
134 has hovertext => ( is => "rw",
135 isa => "Str|ArrayRef[Str]",
136 documentation => "Same as `text`.",
137 );
138  
139 has hovertextsrc => ( is => "rw",
140 isa => "Str",
141 documentation => "Sets the source reference on Chart Studio Cloud for `hovertext`.",
142 );
143  
144 has ids => (
145 is => "rw",
146 isa => "ArrayRef|PDL",
147 documentation =>
148 "Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.",
149 );
150  
151 has idssrc => ( is => "rw",
152 isa => "Str",
153 documentation => "Sets the source reference on Chart Studio Cloud for `ids`.",
154 );
155  
156 has jitter => (
157 is => "rw",
158 isa => "Num",
159 documentation =>
160 "Sets the amount of jitter in the sample points drawn. If *0*, the sample points align along the distribution axis. If *1*, the sample points are drawn in a random jitter of width equal to the width of the box(es).",
161 );
162  
163 has legendgroup => (
164 is => "rw",
165 isa => "Str",
166 documentation =>
167 "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.",
168 );
169  
170 has legendgrouptitle => ( is => "rw",
171 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Box::Legendgrouptitle", );
172  
173 has legendrank => (
174 is => "rw",
175 isa => "Num",
176 documentation =>
177 "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with `*reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.",
178 );
179  
180 has line => ( is => "rw",
181 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Box::Line", );
182  
183 has lowerfence => (
184 is => "rw",
185 isa => "ArrayRef|PDL",
186 documentation =>
187 "Sets the lower fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `lowerfence` is not provided but a sample (in `y` or `x`) is set, we compute the lower as the last sample point below 1.5 times the IQR.",
188 );
189  
190 has lowerfencesrc => ( is => "rw",
191 isa => "Str",
192 documentation => "Sets the source reference on Chart Studio Cloud for `lowerfence`.",
193 );
194  
195 has marker => ( is => "rw",
196 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Box::Marker", );
197  
198 has mean => (
199 is => "rw",
200 isa => "ArrayRef|PDL",
201 documentation =>
202 "Sets the mean values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `mean` is not provided but a sample (in `y` or `x`) is set, we compute the mean for each box using the sample values.",
203 );
204  
205 has meansrc => ( is => "rw",
206 isa => "Str",
207 documentation => "Sets the source reference on Chart Studio Cloud for `mean`.",
208 );
209  
210 has median => (is => "rw",
211 isa => "ArrayRef|PDL",
212 documentation => "Sets the median values. There should be as many items as the number of boxes desired.",
213 );
214  
215 has mediansrc => ( is => "rw",
216 isa => "Str",
217 documentation => "Sets the source reference on Chart Studio Cloud for `median`.",
218 );
219  
220 has pmeta => (
221 is => "rw",
222 isa => "Any|ArrayRef[Any]",
223 documentation =>
224 "Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index.",
225 );
226  
227 has metasrc => ( is => "rw",
228 isa => "Str",
229 documentation => "Sets the source reference on Chart Studio Cloud for `meta`.",
230 );
231  
232 has name => (
233 is => "rw",
234 isa => "Str",
235 documentation =>
236 "Sets the trace name. The trace name appear as the legend item and on hover. For box traces, the name will also be used for the position coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are missing and the position axis is categorical",
237 );
238  
239 has notched => (
240 is => "rw",
241 isa => "Bool",
242 documentation =>
243 "Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to *false* unless `notchwidth` or `notchspan` is set.",
244 );
245  
246 has notchspan => (
247 is => "rw",
248 isa => "ArrayRef|PDL",
249 documentation =>
250 "Sets the notch span from the boxes' `median` values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `notchspan` is not provided but a sample (in `y` or `x`) is set, we compute it as 1.57 * IQR / sqrt(N), where N is the sample size.",
251 );
252  
253 has notchspansrc => ( is => "rw",
254 isa => "Str",
255 documentation => "Sets the source reference on Chart Studio Cloud for `notchspan`.",
256 );
257  
258 has notchwidth => (
259 is => "rw",
260 isa => "Num",
261 documentation =>
262 "Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es).",
263 );
264  
265 has offsetgroup => (
266 is => "rw",
267 isa => "Str",
268 documentation =>
269 "Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.",
270 );
271  
272 has opacity => ( is => "rw",
273 isa => "Num",
274 documentation => "Sets the opacity of the trace.",
275 );
276  
277 has orientation => (
278 is => "rw",
279 isa => enum( [ "v", "h" ] ),
280 documentation =>
281 "Sets the orientation of the box(es). If *v* (*h*), the distribution is visualized along the vertical (horizontal).",
282 );
283  
284 has pointpos => (
285 is => "rw",
286 isa => "Num",
287 documentation =>
288 "Sets the position of the sample points in relation to the box(es). If *0*, the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes",
289 );
290  
291 has q1 => (is => "rw",
292 isa => "ArrayRef|PDL",
293 documentation => "Sets the Quartile 1 values. There should be as many items as the number of boxes desired.",
294 );
295  
296 has q1src => ( is => "rw",
297 isa => "Str",
298 documentation => "Sets the source reference on Chart Studio Cloud for `q1`.",
299 );
300  
301 has q3 => (is => "rw",
302 isa => "ArrayRef|PDL",
303 documentation => "Sets the Quartile 3 values. There should be as many items as the number of boxes desired.",
304 );
305  
306 has q3src => ( is => "rw",
307 isa => "Str",
308 documentation => "Sets the source reference on Chart Studio Cloud for `q3`.",
309 );
310  
311 has quartilemethod => (
312 is => "rw",
313 isa => enum( [ "linear", "exclusive", "inclusive" ] ),
314 documentation =>
315 "Sets the method used to compute the sample's Q1 and Q3 quartiles. The *linear* method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html). The *exclusive* method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The *inclusive* method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.",
316 );
317  
318 has sd => (
319 is => "rw",
320 isa => "ArrayRef|PDL",
321 documentation =>
322 "Sets the standard deviation values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `sd` is not provided but a sample (in `y` or `x`) is set, we compute the standard deviation for each box using the sample values.",
323 );
324  
325 has sdsrc => ( is => "rw",
326 isa => "Str",
327 documentation => "Sets the source reference on Chart Studio Cloud for `sd`.",
328 );
329  
330 has selected => ( is => "rw",
331 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Box::Selected", );
332  
333 has selectedpoints => (
334 is => "rw",
335 isa => "Any",
336 documentation =>
337 "Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect.",
338 );
339  
340 has showlegend => (
341 is => "rw",
342 isa => "Bool",
343 documentation => "Determines whether or not an item corresponding to this trace is shown in the legend.",
344 );
345  
346 has stream => ( is => "rw",
347 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Box::Stream", );
348  
349 has text => (
350 is => "rw",
351 isa => "Str|ArrayRef[Str]",
352 documentation =>
353 "Sets the text elements associated with each sample value. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. To be seen, trace `hoverinfo` must contain a *text* flag.",
354 );
355  
356 has textsrc => ( is => "rw",
357 isa => "Str",
358 documentation => "Sets the source reference on Chart Studio Cloud for `text`.",
359 );
360  
361 has transforms => ( is => "rw",
362 isa => "ArrayRef|ArrayRef[Chart::Plotly::Trace::Box::Transform]", );
363  
364 has uid => (
365 is => "rw",
366 isa => "Str",
367 documentation =>
368 "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.",
369 );
370  
371 has uirevision => (
372 is => "rw",
373 isa => "Any",
374 documentation =>
375 "Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves.",
376 );
377  
378 has unselected => ( is => "rw",
379 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Box::Unselected", );
380  
381 has upperfence => (
382 is => "rw",
383 isa => "ArrayRef|PDL",
384 documentation =>
385 "Sets the upper fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `upperfence` is not provided but a sample (in `y` or `x`) is set, we compute the lower as the last sample point above 1.5 times the IQR.",
386 );
387  
388 has upperfencesrc => ( is => "rw",
389 isa => "Str",
390 documentation => "Sets the source reference on Chart Studio Cloud for `upperfence`.",
391 );
392  
393 has visible => (
394 is => "rw",
395 documentation =>
396 "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).",
397 );
398  
399 has whiskerwidth => (
400 is => "rw",
401 isa => "Num",
402 documentation =>
403 "Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es).",
404 );
405  
406 has width => (
407 is => "rw",
408 isa => "Num",
409 documentation =>
410 "Sets the width of the box in data coordinate If *0* (default value) the width is automatically selected based on the positions of other box traces in the same subplot.",
411 );
412  
413 has x => ( is => "rw",
414 isa => "ArrayRef|PDL",
415 documentation => "Sets the x sample data or coordinates. See overview for more info.",
416 );
417  
418 has x0 => (
419 is => "rw",
420 isa => "Any",
421 documentation =>
422 "Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.",
423 );
424  
425 has xaxis => (
426 is => "rw",
427 documentation =>
428 "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.",
429 );
430  
431 has xcalendar => ( is => "rw",
432 isa => enum(
433 [ "chinese", "coptic", "discworld", "ethiopian", "gregorian", "hebrew", "islamic", "jalali",
434 "julian", "mayan", "nanakshahi", "nepali", "persian", "taiwan", "thai", "ummalqura"
435 ]
436 ),
437 documentation => "Sets the calendar system to use with `x` date data.",
438 );
439  
440 has xhoverformat => (
441 is => "rw",
442 isa => "Str",
443 documentation =>
444 "Sets the hover text formatting rulefor `x` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*By default the values are formatted using `xaxis.hoverformat`.",
445 );
446  
447 has xperiod => (
448 is => "rw",
449 isa => "Any",
450 documentation =>
451 "Only relevant when the axis `type` is *date*. Sets the period positioning in milliseconds or *n* on the x axis. Special values in the form of *n* could be used to declare the number of months. In this case `n` must be a positive integer.",
452 );
453  
454 has xperiod0 => (
455 is => "rw",
456 isa => "Any",
457 documentation =>
458 "Only relevant when the axis `type` is *date*. Sets the base for period positioning in milliseconds or date string on the x0 axis. When `x0period` is round number of weeks, the `x0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.",
459 );
460  
461 has xperiodalignment => (
462 is => "rw",
463 isa => enum( [ "start", "middle", "end" ] ),
464 documentation => "Only relevant when the axis `type` is *date*. Sets the alignment of data points on the x axis.",
465 );
466  
467 has xsrc => ( is => "rw",
468 isa => "Str",
469 documentation => "Sets the source reference on Chart Studio Cloud for `x`.",
470 );
471  
472 has y => ( is => "rw",
473 isa => "ArrayRef|PDL",
474 documentation => "Sets the y sample data or coordinates. See overview for more info.",
475 );
476  
477 has y0 => (
478 is => "rw",
479 isa => "Any",
480 documentation =>
481 "Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.",
482 );
483  
484 has yaxis => (
485 is => "rw",
486 documentation =>
487 "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.yaxis2`, and so on.",
488 );
489  
490 has ycalendar => ( is => "rw",
491 isa => enum(
492 [ "chinese", "coptic", "discworld", "ethiopian", "gregorian", "hebrew", "islamic", "jalali",
493 "julian", "mayan", "nanakshahi", "nepali", "persian", "taiwan", "thai", "ummalqura"
494 ]
495 ),
496 documentation => "Sets the calendar system to use with `y` date data.",
497 );
498  
499 has yhoverformat => (
500 is => "rw",
501 isa => "Str",
502 documentation =>
503 "Sets the hover text formatting rulefor `y` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*By default the values are formatted using `yaxis.hoverformat`.",
504 );
505  
506 has yperiod => (
507 is => "rw",
508 isa => "Any",
509 documentation =>
510 "Only relevant when the axis `type` is *date*. Sets the period positioning in milliseconds or *n* on the y axis. Special values in the form of *n* could be used to declare the number of months. In this case `n` must be a positive integer.",
511 );
512  
513 has yperiod0 => (
514 is => "rw",
515 isa => "Any",
516 documentation =>
517 "Only relevant when the axis `type` is *date*. Sets the base for period positioning in milliseconds or date string on the y0 axis. When `y0period` is round number of weeks, the `y0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.",
518 );
519  
520 has yperiodalignment => (
521 is => "rw",
522 isa => enum( [ "start", "middle", "end" ] ),
523 documentation => "Only relevant when the axis `type` is *date*. Sets the alignment of data points on the y axis.",
524 );
525  
526 has ysrc => ( is => "rw",
527 isa => "Str",
528 documentation => "Sets the source reference on Chart Studio Cloud for `y`.",
529 );
530  
531 __PACKAGE__->meta->make_immutable();
532 1;
533  
534 __END__