From b1aa3c903ef46c4697cc8743a5260360c80da2f6 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 29 Apr 2024 15:14:38 +0200 Subject: [PATCH 1/3] Correct chart y-axis docs --- web/docs/operators/chart.md | 4 ++-- web/versioned_docs/version-Tenzir v4.12/operators/chart.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/docs/operators/chart.md b/web/docs/operators/chart.md index 178e89c433d..b4280786a4a 100644 --- a/web/docs/operators/chart.md +++ b/web/docs/operators/chart.md @@ -35,8 +35,8 @@ or unique when creating a `bar` chart. ### `-y|--y-axis ` (`line`, `area`, and `bar` charts only) Set the fields used for the Y-axis. -Can either be a single field, or a list of fields spelled with -a list syntax (`[field1, field2]`). +Can either be a single field, or multiple fields delimited with commas +(`field1,field2`). Defaults to every field but the first one. ### `position=` (`line`, `area`, and `bar` charts only) diff --git a/web/versioned_docs/version-Tenzir v4.12/operators/chart.md b/web/versioned_docs/version-Tenzir v4.12/operators/chart.md index 178e89c433d..b4280786a4a 100644 --- a/web/versioned_docs/version-Tenzir v4.12/operators/chart.md +++ b/web/versioned_docs/version-Tenzir v4.12/operators/chart.md @@ -35,8 +35,8 @@ or unique when creating a `bar` chart. ### `-y|--y-axis ` (`line`, `area`, and `bar` charts only) Set the fields used for the Y-axis. -Can either be a single field, or a list of fields spelled with -a list syntax (`[field1, field2]`). +Can either be a single field, or multiple fields delimited with commas +(`field1,field2`). Defaults to every field but the first one. ### `position=` (`line`, `area`, and `bar` charts only) From 42fd38b77df46e3a00d3b8791ce5bdc8b55f9b7c Mon Sep 17 00:00:00 2001 From: Matthias Vallentin Date: Mon, 29 Apr 2024 15:31:37 +0200 Subject: [PATCH 2/3] Describe defaults consistently --- web/docs/operators/chart.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/web/docs/operators/chart.md b/web/docs/operators/chart.md index b4280786a4a..4d20e3c1529 100644 --- a/web/docs/operators/chart.md +++ b/web/docs/operators/chart.md @@ -25,38 +25,44 @@ The operator does no rendering itself. ### `-x|--x-axis ` (`line`, `area`, and `bar` charts only) -Set the field used for the X-axis. Defaults to the first field in the schema. +Set the field used for the X-axis. Values in this field must be strictly increasing (sorted in ascending order, without duplicates) when creating a `line` or `area` chart, or unique when creating a `bar` chart. + Defaults to the first field in the schema. + ### `-y|--y-axis ` (`line`, `area`, and `bar` charts only) Set the fields used for the Y-axis. -Can either be a single field, or multiple fields delimited with commas -(`field1,field2`). +Can either be a single field, or a list of fields spelled with +a list syntax (`[field1, field2]`). + Defaults to every field but the first one. ### `position=` (`line`, `area`, and `bar` charts only) Control how the values are grouped when rendered as a chart. Possible values are `grouped` and `stacked`. + Defaults to `grouped`. ### `--name ` (`pie` chart only) Set the field used for the names of the segments. -Defaults to the first field in the schema. Values in this field must be unique. +Defaults to the first field in the schema. + ### `--value ` (`pie` chart only) Set the fields used for the value of a segment. Can either be a single field, or multiple fields delimited with commas (`field1,field2`). + Defaults to every field but the first one. ## Examples From cb434c9f98be3c49f86dfd0685232dabaa89ca87 Mon Sep 17 00:00:00 2001 From: Matthias Vallentin Date: Mon, 29 Apr 2024 15:41:32 +0200 Subject: [PATCH 3/3] Perform more wordsmithing --- web/docs/operators/chart.md | 28 +++++++-------- .../version-Tenzir v4.12/operators/chart.md | 34 +++++++++++-------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/web/docs/operators/chart.md b/web/docs/operators/chart.md index 4d20e3c1529..207847b69e0 100644 --- a/web/docs/operators/chart.md +++ b/web/docs/operators/chart.md @@ -23,35 +23,35 @@ The `chart` operator adds attributes to the schema of the input events, that are used to guide rendering of the data as a chart. The operator does no rendering itself. +The `fields` option value is either the name of a single field, or a +comma-separated list of multiple field names, e.g., `foo,bar,baz`. + ### `-x|--x-axis ` (`line`, `area`, and `bar` charts only) -Set the field used for the X-axis. +Sets the field used for the X-axis. -Values in this field must be strictly increasing -(sorted in ascending order, without duplicates) -when creating a `line` or `area` chart, -or unique when creating a `bar` chart. +Values in this field must be strictly increasing (sorted in ascending order, +without duplicates) when creating a `line` or `area` chart, or unique when +creating a `bar` chart. - Defaults to the first field in the schema. +Defaults to the first field in the schema. ### `-y|--y-axis ` (`line`, `area`, and `bar` charts only) -Set the fields used for the Y-axis. -Can either be a single field, or a list of fields spelled with -a list syntax (`[field1, field2]`). +Sets the fields used for the Y-axis. Defaults to every field but the first one. ### `position=` (`line`, `area`, and `bar` charts only) -Control how the values are grouped when rendered as a chart. +Controls how the values are grouped when rendered as a chart. Possible values are `grouped` and `stacked`. Defaults to `grouped`. ### `--name ` (`pie` chart only) -Set the field used for the names of the segments. +Sets the field used for the names of the segments. Values in this field must be unique. @@ -59,9 +59,7 @@ Defaults to the first field in the schema. ### `--value ` (`pie` chart only) -Set the fields used for the value of a segment. -Can either be a single field, or multiple fields delimited with commas -(`field1,field2`). +Sets the fields used for the value of a segment. Defaults to every field but the first one. @@ -73,7 +71,7 @@ Render most common `src_ip` values in `suricata.flow` events as a bar chart: export | where #schema == "suricata.flow" | top src_ip -/* -x and -y are defaulted to `src_ip` and `count` */ +/* -x and -y default to `src_ip` and `count` */ | chart bar ``` diff --git a/web/versioned_docs/version-Tenzir v4.12/operators/chart.md b/web/versioned_docs/version-Tenzir v4.12/operators/chart.md index b4280786a4a..207847b69e0 100644 --- a/web/versioned_docs/version-Tenzir v4.12/operators/chart.md +++ b/web/versioned_docs/version-Tenzir v4.12/operators/chart.md @@ -23,40 +23,44 @@ The `chart` operator adds attributes to the schema of the input events, that are used to guide rendering of the data as a chart. The operator does no rendering itself. +The `fields` option value is either the name of a single field, or a +comma-separated list of multiple field names, e.g., `foo,bar,baz`. + ### `-x|--x-axis ` (`line`, `area`, and `bar` charts only) -Set the field used for the X-axis. Defaults to the first field in the schema. +Sets the field used for the X-axis. + +Values in this field must be strictly increasing (sorted in ascending order, +without duplicates) when creating a `line` or `area` chart, or unique when +creating a `bar` chart. -Values in this field must be strictly increasing -(sorted in ascending order, without duplicates) -when creating a `line` or `area` chart, -or unique when creating a `bar` chart. +Defaults to the first field in the schema. ### `-y|--y-axis ` (`line`, `area`, and `bar` charts only) -Set the fields used for the Y-axis. -Can either be a single field, or multiple fields delimited with commas -(`field1,field2`). +Sets the fields used for the Y-axis. + Defaults to every field but the first one. ### `position=` (`line`, `area`, and `bar` charts only) -Control how the values are grouped when rendered as a chart. +Controls how the values are grouped when rendered as a chart. Possible values are `grouped` and `stacked`. + Defaults to `grouped`. ### `--name ` (`pie` chart only) -Set the field used for the names of the segments. -Defaults to the first field in the schema. +Sets the field used for the names of the segments. Values in this field must be unique. +Defaults to the first field in the schema. + ### `--value ` (`pie` chart only) -Set the fields used for the value of a segment. -Can either be a single field, or multiple fields delimited with commas -(`field1,field2`). +Sets the fields used for the value of a segment. + Defaults to every field but the first one. ## Examples @@ -67,7 +71,7 @@ Render most common `src_ip` values in `suricata.flow` events as a bar chart: export | where #schema == "suricata.flow" | top src_ip -/* -x and -y are defaulted to `src_ip` and `count` */ +/* -x and -y default to `src_ip` and `count` */ | chart bar ```