public final List<Double> generateValueAxisMarkPositions(double minData, double maxData, int segmentsNumber) {
        List<Double> result = new ArrayList<Double>();
        double step = calculateValueAxisStepInDataScale(minData, maxData);
        double dataDistance = getDataDistance(maxData, minData);
        double yAxisVal;

        if (maxData < 0) {
            yAxisVal = minData;
            while (yAxisVal < 0) {
                result.add(yAxisVal);
                yAxisVal += step;
            }
            result.add(0.0);
        } else if (minData > 0) {
            yAxisVal = 0.0;
            while (yAxisVal < maxData) {
                result.add(yAxisVal);
                yAxisVal += step;
            }
            result.add(maxData);
        } else {
            int segN = segmentsNumber;
            double posRel = maxData / dataDistance;
            int posSegN = (int) (segN * posRel);
            step = maxData / posSegN;
            double threshold = Math.abs(step)/2;
            yAxisVal = -step;
            while (yAxisVal > minData) {
                result.add(yAxisVal);
                yAxisVal -= step;
            }
            if (Math.abs(minData - yAxisVal) <= threshold) {
                result.add(minData);
            }
            /*if(result.get(result.size()-1).doubleValue()!=minData){
                result.add(minData);
            }*/
            Collections.reverse(result);
            yAxisVal = 0.0;
            while (yAxisVal < maxData) {
                result.add(yAxisVal);
                yAxisVal += step;
            }
            if (Math.abs(yAxisVal - maxData) <= threshold) {
                result.add(maxData);
            }
            /*if(result.get(result.size()-1).doubleValue()!=maxData){
                result.add(maxData);
            }*/

        }
        return result;
    }