At the beginning, if I create a bar chart the values set with
Code: Select all
dataset.setValue(tempMoney, "Money", tempName);
1. Make it show only 2 decimal places.
2. Make it start from 0.00 and then only go up, as I will not have any negative values.
If I later on change some of the values it does show only from 0.00 to the highest new value with only 2 decimal places.
I have tried with the following:
Code: Select all
while( i < (workerArray.size()) )
{
tempName=workerArray.get(i).getName();
tempMoney=workerArray.get(i).getMoney();
if (tempMoney == 0.00)
{
dataset.addValue(0, "Money", tempName);
}
else
{
dataset.setValue(tempMoney, "Money", tempName);
}
i++;
}