Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
MarkerXXXImpl and DateTimeDataElementImpl
Simeonov
Hi,
i am facing a strange problem with a chart. If a create a markerranges based on DateTimeDataElementImpl they do not show-up, but based on a NumberDataElementImpl they do show up. The Axis type is DateTime.
Thanks in advance.
Find more posts tagged with
Comments
mwilliams
Can you create a sample report with the sample database showing what you're currently doing that's not working, so I can test on it? Thanks!
Simeonov
Hi,<br />
i did managed to cope with this problem. But now i am facing a new one, if i use the same color for several markers, then only the last one is painted.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
color = ColorDefinitionImpl.create(randomRGB.nextInt(256), randomRGB.nextInt(256), randomRGB.nextInt(256));
while(it.hasNext()) {
elem = it.next();
if(elem.isMarker()) {
date = elem.getDate();
cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.DATE, +1);
startDate = DateTimeDataElementImpl.create(new Date(date.getTime()));
endDate = DateTimeDataElementImpl.create(new Date(cal.getTime().getTime()));
predictorRange = MarkerRangeImpl.create(xAxis, startDate, endDate, color);
predictorRange.getLabel().getCaption().setValue(" ");
}
}
</pre>
<br />
If a add them manually there is no problem.<br />
<br />
Thank you in advance!
mwilliams
It works with all the same color when you add them manually though? So, the color is not the issue? Let me know.