export const lineAndBar = `
const obj = {
    dimensions: ['product', 'data1'],
    source:[]
  }
  if(res.type === 'bar' || res.type === 'line'){
        res.data.forEach((item,index) => {
            obj.source.push({
                product: res.xData[index] ,
                data1: item,
            })
        });
  }else if(res.type === 'pie'){
    res.data.forEach((item)=>{
        obj.source.push({
            product:item.name,
            data1:item.value,
        })
    })
  }

return obj `
