visualdatatools.com Forum Index visualdatatools.com
Discussion for DataTank and DataGraph
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Labels don't align with values in a Bars command

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Bug Report
View previous topic :: View next topic  
Author Message
Mike



Joined: 05 May 2008
Posts: 278
Location: Christchurch, New Zealand

PostPosted: Tue May 14, 2013 1:21 am    Post subject: Labels don't align with values in a Bars command Reply with quote

I have some data that looks like this:

Code:
#    Value1    Value2   
1    100                     
2     70                   
3     60
4                 35
5                 25
6                 15
7                 10


I plot two Bar commands. Each has the locations of the bars as the # column, while one takes its values from the Value1 column and the other from Value2. Each also shows labels, from Value1 and Value2 again.

Until recently, this worked fine. But now, on opening the file, the labels for the second series don't show properly anymore.

It seems that the labels are not being matched with their respective values by their shared row #. I.e. in the second plot, the first bar would have a location of 4 (the row number), a length of 35, but a label which is blank (instead of also being 35). It seems that what is happening is that the labels get assigned to bars starting at the first row, rather than the row which matches the row the value itself is in.

So in this case, the bar from row 7 has a value of 10, but gets a label of 35. That is, it is the fourth bar in this series, but the label it gets is the fourth in the column.

Make sense?

Regards,

Mike
Back to top
View user's profile Send private message Visit poster's website
David
Site Admin


Joined: 25 Nov 2006
Posts: 1967
Location: Chapel Hill, NC

PostPosted: Tue May 14, 2013 10:06 am    Post subject: Reply with quote

Fixed this and uploaded a new beta.

I've changed the Bar command quite a bit recently. I removed one feature (Left Stairs) since that was both a bad visualization method and made moving forward a lot trickier.

The main improvements are that I now support a mask feature and you can vary the color of the bars. The table you included was the way to implement bar graph which had one color for the first three bars and another for the remaining 4. After the change you have more options.

1 - You can use the mask command to draw the first three rows or the remaining four. That means that you don't have to split the column into Value1 and Value2.

2 - You can use a color scheme to assign different colors to values above 50 and below 50. Then you can do this in a single command with a single column.

But all of those changes can lead to rough edges, and it is great that they are pointed out.

David
Back to top
View user's profile Send private message Send e-mail
Mike



Joined: 05 May 2008
Posts: 278
Location: Christchurch, New Zealand

PostPosted: Tue May 14, 2013 7:07 pm    Post subject: Reply with quote

Thanks for the prompt change. I may re-work that file to work with a single column as it will be easier to maintain.

Cheers,
Mike
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Bug Report All times are GMT - 3 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group