- chart对象的JSON = {"name":"Chart 1","x":402,"y":40,"width":480,"height":300,"startRow":2,"startColumn":5,"startColumnOffset":20,"endRow":17,"endColumn":11,"endColumnOffset":20,"isSelected":true,"typeName":"2","chartSpace":{"typeName":"chartSpace","roundedCorners":false,"chart":{"title":{"txPr":{"p":[{"elements":[{"elementType":0,"t":"","rPr":{"latin":{"typeface":"+mn-lt"},"sz":18.
- 67,"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}}],"pPr":{"defRPr":{"latin":{"typeface":"+mn-lt"},"sz":18.67,"b":false,"solidFill":{"schemeClr":{"val":1
- ,"lumMod":[65000],"lumOff":[35000]}}}},"endParaRPr":{}}],"bodyPr":{},"lstStyle":{}},"overlay":false,"spPr":null},"autoTitleDeleted":false,"plotArea":{"axes":[{"axisType":0,"axId":88779187
- ,"delete":false,"majorTickMark":2,"minorTickMark":2,"tickLblPos":2,"axPos":0,"scaling":{"orientation":1},"spPr":{"ln":{"solidFill":{"schemeClr":{"val":1,"lumMod":[15000],"lumOff":[85000]}
- }}},"numFmt":{"formatCode":"General"},"txPr":{"p":[{"elements":[{"elementType":0,"t":"","rPr":{"latin":{"typeface":"+mn-lt"},"sz":12,"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[
- 65000],"lumOff":[35000]}}}}],"pPr":{"defRPr":{"latin":{"typeface":"+mn-lt"},"sz":12,"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}},"endParaRPr":{}}]},"a
- uto":true,"lblOffset":0,"tickMarkSkip":1,"noMultiLvlLbl":true,"AxisGroup":0,"AxisType":0,"crosses":1,"crossAx":75828958},{"axisType":3,"axId":75828958,"delete":false,"majorTickMark":2,"mi
- norTickMark":2,"tickLblPos":2,"axPos":1,"scaling":{"orientation":1},"spPr":{"ln":{"solidFill":{"schemeClr":{"val":1,"lumMod":[15000],"lumOff":[85000]}}}},"numFmt":{"formatCode":"General"}
- ,"txPr":{"p":[{"elements":[{"elementType":0,"t":"","rPr":{"latin":{"typeface":"+mn-lt"},"sz":12,"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}}],"pPr":{"
- defRPr":{"latin":{"typeface":"+mn-lt"},"sz":12,"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}},"endParaRPr":{}}]},"majorGridlines":{"spPr":{"ln":{"solidF
- ill":{"schemeClr":{"val":1,"lumMod":[15000],"lumOff":[85000]}},"w":1},"effectLst":{}}},"AxisGroup":0,"AxisType":1,"crosses":1,"crossBetween":0,"crossAx":88779187}],"chartGroups":[{"chartT
- ype":6,"ser":[{"seriesType":0,"idx":0,"order":0,"val":{"numRef":{"f":"Sheet1!$E$2:$E$5","numCache":{"formatCode":"General"}}},"shape":2,"invertIfNegative":false}],"axId":[88779187,7582895
- 8],"barDir":1,"grouping":1,"gapWidth":150,"varyColors":false,"overlap":-27}],"spPr":{"noFill":true,"ln":{"noFill":true}}},"legend":{"legendPos":4,"txPr":{"p":[{"elements":[{"elementType":
- 0,"t":"","rPr":{"latin":{"typeface":"+mn-lt"},"sz":12,"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}}],"pPr":{"defRPr":{"latin":{"typeface":"+mn-lt"},"sz
- ":12,"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}},"endParaRPr":{}}]}},"plotVisOnly":true},"spPr":{"solidFill":{"schemeClr":{"val":0}},"ln":{"solidFill
- ":{"schemeClr":{"val":1,"lumMod":[15000],"lumOff":[85000]}},"w":1}},"txPr":{"p":[{"elements":[{"elementType":0,"t":"","rPr":{"latin":{"typeface":"+mn-lt"},"b":false,"solidFill":{"schemeCl
- r":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}}],"pPr":{"defRPr":{"latin":{"typeface":"+mn-lt"},"b":false,"solidFill":{"schemeClr":{"val":1,"lumMod":[65000],"lumOff":[35000]}}}},"endPar
- aRPr":{}}]}},"useAnimation":false}
- seriesItem 的JSON = {"chartType":12,"axisGroup":0,"backColor":"accent 3 50","backColorTransparency":0,"border":{"color":"accent 3 50","transparency":0,"width":0},"name":""Series1"","yValues":
- "Sheet1!$E$2:$E$5"}
复制代码
报错信息如下图:
我调用的方法是 util.js 文件中 的chartHelper.applyChartSeriesTheme方法. 报错的代码是 seriesCollection.set(i, seriesItem); 其中需要的 chart 对象 和 seriesItem对象的 json数据在上面给出了.
麻烦看下是什么问题. 已经遇到很多次了. 都无法解决.
|
|