From: Sameera Gayan Date: 2008-07-04T17:07:46+09:00 Subject: Re: creating dynamic hashmap Robert Klemme wrote: > On 04.07.2008 07:03, Sameera Gayan wrote: >> any reply will greatly appriciated... > Can you be more specific about your problem? What kind of user input do > you expect? How do you want it to be translated into a Hash? etc. > > robert Hi Robert, Thank you for your reply, My problem in like this, I have a graph to display the crude oil price fluctuation with $. I'm using "gruff" to generate graphs. This graph should generate for a given date range. In the x-axis of the graph i want to show the date range. In 'gruff' it gets x-axis labels as a hash Ex : g.labels = { 0 => 'Mon', 2 => 'Wed', 4 => 'Fri', 6 => 'Sun' } So i want to dynamically create this hash map. Inside a loop. (so i can loop the dates and create the x-axis depending on the users date range) ultimate hash format should be { 0 => 'Mon', 2 => 'Wed', 4 => 'Fri', 6 => 'Sun'} so that i can use it as g.labels = hash_lables hope i make myself clear. thankx for any reply .. cheers sameera -- Posted via http://www.ruby-forum.com/.