Highchart syntax

I’m not fully understading the “getcolumn” vs “getcolumnfromgroupby” vs “getcolumnfromvalue” difference. Can someone explain the difference? Using sample data and changing the integers (X) for the selection ([“getcolumn”, X]), I’m not seeing a relationship that’s making sense. I would think that if X = 0, it would take the top selection from the “GroupBy” values (using [“getColumnFromGroupBy”, 0]), if X = 1, it would take the second from the top selection, etc, but it doesn’t seem to be doing that. And if I don’t specify to get the column from groupby or value and just use the generic “getcolumn”, where does it decide to get the column from?

1 Like

Best way to think about it is by visualizing a simple table chart.

Pay attention to the field wells, and table values in the attached screenshot:

Now let’s go over each method:

getColumn can access any column from the table:

  • ["getColumn", 0] - returns array [1, 2, 3, 4, 5, ...]
  • ["getColumn", 1] - returns array [1, 1, 1, 1, 1, ...]
  • ["getColumn", 2] - returns array [1674, 7425, 4371, ...]

getColumnFromGroupBy works similarly, but its index is limited to the columns inside “Group By” field well:

  • ["getColumnFromGroupBy", 0] - returns array [1, 2, 3, 4, 5, ...]
  • ["getColumnFromGroupBy", 1] - returns array [1, 1, 1, 1, 1, ...]
  • ["getColumnFromGroupBy", 2] - Doesn’t make sense, as there is only two columns in the “Group By” field well.

getColumnFromValue does the same, but its index is limited to the columns inside “Value” field well:

  • ["getColumnFromValue", 0] - returns array [[1674, 7425, 4371, ...]]
  • ["getColumnFromValue", 1] - Doesn’t make sense. There is only one column in the “Value” field well
  • ["getColumnFromValue", 2] - Doesn’t make sense for the same reasons.

Makes sense?

3 Likes

Yes, makes sense. One more question for clarification, does “getColumn” go in order of the fields from top to bottom, Group By → Value, every time (day_of_month, day_of_week, cancelled)?

Hi @ineedqshelp,
From my understanding, yes you are correct in your thinking for the order.

Let us know if you have any additional questions pertaining to your topic. If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!