Yuriy Tymchuk wrote:
Ok, I’ve made some progress in this direction. For now
on I’ve spotted 3 bottlenecks of plotting non-number values.
1) setMaxAndMinXValues
self maxXValue: (self xValues max max: 0).
self minXValue: (self xValues min min: 0)
max: 0 and min: 0 are ruining things a bit. It will be nice to rethink this part. I’m not
sure that it’s a good idea to have 0 all the time. Eg. I’d like to plot something in range
10100..10200 and as the result my data will take a very small place. Removing max: 0 and
min: 0 solves the problem but they were put there for some reason.
Automatic range setting based on the data should be default, so perhaps
the following should be considered, so that if a user previously
manually force a #maxXValue: that remains set, but otherwise it defaults
to range of data.
setMaxAndMinXValues
self maxXValue ifNil: [ self maxXValue: self xValues max ]
self minXValue ifNil: [ self minXValue: self xValues min ]
(I am missing some context so probably my comment doesn't properly align
with your case. Just sharing my thoughts as they come.)
cheers -ben