Problem WIth DataUtilities (and a possible fix)

A discussion forum for the Eastwood Chart Servlet.
Locked
KevinK
Posts: 1
Joined: Wed Feb 04, 2009 8:49 pm

Problem WIth DataUtilities (and a possible fix)

Post by KevinK » Wed Feb 04, 2009 8:56 pm

In DataUtilities/parseTextData
there are 3 places where series.add is done, but only one of those places does a check against a value <0 (which should add in a null)

My fix was to duplicate the <0 checking logic the other 2 cases.

The problem showed up when parsing a datastring like this:
t:1,2,3,4,-1
or
t:1,2,3,4|-1,4,5,6

a -1 in the middle of a series was fine, but at then end or immediately after a "|" would put a -1 in the dataseries, not a null.

I can include a "diff" if this is not clear.

Thanks
-Kevin

Locked