Dropdown filter "[dropdownControl] > context.rows[0] is undefined" in Kibana Canvas

I have a datatable with several fields used to describe different objects:

Now I'm trying to create a Canvas to view those objects using dropdown filters for more user-friendliness. Seems pretty simple!
I add a line chart, change the data source, change the value along {Y,X}-axis.
I then add a first dropdown box using the following query
esdocs index="data" fields="" | dropdownControl valueColumn="type" filterColumn="type" | render, pretty simple too, and it does the job perfectly.


While I'm thinking about it, it's interesting that the Y-axis values change when filtering. Is there any way I can precise that I always want the highest value at the top of Y-axis ? (we see that before filtering, Y-axis has 1 at the origin, and 0 as highest value).

Anyway, that's not the topic at hand, although I do welcome an answer for that, too.
I proceed onto adding a second dropdown filter, this time filtering the "name" of the object. In the last picture, we can see the chart is describing two different objects, with the same color, which isn't good.
Therefore, 2 solutions:

  1. Change the color of the line for each object, but I couldn't figure out a way to do it when playing around with the settings of the line chart
  2. Reduce the number of objects displayed (Here, using a second dropdown filter).

Anyway, the second dropdown filter is created, and uses the following query
filters | esdocs index="data" fields="" | dropdownControl valueColumn="name" filterColumn="name" | render
I'm using filters here because it wouldn't make sense to check the state of the human 'Jack' when we only want objects of type 'Train' in our chart.

Anyway, I add the filter, change the code, and run it. Everything seems fine

EDIT: I'm seeing just now that the data isn't chronologically ordered... Another issue with axis values? (After the Y-axis stuff I described above)
I'm going to try reimporting using a sort properties along with my mapping, and see how it goes, but shouldn't axis values be sorted by default? Weird.

We see the second dropdown filter only displays names for trains

But when selecting any of the two names, the Line Chart empties completely, and I get the following error... Any ideas?

Feel free to ask if you have any questions that could help you more!

EDIT: Also, it is interesting to note that if I change the second filter to
dropdownControl valueColumn="state" filterColumn="state", which is another string field in my documents, it DOES work. I'm guessing this means there's a problem in my "name" field ? But since every "name" field has a value, I don't see what could be undefined here.

Cordially,
Mox

After completely reformatting my JSON file, I didn't have this issue anymore. I had to order the JSON (which I imported using the BULK API and NDJSON format) by date + change every document's ID (dunno if that changed anything though).

It should also be possible to do that without ordering the JSON but through the usage of the Index sorting settings. To be confirmed.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.