> > to have column with the maximum lenght (in my case 580 pixels). > > What is length refer to ? I mean, the width or height ?
Is this important? Well, my columns start left an go to the right side. So this pixel value is third value in the "filledRectangle" data. filledRectangle(100,90,$column_lenght+100,100,$black); > > All the other values should be drawn in relation to that. > So what is the relation ? Is that the "length" is $max_percent_value or what > ? Perhaps I shoud describe it with some values. If I get for examples the percent values 20%, 10% and 5% and the maximum lenght is not 580 but 500 pixel the 20%-value should get a column with the length of 500 pixels, the 10%-value should get a column with 250 pixels, and the 5%-values 125 pixels. Is this description of my problem better to understand? > > I thougt I can make a factor and then multiply all the > > other values with this on to get this result. My code looks like > > this: > > > > my $factor = (580/$max_percent_value) > > > > my $column_lengt_a = $percent_value_a * $factor; > > my $column_lengt_b = $percent_value_b * $factor; > > my $column_lengt_c = $percent_value_c * $factor; > > ..... > > > > My Prob: > > I does not work every time. On some data input the columns are bigger than > 580 pixel. > > > > I also try, calculate without storing the factor in a string > > (avoid mistakes by rounding...I don't know) like this: > > > > my $maximum_pixel = 580; > > my $column_lengt_a = $percent_value_a * $maximum_pixel; > > > > > > What to do? > > > > > > cu > > > > Konrad > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]