-
14 Aug 2012 1:48 PM #1
Images on scatter chart
Images on scatter chart
I'm trying to implement a scatter chart with icon/image next to each point.
I can have it so that it has the same icon/image for every point by setting marker to be my image, however i want the ability to make every point have different icon/image.
I followed the Image chart example that uses BarSeries and it works.
When I try to apply the same to the scatter series SprieRenderer is not being called for some reason. It's not getting into the spriteRenderer function.
Does anybody know what's going on?
Code:SeriesRenderer<DataPoint> imageRenderer; imageRenderer= new SeriesRenderer<DataPoint>() { @Override public void spriteRenderer(Sprite sprite, int index, ListStore<DataPoint> store) { String property = store.get(index).getProperty(); System.out.println("Property: " + property); if (property.equals("Start Point")) { ((ImageSprite) sprite).setResource(Resources.IMAGES.episodeStartIcon()); } else if (property.equals("Notification Point")) { ((ImageSprite) sprite).setResource(Resources.IMAGES.notificationIcon()); } else if (property.equals("End Point")) { ((ImageSprite) sprite).setResource(Resources.IMAGES.episodeEndIcon()); } else { ((ImageSprite) sprite).setResource(Resources.IMAGES.transparentImg()); } sprite.redraw(); } }; config.setSpriteRenderer(imageRenderer); iconSeries.setShownInLegend(false); iconSeries.setLabelConfig(config); chart.addSeries(iconSeries);
-
20 Aug 2012 10:22 AM #2
Thanks for the report. There appears to be an oversight in calling the label sprite renderer in ScatterSeries. Until this is fixed using the renderer on the scatter series directly will work for markers.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTGWT-2387
in
3.0.2.


Reply With Quote