diff --git a/README.md b/README.md index 538d996..c032969 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ new d3plus.Plot() --- -#### **Plot** [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L116) +#### **Plot** [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L124) This is a global class, and extends all of the methods and functionality of Viz. @@ -190,6 +190,7 @@ This is a global class, and extends all of the methods and functionality of # Plot.**annotations**(*annotations*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1305) +# Plot.**annotations**(*annotations*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1314) Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc). Annotations will be drawn underneath the data to be displayed. @@ -242,7 +243,7 @@ Allows drawing custom shapes to be used as annotations in the provided x/y plot. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**axisPersist**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1315) +# Plot.**axisPersist**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1324) Determines whether the x and y axes should have their scales persist while users filter the data, the timeline being the prime example (set this to `true` to make the axes stay consistent when the timeline changes). @@ -250,7 +251,7 @@ Determines whether the x and y axes should have their scales persist while users This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**backgroundConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1325) +# Plot.**backgroundConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1334) A d3plus-shape configuration Object used for styling the background rectangle of the inner x/y plot (behind all of the shapes and gridlines). @@ -258,7 +259,7 @@ A d3plus-shape configuration Object used for styling the background rectangle of This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**barPadding**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1335) +# Plot.**barPadding**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1344) Sets the pixel space between each bar in a group of bars. @@ -266,7 +267,7 @@ Sets the pixel space between each bar in a group of bars. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**baseline**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1345) +# Plot.**baseline**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1354) Sets the baseline for the x/y plot. If *value* is not specified, returns the current baseline. @@ -274,7 +275,15 @@ Sets the baseline for the x/y plot. If *value* is not specified, returns the cur This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**confidence**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1363) +# Plot.**buffer**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1364) + +Determines whether or not to add additional padding at the ends of x or y scales. The most commone use for this is in Scatter Plots, so that the shapes do not appear directly on the axis itself. The value provided can either be `true` or `false` to toggle the behavior for all shape types, or a keyed Object for each shape type (ie. `{Bar: false, Circle: true, Line: false}`). + + +This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. + + +# Plot.**confidence**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1393) Sets the confidence to the specified array of lower and upper bounds. @@ -293,7 +302,7 @@ Can be called with accessor functions or static keys: ``` -# Plot.**confidenceConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1382) +# Plot.**confidenceConfig**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1412) If *value* is specified, sets the config method for each shape rendered as a confidence interval and returns the current class instance. @@ -301,7 +310,7 @@ If *value* is specified, sets the config method for each shape rendered as a con This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**discrete**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1392) +# Plot.**discrete**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1422) Sets the discrete axis to the specified string. If *value* is not specified, returns the current discrete axis. @@ -309,7 +318,7 @@ Sets the discrete axis to the specified string. If *value* is not specified, ret This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**discreteCutoff**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1402) +# Plot.**discreteCutoff**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1432) When the width or height of the chart is less than or equal to this pixel value, the discrete axis will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely. @@ -317,7 +326,7 @@ When the width or height of the chart is less than or equal to this pixel value, This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**groupPadding**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1412) +# Plot.**groupPadding**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1442) Sets the pixel space between groups of bars. @@ -325,7 +334,7 @@ Sets the pixel space between groups of bars. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**lineLabels**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1432) +# Plot.**lineLabels**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1462) Draws labels on the right side of any Line shapes that are drawn on the plot. @@ -333,7 +342,7 @@ Draws labels on the right side of any Line shapes that are drawn on the plot. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**lineMarkerConfig**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1442) +# Plot.**lineMarkerConfig**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1472) Shape config for the Circle shapes drawn by the lineMarkers method. @@ -341,7 +350,7 @@ Shape config for the Circle shapes drawn by the lineMarkers method. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**lineMarkers**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1452) +# Plot.**lineMarkers**([*value*]) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1482) Draws circle markers on each vertex of a Line. @@ -349,7 +358,7 @@ Draws circle markers on each vertex of a Line. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**shapeSort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1462) +# Plot.**shapeSort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1492) A JavaScript [sort comparator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) that receives each shape Class (ie. "Circle", "Line", etc) as it's comparator arguments. Shapes are drawn in groups based on their type, so you are defining the layering order for all shapes of said type. @@ -357,7 +366,7 @@ A JavaScript [sort comparator function](https://developer.mozilla.org/en-US/docs This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**size**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1472) +# Plot.**size**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1502) Sets the size of bubbles to the given Number, data key, or function. @@ -365,7 +374,7 @@ Sets the size of bubbles to the given Number, data key, or function. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**sizeMax**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1482) +# Plot.**sizeMax**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1512) Sets the size scale maximum to the specified number. @@ -373,7 +382,7 @@ Sets the size scale maximum to the specified number. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**sizeMin**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1492) +# Plot.**sizeMin**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1522) Sets the size scale minimum to the specified number. @@ -381,7 +390,7 @@ Sets the size scale minimum to the specified number. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**sizeScale**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1502) +# Plot.**sizeScale**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1532) Sets the size scale to the specified string. @@ -389,7 +398,7 @@ Sets the size scale to the specified string. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**stacked**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1512) +# Plot.**stacked**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1542) If *value* is specified, toggles shape stacking. If *value* is not specified, returns the current stack value. @@ -397,7 +406,7 @@ If *value* is specified, toggles shape stacking. If *value* is not specified, re This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**stackOffset**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1522) +# Plot.**stackOffset**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1552) Sets the stack offset. If *value* is not specified, returns the current stack offset function. @@ -405,7 +414,7 @@ Sets the stack offset. If *value* is not specified, returns the current stack of This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**stackOrder**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1532) +# Plot.**stackOrder**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1562) Sets the stack order. If *value* is not specified, returns the current stack order function. @@ -413,7 +422,7 @@ Sets the stack order. If *value* is not specified, returns the current stack ord This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**x**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1547) +# Plot.**x**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1577) Sets the x accessor to the specified function or number. If *value* is not specified, returns the current x accessor. @@ -421,7 +430,7 @@ Sets the x accessor to the specified function or number. If *value* is not speci This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**x2**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1565) +# Plot.**x2**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1595) Sets the x2 accessor to the specified function or number. If *value* is not specified, returns the current x2 accessor. @@ -429,7 +438,7 @@ Sets the x2 accessor to the specified function or number. If *value* is not spec This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**xConfig**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1583) +# Plot.**xConfig**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1613) A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data. @@ -437,7 +446,7 @@ A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config use This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**xCutoff**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1593) +# Plot.**xCutoff**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1623) When the width of the chart is less than or equal to this pixel value, and the x-axis is not the discrete axis, it will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely. @@ -445,7 +454,7 @@ When the width of the chart is less than or equal to this pixel value, and the x This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**x2Config**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1603) +# Plot.**x2Config**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1633) A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data. @@ -453,7 +462,7 @@ A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config use This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**xDomain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1613) +# Plot.**xDomain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1643) Sets the x domain to the specified array. If *value* is not specified, returns the current x domain. Additionally, if either value of the array is undefined, it will be calculated from the data. @@ -461,7 +470,7 @@ Sets the x domain to the specified array. If *value* is not specified, returns t This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**x2Domain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1623) +# Plot.**x2Domain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1653) Sets the x2 domain to the specified array. If *value* is not specified, returns the current x2 domain. Additionally, if either value of the array is undefined, it will be calculated from the data. @@ -469,7 +478,7 @@ Sets the x2 domain to the specified array. If *value* is not specified, returns This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**xSort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1633) +# Plot.**xSort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1663) Defines a custom sorting comparitor function to be used for discrete x axes. @@ -477,7 +486,7 @@ Defines a custom sorting comparitor function to be used for discrete x axes. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**x2Sort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1643) +# Plot.**x2Sort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1673) Defines a custom sorting comparitor function to be used for discrete x2 axes. @@ -485,7 +494,7 @@ Defines a custom sorting comparitor function to be used for discrete x2 axes. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**y**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1653) +# Plot.**y**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1683) Sets the y accessor to the specified function or number. If *value* is not specified, returns the current y accessor. @@ -493,7 +502,7 @@ Sets the y accessor to the specified function or number. If *value* is not speci This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**y2**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1671) +# Plot.**y2**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1701) Sets the y2 accessor to the specified function or number. If *value* is not specified, returns the current y2 accessor. @@ -501,7 +510,7 @@ Sets the y2 accessor to the specified function or number. If *value* is not spec This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**yConfig**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1691) +# Plot.**yConfig**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1721) A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the y-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data. Note:* If a "domain" array is passed to the y-axis config, it will be reversed. @@ -510,7 +519,7 @@ Note:* If a "domain" array is passed to the y-axis config, it will be reversed. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**yCutoff**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1706) +# Plot.**yCutoff**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1736) When the height of the chart is less than or equal to this pixel value, and the y-axis is not the discrete axis, it will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely. @@ -518,7 +527,7 @@ When the height of the chart is less than or equal to this pixel value, and the This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**y2Config**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1716) +# Plot.**y2Config**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1746) A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary y-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data. @@ -526,7 +535,7 @@ A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config use This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**yDomain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1731) +# Plot.**yDomain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1761) Sets the y domain to the specified array. If *value* is not specified, returns the current y domain. Additionally, if either value of the array is undefined, it will be calculated from the data. @@ -534,7 +543,7 @@ Sets the y domain to the specified array. If *value* is not specified, returns t This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**y2Domain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1741) +# Plot.**y2Domain**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1771) Sets the y2 domain to the specified array. If *value* is not specified, returns the current y2 domain. Additionally, if either value of the array is undefined, it will be calculated from the data. @@ -542,7 +551,7 @@ Sets the y2 domain to the specified array. If *value* is not specified, returns This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**ySort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1751) +# Plot.**ySort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1781) Defines a custom sorting comparitor function to be used for discrete y axes. @@ -550,7 +559,7 @@ Defines a custom sorting comparitor function to be used for discrete y axes. This is a static method of [Plot](#Plot), and is chainable with other methods of this Class. -# Plot.**y2Sort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1761) +# Plot.**y2Sort**(*value*) [<>](https://github.com/d3plus/d3plus-plot/blob/master/src/Plot.js#L1791) Defines a custom sorting comparitor function to be used for discrete y2 axes. @@ -646,4 +655,4 @@ new d3plus.AreaPlot() -###### Documentation generated on Thu, 27 Jul 2023 21:45:56 GMT +###### Documentation generated on Mon, 30 Oct 2023 15:53:33 GMT