Repository navigation
TSVB markdown Dates, Boolean & String fields not rendering #56026
Description
Activity
- addedbugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceFeature:TSVBTSVB (Time Series Visual Builder)TSVB (Time Series Visual Builder)Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//
on Jan 28, 2020 Pinging @elastic/kibana-app (Team:KibanaApp)
From my point of view TSVB is working as designed. Let me switch to the Time Series tab to show you what kind of data you are trying to visualize in Markdown.
In my example, I have set 2 as the value for the
Topfield. This parameter can be set to define how many term buckets should be returned out of the overall terms list. But anyway chart is displayed for the entire timeframe. In themarkdownview, everything works the same:Here we can also see our top 2 datasets with comma separated data including: date and doc_count value for that date. doc_count is a number of docs in the bucket. Obviously we cannot apply we cannot apply boolean / date / string / etc. formatters for that.
Now let me show you how how to display a single value instead of an entire array. Here we have 2 options:
- if you want to visualize only the documents for the specified interval from the end of the time range you can use
{{ date.last.formatted }}instead of{{ date.data.formatted }} - if you need to match all the documents please see [TSVB] Introducing Timerange Data Mode for Metric Style Visualizations #37185
Reacted by Federico Schmidt- if you want to visualize only the documents for the specified interval from the end of the time range you can use
**Kibana version: 7.5
**Elasticsearch version:7.5
**Server OS version: macOS
**Browser version: chrome
Browser OS version:
**Original install method (e.g. download page, yum, from source, etc.):self-managed, zip download
**Describe the bug: When rendering a single result from the tree using the {{#each _all}} mustache language. Kibana will not render Dates and boolean fields, and String fields of more than 5.
DATES -> this will render 1 result of the TREE/ARRAY, but when you do it with DATES it renders the whole TREE. I want the same result that I receive with string fields. 1. If I increased the TOP field more results of the TREE/ARRAY will render the specified input.
More than 5 STRING fields -> TSVB messes up it starts to reorder your code. No matter if your code and panels read 1,2,3,4 (blocks of code or panels written in sequential order ) once you get to 5 or more... its reorders to 5,1,2,3,4 or 5,1,2,3,4,6 or worst.
BOOLEAN fields -> TRUE or False render as 0's
String fields -> mapped as type: "text" only doesn't render correctly.
The Datatypes in the mappings are declared accordingly.
Steps to reproduce:
TSVB visualization with the markdown selected.
Load your index using "Panel Options" tab -> data the select @timestamp on the time field
Click on the Data tab and add your variables. Aggregations = Count, Add the appropriate fields either a combo or single entry of dates and text fields, grouped by "terms", top "1"
If done correctly switch to the "Markdown" tab and your variable should be loaded.
Enter the markdown code: ex.
{{#each _all}}
{{#with id as | id |}}
ID {{../label}}
{{/with}}
{{#with date as | date |}}
date {{../label}}
{{/with}}
{{/each}}
**Expected behavior: Code should render 1 result from each aggregation no matter the field type except "text fields" so keywords, dates, and booleans should show.
**Screenshots (if relevant):


**Errors in browser console (if relevant):na
**Provide logs and/or server output (if relevant):na
**Any additional context: this visualization is not tagged as "Experimental"