aboutsummaryrefslogtreecommitdiff
path: root/docs/frame-properties.md
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-01-23 17:52:38 -0500
committerBobby <[email protected]>2022-01-23 17:52:38 -0500
commit35c2d88d604516d52d2623cdc27029348e1bae47 (patch)
treec59545041202184979f8ac9d1b20cf2d76cc0750 /docs/frame-properties.md
parent3eea7aa6f6517f3757ab14977b0e7f32af2e5952 (diff)
downloadizuku.js-35c2d88d604516d52d2623cdc27029348e1bae47.tar.xz
izuku.js-35c2d88d604516d52d2623cdc27029348e1bae47.zip
docs: move docs to mkdocs
Diffstat (limited to 'docs/frame-properties.md')
-rw-r--r--docs/frame-properties.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/frame-properties.md b/docs/frame-properties.md
new file mode 100644
index 0000000..2255556
--- /dev/null
+++ b/docs/frame-properties.md
@@ -0,0 +1,51 @@
+# Frame Properties
+
+There are some properties attached to the frame class. You can tap into those properties by using the dot (.) notation.
+
+> **Note:** Frame methods are not available on the properties. You need to `console.log(propertyName)` to see the property values.
+
+### `rowdata`
+
+The `rowdata` property is an array of arrays that represents the data in the frame.
+
+> **Note:** The `rowdata` property is read-only. If you want to modify the data in the frame, you can use the `data()` method.
+
+```js
+const rowdata = frame.rowdata;
+console.log(rowdata); // prints "data" array
+```
+
+### `columns`
+
+The `columns` property is an array of strings that represents the column names in the frame.
+
+> **Note:** The `columns` property is read-only. If you want to modify the column names in the frame, you can use the `header()` method.
+
+```js
+const columns = frame.columns;
+console.log(columns); // prints "header" array
+```
+
+### `size`
+
+The `size` property gives the number of elements present in the frame.
+
+> **Note:** The `size` property is read-only and is automatically generated when the frame is created. Size can change if data is modified.
+
+```js
+const size = frame.size;
+console.log(size); // prints size. ex: 9
+```
+
+### `shape`
+
+The `shape` property gives the number of rows and columns present in the frame.
+
+> **Note:** The `shape` property is read-only and is automatically generated when the frame is created. Shape can change if data is modified.
+
+```js
+const shape = frame.shape;
+console.log(shape); // prints shape. ex: 9 x 4
+```
+
+Now that you have a frame, you can use the frame methods to manipulate the data. Take a look at the [frame methods](../frame-methods).