line_char2={
const wrapper = html`<div style="text-align: center; width:${bar_width}px"></div>`;
const container = html`<div style="height: 420px;width:630px;text-align: center"></div>`
wrapper.appendChild(container);
yield wrapper;
const dualAxes = new G2Plot.DualAxes(container, {
data: [data_use3.filter(d=>d.Country=="Namibia"), data_use3.filter(d=>d.Country=="Botswana")],
renderer:'svg',
appendPadding:10,
limitInPlot:true,
xField: 'Year',
yField: ['od', 'od'],
yAxis: {
'od': {
max:100,
min:0
},
'od': {
max:100,
min:0
}
},
geometryOptions: [
{
geometry: 'line',
smooth: false,
seriesField: 'Category',
lineStyle: {
lineWidth: 3,
lineDash: [5, 5],
},
label: {
formatter: (datum) => {
return `${datum.od.toFixed(1)}%`;
},
},
interactions: [{ type: 'element-highlight-by-color' }, { type: 'legend-highlight' }],
},
{
geometry: 'line',
seriesField: 'Category',
lineStyle: {
lineWidth: 4,
opacity: 0.5,
},
label: {
formatter: (datum) => {
return `${datum.od.toFixed(1)}%`;
},
},
interactions: [{ type: 'element-highlight-by-color' }, { type: 'legend-highlight' }],
},
],
});
dualAxes.render();
}