pablofrommars / GGNet

GG.Net Data Visualization
https://pablofrommars.github.io
MIT License
80 stars 11 forks source link

limit axis to at least zero or higher is not possible, if max limit is not set and highest data value is 0 #11

Closed jan-ai closed 2 years ago

jan-ai commented 4 years ago

If a chart should show positive values only, but the max limits is unknown and should not be set, the chart shows a range of -0,05 to +0,05 if data values are 0.

The reason is

SetRange(Limits.min ?? _min ?? 0.0, Limits.max ?? _max ?? 0.0);

in function Set of class Extended

and the implementation of SetRange in class Position

if (min == max)
            {
                Range = (
                    min - 0.05,
                    max + 0.05
                );
            }
jan-ai commented 3 years ago

this code was already removed in last version at https://github.com/jan-ai/GGNet ... can be closed