How to add the label of a Primefaces chart?

user1335654

I have a JSF line chart that uses PrimeFaces. I want to add labels to both x-axis & y-axis eg Year & Populations. I have used showLabel:true but its not working.The is code,

   <p:lineChart id="chart" value="#{chartBean.linearModel}" xaxisAngle="-90">
       <f:convertDateTime pattern="d-M-yyyy"/>
    </p:lineChart>


function phaseChartExt() {
     this.cfg.axes = {
              xaxis: {
                  renderer: $.jqplot.DateAxisRenderer,
                  rendererOptions: { tickRenderer: $.jqplot.CanvasAxisTickRenderer },
                  tickOptions: {
                      showLabel:true,
                      showGridline: true,
                      formatString: '%H:%M',
                      angle: -90                        
                 }         
             }
             yaxis: {
                 renderer: $.jqplot.DateAxisRenderer,
                 rendererOptions: { tickRenderer: $.jqplot.CanvasAxisTickRenderer },
                 tickOptions: {
                     showLabel:true,
                     showGridline: true,
                     formatString: '%H:%M',
                     angle: -90                        
                }         
    }
         }
}
Rafa Hernández

Try to use

xaxisLabel="Year" yaxisLabel="Populations"

 <p:lineChart id="chart" value="#{chartBean.linearModel}" xaxisAngle="-90" xaxisLabel="Year" yaxisLabel="Populations">
       <f:convertDateTime pattern="d-M-yyyy"/>
    </p:lineChart>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Remove label in Primefaces Line Chart

In high chart how to add event for label click

How to add additional data label to donut chart

How to add label square to Bar Chart using Chart.js

How to add label in chart.js for pie chart

How to add label values and error bars to a JFreeChart line chart?

how to add label to selected lines in a chart created by geom_line?

How to add Label at customized position in XY chart in chartdirector in C++?

How can I add a label with value to every point of the chart?

Plotly (python) : How to add more then one text label in a bar chart

In ggplot2 how to add angled label to donut chart

How to add text label to R plotly aggregate chart?

Add Extra label in a pie chart

Add HTML to label of bar chart - chart js

How to label the Pie chart?

How to set ChartJS Axis label with PrimeFaces

How to add an image to a primefaces menubar?

How to add datalabels to chartJS on Primefaces

How to add submenu to menuButton in PrimeFaces?

Apache poi add label in excel chart

Add label in the middle of Google pie chart donut

Add gap between label and radar chart in matplotlib

Add total label ChartWrapper Google Chart

How do I add a character object to a numeric label in ggplot2: adding the % symbol to the percentage label in a bar chart

How do I add a label for the x-axis in the tooltip of a Google line chart?

How to add a label to each stratum to display additional information in a rank-change chart using alluvial in R?

How to add an input box next to Chart.js y axis label?

d3.js: How to add value below the label in donut chart

How to add interactive features (line and label) to a D3 line chart?