{
const axisOptions = {
zIndex: 1,
line: true,
titleTransform: "translate(-50%, 0) rotate(-90)",
titlePosition: "right"
};
return g2({
type: "line",
paddingLeft: 40,
data,
encode: {
position: ["Continent", "LifeExpectancy", "Population", "GDP"],
color: "Continent"
},
coordinate: { type: "parallel" },
style: { strokeOpacity: 0.8 },
axis: {
position: axisOptions,
position1: axisOptions,
position2: { ...axisOptions, labelFormatter: "~s" },
position3: { ...axisOptions, labelFormatter: "~s" }
}
});
}