TypeError: Error #1034: forced conversion type failed: "0.49" cannot be converted to mx. graphics. ABAQUS .,
1. Error description
TypeError: Error #1034: forced conversion type failed: "0.49" cannot be converted to mx. graphics. ABAQUS. At mx. charts. series: LineSeries/updateDisplayList () [E: \ dev \ 4.0.0 \ frameworks \ projects \ datavisualization \ src \ mx \ charts \ series \ LineSeries. as: 1091] at mx. core: UIComponent/validateDisplayList () [E: \ dev \ 4.0.0 \ frameworks \ projects \ framework \ src \ mx \ core \ UIComponent. as: 8531] at mx. managers: LayoutManager/validateDisplayList () [E: \ dev \ 4.0.0 \ frameworks \ projects \ framework \ src \ mx \ managers \ LayoutManager. as: 663] at mx. managers: LayoutManager/doPhasedInstantiation () [E: \ dev \ 4.0.0 \ frameworks \ projects \ framework \ src \ mx \ managers \ LayoutManager. as: 718] at mx. managers: LayoutManager/doPhasedInstantiationCallback () [E: \ dev \ 4.0.0 \ frameworks \ projects \ framework \ src \ mx \ managers \ LayoutManager. as: 1072]
2. Error cause
<? Xml version = "1.0" encoding = "UTF-8"?> <S: Application xmlns: fx = "http://ns.adobe.com/mxml/2009" xmlns: s = "library: // ns.adobe.com/flex/spark" xmlns: mx = "library: // ns.adobe.com/flex/mx "width =" 100% "height =" 100% "fontSize =" 12 "fontFamily =" "> <s: layout> <s: basicLayout/> </s: layout> <fx: Script> <! [CDATA [import mx. charts. chartItem; import mx. charts. chartClasses. series; import mx. charts. series. items. lineSeriesItem; import mx. collections. arrayCollection; import mx. events. flexEvent; import mx. graphics. stroke; [Bindable] // bind line chart data to private var lineArray: ArrayCollection = new ArrayCollection ([{seasons: "Spring", rate: "0.48677" },{ seasons: "Summer", rate: "0.122343232" },{ seasons: "Autumn", rate: "0.5657645" },{ seasons: "Winter", rate: "0.67484889"}]);/*** set the number of digits in the line chart ratio */public function dataFunction (series: Series, item: Object, fieldName: String ): object {var temp: Number = item. rate; var number: String = formatter. format (temp); return number;} public function myFillFunction (item: ChartItem, index: Number): String {var curItem: LineSeriesItem = LineSeriesItem (item); var num: string = formatter. format (curItem. yNumber); return num;}]> </fx: Script> <fx: Declarations> <mx: numberFormatter id = "formatter" precision = "2" rounding = "up"/> </fx: Declarations> <mx: VBox width = "100%" height = "100%" paddingBottom = "10" paddingLeft = "10" paddingRight = "15" paddingTop = "10" horizontalAlign = "center"> <mx: lineChart id = "line" width = "100%" height = "90%" dataProvider = "{lineArray}" showDataTips = "true"> <mx: horizontalAxis> <mx: categoryAxis categoryField = "seasons" displayName = ""/> </mx: horizontalAxis> <mx: horizontalAxisRenderers> <mx: axisRenderer placement = "bottom" tickLength = "1" tickStroke = "{new Stroke (0xFF0000, 1)}" axisStroke = "{new Stroke (0xFF0000, 1 )} "> <mx: axis> <mx: LinearAxis id =" bottomAxis "/> </mx: axis> </mx: AxisRenderer> </mx: horizontalAxisRenderers> <mx: verticalAxisRenderers> <mx: AxisRenderer placement = "left" tickLength = "1" tickStroke = "{new Stroke (0xFF0000, 1)}" axisStroke = "{new Stroke (0xFF0000, 1)} "> <mx: axis> <mx: LinearAxis id =" leftAxis "/> </mx: axis> </mx: AxisRenderer> </mx: verticalAxisRenderers> <mx: series> <mx: lineSeries verticalAxis = "{leftAxis}" displayName = "ratio" xField = "seasons" yField = "rate" fillFunction = "myFillFunction"/> </mx: series> <mx: filters> <fx: Array/> </mx: filters> </mx: LineChart> <mx: Legend dataProvider = "{line}"/> </mx: VBox> </s: Application>
3. Solution
TypeError: Error #1010: the term is not defined yet, and no attribute is an Error. 'generally, when
Generally, undefined variables and methods are used, such:
Var a: uint = 0;
B = a + 3; this B is not defined, so an error occurs!
Btn. addEventListener (MouseEvent. CLICK, A); only method B in the Code does not have method A, so an error occurs!
Function B (e: MouseEvent): void {
}
TypeError: Error #1010: the term has not been defined and no attribute exists.
A = a + B indicates that the result obtained by a + B is assigned to.
Once executed, a accumulates B. You need to look at a = (a + B), rather than (a = a) + B. Why ......
You probably do not have the foundation for programming. This is the most basic.