I'm trying to create column charts with negative values, but did not find any config that really works. I tried the followed:
Minimum set to 0: When the chart have negative and positive values, the negative value column did not show. When the chart have only negative values the columns display to "up" not dot "down", start at 0 and go up with negative values.
Minimum not set:
The negative values column display fine to down, but positive columns stay at same size. If i set for example: 1000, -10, 100, the value 1000 and 100 get same column size. If I set only positive values the same thing, columns at same size.
Minimun set to 0 and adjustMinimumByMajorUnit set to true:
The minimum always start with a negative value, dont matter if the values is only positive. When the negative value is too big, the Y axis dont adjust down, the column display for down, but not with the right size.
There is any way to get this working, with another config or with change in source? Or something like check my values, get the lowest, change the "minimum" and redraw chart? Or any other workaround? Thanks for now!
PS: I saw that version 2 maybe have this issued solved, I tried change the charts to 2 but it is not compatible with my touch 1.0 app.
@andresantos a good workaround to this is you always check us data value n get a minimum and maximum value of the store's data, and
if all the values are positive set the minimum config option of series to '0'
if all the values are negative set the maximum config option of series to '0'.
if the values are a mix of both the set the maximum as max of data n minimum as min of data.
as far as i have looked into the sencha code the is no config option for now and also the adjustMaximumbyMajor/adjustMinimumByMajor does not do good with bar sizing.
Yes, but my data is dynamic, filtered from database. So.. each new query can have different minimum and maximum.
The chart dont have a option to "change" the minimum and maximum settings after it was rendered first time, but looking into source code I can got this workaround: