TextView textView = blip.getDocument();
for (Element element : textView.getElements(ElementType.IMAGE)) {
Image image = (Image)element;
if (image.getUrl().contains("Poll%20Distribution")) {
textView.replaceElement(textView.getPosition(image), distributionChart);
} else if (image.getUrl().contains("Poll%20Participation")) {
textView.replaceElement(textView.getPosition(image), participationChart);
}
}
}