When specifying secondary yScale for a series, resulting series names in the timechart legend get truncated even though there is plenty of free space. The truncation does not happen for the same names when using primary yScale. The use of -keyField doesn't affect truncation either way.
However, sometimes you can use much longer names without them getting chopped off, on primary or secondary axis, so I cannot narrow down the reproduction scenario.
This Juttle does reproduce the problem:
(
emit -limit 100 -from :today: -every :minute: | put name = "Close", value = 100;
emit -limit 100 -from :today: -every :minute: | put name = "Volume", value = 40;
)
| view timechart
-series [
{name: 'Close', geom: 'line', yScale: 'primary'},
{name: 'Volume', geom: 'bars', yScale: 'secondary'}
];
Same but on primary yScale, no truncation:
(
emit -limit 100 -from :today: -every :minute: | put name = "Close", value = 100;
emit -limit 100 -from :today: -every :minute: | put name = "Volume", value = 40;
)
| view timechart
-keyField 'name'
-series [
{name: 'Close', geom: 'line', yScale: 'primary'},
{name: 'Volume', geom: 'bars', yScale: 'primary'}
];
Here is an example with much longer name, but using primary axis, and still no truncation:
(
emit -limit 100 -from :today: -every :minute: | put name = "Close", value = 100;
emit -limit 100 -from :today: -every :minute: | put name = "Volume (Such Long Name)", value = 40;
)
| view timechart
-series [
{name: 'Close', geom: 'line', yScale: 'primary'},
{name: 'Volume (Such Long Name)', geom: 'bars', yScale: 'primary'}
];
But there must be more to this, because here is code that uses long names for both axes and no truncation happens:
(
emit -limit 100 -from :today: -every :minute: | put name = "Closing", value = 100;
emit -limit 100 -from :today: -every :minute: | put name = "Volume (Such Long Name)", value = 40;
)
| view timechart
-series [
{name: 'Closing', geom: 'line', yScale: 'secondary'},
{name: 'Volume (Such Long Name)', geom: 'bars', yScale: 'primary'}
];
When specifying secondary yScale for a series, resulting series names in the timechart legend get truncated even though there is plenty of free space. The truncation does not happen for the same names when using primary yScale. The use of -keyField doesn't affect truncation either way.
However, sometimes you can use much longer names without them getting chopped off, on primary or secondary axis, so I cannot narrow down the reproduction scenario.
This Juttle does reproduce the problem:
Same but on primary yScale, no truncation:
Here is an example with much longer name, but using primary axis, and still no truncation:
But there must be more to this, because here is code that uses long names for both axes and no truncation happens: