user2012818
user2012818

Reputation: 1

How to add horizontal scrollbar in BarChart using primefaces 3.2

How to add horizontal scrollbar in BarChart using primefaces 3.2, my x axes time dimension shows 52 weeks or 8 weeks week over week data, it is based on what filter value user has selected

here my question is I want to fix the size of bar chart with width 800 & height as 300px but when I select 52weeks bar chart, it shows very thin lines of bars where is shows more than 130 bars and user can not see bar properly, Is there any way we can add scrollbar in Bar chart so the overall width is same but we can scroll all the 52week data with proper bar width display.... I would appreciate if someone can guide on how to add scrollbar to barchart

   <p:panel  id="pnl1" header="Trend" style="width:930;height:360px;"  toggleable="true" closable="true" toggleSpeed="500" closeSpeed="500" widgetVar="panel1">


<p:barChart id="BarChart1"  value="#{Test1.chartModel}"  widgetVar="bar1" legendPosition="n" barPadding="5"   barMargin="10"  style="width:800px;height:300px;" 
title="week over week trend"  />
 </p:panel>

Upvotes: 0

Views: 2082

Answers (1)

gokhansari
gokhansari

Reputation: 2439

There is not any scrolling solution in this component, but you can put it in a div OR there is an other suggestion to solve this problem; Try this zooming example: jq plot zooming

Good Luck!

Upvotes: 0

Related Questions