Plotly js transforms with multiple groupby

Applying multiple groupby using transforms on plotly scatter plot . The legends are shown for both the groups.
How to disable legend for any particular group (to avoid duplicate legend names).

Example snippet is given below:

d3.csv(“https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv”, function(err, rows){

function unpack(rows, key) {
return rows.map(function(row) { return row[key]; });
}

var data = [{
type: ‘scatter’,
mode: ‘markers’,
x: unpack(rows, ‘lifeExp’),
y: unpack(rows, ‘gdpPercap’),
text: unpack(rows, ‘continent’),
marker: {
size: unpack(rows, ‘pop’),
sizemode: “area”,
sizeref: 200000
},
transforms: [
{
type: ‘groupby’,
groups: unpack(rows, ‘year’),
styles: [
{target: ‘1952’, value: {marker: {symbol: ‘circle’}}},
{target: ‘1975’, value: {marker: {symbol: ‘square’}}},
{target: ‘1962’, value: {marker: {symbol:: ‘triangle’}}},
]
}, {
type: ‘groupby’,
groups: unpack(rows, ‘continent’),
styles: [
{target: ‘Asia’, value: {marker: {color: ‘red’}}},
{target: ‘Europe’, value: {marker: {color: ‘blue’}}},
{target: ‘Americas’, value: {marker: {color: ‘orange’}}},
{target: ‘Africa’, value: {marker: {color: ‘green’}}},
{target: ‘Oceania’, value: {marker: {color: ‘purple’}}}
]
}]
}]

var layout = {
yaxis: {
type: ‘log’
}
}

Plotly.newPlot(‘myDiv’, data, layout)
});