Package kg.apc.charting

Examples of kg.apc.charting.CubicSpline


   @Override
   protected void postPaintRow(AbstractGraphRow row, Graphics2D g2d) {
      if(chartSettings.getLineWidth() == 0) return;

      if (row.size() >= 3) {
         CubicSpline cs = new CubicSpline(row);
         long minX = row.getMinX();
         long maxX = row.getMaxX();

         double step = (double)(maxX - minX) / splineLinesCount;
        
         double currentX = minX;
        
         while (currentX <= maxX) {
            x = chartRect.x + (int) ((currentX - minXVal) * dxForDVal);
            int yHeight = (int) ((cs.interpolate(currentX) - minYVal) * dyForDVal);
            y = chartRect.y + chartRect.height - yHeight;

            //prevent out of range
            if (y < chartRect.y) {
               y = chartRect.y;
View Full Code Here

TOP

Related Classes of kg.apc.charting.CubicSpline

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.