I have a flex line chart. Instead of the default behavior of having to hover over parts of the line to see the data points, is there a way to change the rendering of each point and have them always displayed? (almost like a connect the dots type view).
you will need to set the 'showAllDataTips' property of the LineChart to true e.g.
<mx:LineChart id="linechart" height="100%" width="45%"
paddingLeft="5" paddingRight="5"
showDataTips="true" dataProvider="{expensesAC}"
showAllDataTips="true">
That will display all of the data tips for that chart
did you have any answer as of now? I also want to show the dots in the LINE chart
Try this
<mx:LineChart>
<mx:series>
<mx:LineSeries dataProvider="{arr1}">
<mx:itemRenderer>
<mx:Component>
<mx:CrossItemRenderer/>
</mx:Component>
</mx:itemRenderer>
</mx:LineSeries>
</mx:series>
</mx:LineChart>
you can change CrossItemRenderer with DiamondItemRenderer or any other
For an example look at the bottom of this page: Using strokes with chart controls
As posted in response to another question on the same subject...
If you're using <mx:LineSeries>
, then set the following property:
itemRenderer="mx.charts.renderers.CircleItemRenderer"
When constructing a LineSeries in ActionScript, then set the itemRenderer style on your LineSeries object before adding to the series array:
lineSeries.setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.CircleItemRenderer));
Don't forget to...
import mx.charts.renderers.*;
You don't have to stick to the circle item renderer either, you can use any of the item renderers found in the renderers package.
I am constructing the line series using ActionScript and also using line mx:lineStroke in MXML to change the color of the line. The problem is that the CircleItemRenderer I am using with this line does not take the color of the line, instead takes some default color. Is there a way that, say orange triangles shown for a blue line can be changed to blue triangles, and thus being consistent with the line color.
Thanks.
I am doing same thing but in case of "fill" and "stroke"
lineSeries.setStyle("fill",new ClassFactory(SolidColorClass)); lineSeries.setStyle("stroke",new ClassFactory(StrokeClass));
where SolidColorClass and StrokeClass are my own custom classes
it's giving me following error TypeError: Error #1034:Type Coercion failed: cannot convert mx.core::ClassFactory@2b22dc1 to mx.graphics.IStroke.