You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This component creates small graphs which show the general trend of the data in each row/column. Sparklines are meant to summarize data in a concise and easy-to-understand way, such that in e.g. a table, data trends for each row/column can be quickly observed and compared.
6
+
7
+

8
+
9
+
## Syntax
10
+
*`sparklinesComponent('Data', data)` create a ui component which creates sparklines for each row in `data`. The sparklines are by default stacked in a column.
11
+
*`sparklinesComponent(___,Name,Value)` specifies additional options for the sparkline component using one or more name-value pair arguments. Specify the options after all other input arguments.
12
+
*`sparklinesComponent(parent,___)` create the sparkline component in the specified ui parent (e.g. uifigure, uigridlayout, etc.).
13
+
*`h = sparklinesComponent(___)` returns the sparklineComponent object. Use h to modify properties of the component after creating it.
14
+
15
+
## Name-Value Pair Arguments/Properties
16
+
*`Data` (n x m numeric matrix) matrix which contains the data used to create the sparklines.
17
+
*`DataOrientation` (string) string describing whether a sparkline is created for each row (`'row'`) or for each column (`'column'`).
18
+
*`SparklinesOrientation` (string) string describing whether the sparklines are stacked in a column (`'col'`) or are arranged side-by-side in a row (`'row'`).
19
+
*`ColorMode` (string) string describing whether the sparklines are one solid color (`'solid'`) or use a gradient based on minimum and maximum values in Data (`'gradient'`).
20
+
*`LineColor` (1 x 3 numeric vector) RGB triple to use for sparklines if ColorMode is `'solid'`.
21
+
*`LimitColors` (2 x 3 numeric matrix) A pair of RGB triples to use as the minimum and maximum colors of the sparklines' color gradient corresponding to the minimum and maximum values in Data if ColorMode is `'gradient'`.
22
+
*`LineWidth` (double) line width of the sparklines.
23
+
*`SparklineStyle` (string) string describing the line style of the sparklines (`'line'`, `'dotted'`, `'dashed'`, `'bar'`).
24
+
25
+
## Example
26
+
Generate a matrix of normal data. Create sparklines for the rows of the matrix, which is how sparklines are created by default.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
6
+
3. In all cases, the software is, and all modifications and derivatives of the software shall be, licensed to you solely for use in conjunction with MathWorks products and service offerings.
7
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0 commit comments