title: draw horizontal line in primeFaces chart
body: <p>i am trying to draw horizontal line for show max and min trend in my primeFaces line chart but cannot understand ho to do there is my xhtml code:</p>
  
  <pre><code>          &lt;div align="center"&gt;
                                  &lt;p:outputPanel id="fuelAnalysisPanel"&gt;
  
    &lt;p:chart type="line" model="#{generatorDataLogReportBean.animatedModel2}" style="width:95%;"  widgetVar="fuelChart"/&gt;
                                      &lt;br/&gt;
  
                                  &lt;/p:outputPanel&gt;
                              &lt;/div&gt;
  </code></pre>
  
  <p>and my java class code is:</p>
  
  <pre><code> private void createAnimatedModelsForFuel(ArrayList&lt;Param&gt; dataLog) {
          animatedModel2 = initLinearModelForFuel(dataLog);
          animatedModel2.setTitle("Fuel Graph (%)");
          animatedModel2.setAnimate(true);
          animatedModel2.setLegendPosition("se");
  
          animatedModel2.setSeriesColors("D42F36");
          Axis yAxis = animatedModel2.getAxis(AxisType.Y);
          yAxis.setMin(0);
          yAxis.setMax(100);
          yAxis.setLabel("Percentage %");
  
      }
  
      private LineChartModel initLinearModelForFuel(ArrayList&lt;Param&gt; dataLog) {
          LineChartModel model = new LineChartModel();
  
          LineChartSeries series1 = new LineChartSeries();
          series1.setLabel("Fuel%");
          int i = 1;
          String dt = "";
          //int size = dataLog.size()-1 ;
  
          /*        for (; size &gt;= 0; size--) {                        
           if (dataLog.get(size) instanceof VT12Param) {
  
  
  
           series1.set(i++, ((VT12Param) dataLog.get(size)).getActualFuelPercent());
  
           } 
           }
           */
          for (Param p : dataLog) {
              if (p instanceof VT12Param) {
                  dt = sdf2.format(((VT12Param) p).getDateTime().getTime());
                  series1.set(dt, ((VT12Param) p).getActualFuelPercent());
  
              } else if (p instanceof T20Param) {
                  dt = sdf2.format(((T20Param) p).getDateTime().getTime());
                  series1.set(dt, ((T20Param) p).getActualFuelPercent());
  
              }
          }
  
          //model.setDatatipFormat("%s, %s");
          model.addSeries(series1);
  
          DateAxis axis = new DateAxis("Dates");
  
          axis.setTickAngle(-30);
          model.getAxes().put(AxisType.X, axis);
  
          //axis.setMax(sdf.format(toDate.getTime()));
          axis.setTickFormat("%b %#d, %H:%M"); //%b %#d, %#I %p // %b %#d, %#I:%M %p
  
          if(dataLog.size() &lt; 500){
                   axis.setTickInterval(dataLog.size()+"00000");
              }
              else{
              axis.setTickInterval(dataLog.size()+"0000");
              }
  
          model.setLegendCols(15);
          model.getAxes().put(AxisType.X, axis);
          // model.setZoom(true);
  
          return model;
      }
  </code></pre>
  
  <p>and i want horizontal line like this these blue lines:
  <a href="https://i.stack.imgur.com/kNk6j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kNk6j.png" alt="enter image description here"></a></p>