title: Generating custom Axis interval with <p:lineChart>
body: <p>I am building a Web Application Response Monitoring.This will monitor the response time of various web applications.For visual representation of this responses I will use a line chart that will depict the performance of various websites in terms of responses.</p>
  
  <p>For implementing this I am using PrimeFaces <code>&lt;p:lineChart&gt;</code>  component.I am using Prime Face 5.0.</p>
  
  <p><strong>Details Of Graph:</strong>
  <strong>X-axis:This will show the hours in 24 hours format,i.e x axis intervals will be like (0,1,2,3,4,5,..23)</strong> since 24 hours in a day.I am starting with 0 so,max value will be 23.The gap between interval will be of "<strong>1 hour</strong>" </p>
  
  <p><strong>Y Axis:</strong> this will consist of <strong>Response time in milliseconds</strong>.The intervals will be in following format:(<strong>0,5000,10000,15000,20000,25000,...,45000</strong>).The gap between intervals will be "5000".Max value will be 45000 in Y axis.</p>
  
  <p>Below is my managed bean class</p>
  
  <pre><code> @ManagedBean(name = "chartView")
   @ViewScoped
   public class ChartView implements Serializable {
  
  
     private static final long serialVersionUID = 62250444917054924L;
     private LineChartModel lineChartModel;
  
     @PostConstruct
     public void init(){
         createChart();
     }
  
  
     private void createChart(){
        lineChartModel=new LineChartModel();
        lineChartModel.addSeries(initLineChart());
        Axis xAxis=lineChartModel.getAxis(AxisType.X);
        Axis yAxis=lineChartModel.getAxis(AxisType.Y);
        xAxis.setTickInterval("1");
        yAxis.setTickInterval("5000");
      }
  
  
      private LineChartSeries initLineChart(){
        LineChartSeries chartSeries=new LineChartSeries();
        chartSeries.set(0, 10000);
        chartSeries.set(1, 15000);
        chartSeries.set(2, 18000);
        chartSeries.set(3, 12000);
        chartSeries.set(4, 13000);
        return chartSeries;
      }
  
  
      public LineChartModel getLineChartModel() {
         return lineChartModel;
      }
  
  
      public void setLineChartModel(LineChartModel lineChartModel) {
         this.lineChartModel = lineChartModel;
      }
  
  
      public static long getSerialversionuid() {
          return serialVersionUID;
      }
   }
  </code></pre>
  
  <p>here is my xhtml page</p>
  
  <pre><code>   &lt;ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"&gt;
  
      &lt;h:body&gt;
         &lt;h:panelGroup layout="block" id="lineChart_Div"&gt;
           &lt;p:lineChart id="line" value="#{chartView.lineChartModel}" animate="true" maxX="23" minX="0"
             maxY="45000" minY="0" xaxisLabel="Hours" yaxisLabel="Response Time(ms)"/&gt;
         &lt;/h:panelGroup&gt;      
      &lt;/h:body&gt;
    &lt;/ui:composition&gt;
  </code></pre>
  
  <p>Now my problem is data is getting depicted in Graph but the intervals on X axis and Y axis are not been plotted in the way I have mentioned above.<strong>In X-axis intervals appeared like(0.0000,1.6429,3.2857,4.9286,6.5714,... upto 23.0000)</strong>,<strong>but I want it to be in the pattern(0,1,2,3,4,5,6,,7,8,9,...,23)</strong></p>
  
  <p>Likewise <strong>in Y-axis intervals appeared like(0,11250,22500,33750,45000) but I want it to be in the format(0,5000,10000,15000,20000,...,45000).</strong></p>
  
  <p>I think i need to customize the intervals for x axis and Y axis but not finding a proper way to do it.I read about <strong>"extender"</strong> attribute for customizing jqPlot in Prime Faces Chart.But unable to find a solution suitable to my case.</p>
  
  <p>Can anyone provide a any suitable solution to this???
  Thanks in advance.</p>