Jump to content
Changes to the Jaspersoft community edition download ×

How to let user change measure in HTML5 bar chart?


ebz

Recommended Posts

I have a report were I need a bar chart to display some hourly sales data.

 

The report have have some input controls so that the user can filter the dataset, e.g see data for a specific period. The user should also be able to decide which measures he want to see in the bar chart, being for instance sales amont per hour or number of sales per hour.

 

I was thinking I could use an input control for which measure to display. So when designing the bar chart I tried to add a measure that has the value expression $F{$P{MeasureType}} where MeasureType is my input control (a list with  same values as the fields from the dataset in the report), but I get that this is not a valid expression. Is there a way the user could decide which measure to see?

 

I was also thinking that perhaps I could add one measure for sales amount, one for number of sales and so on (16 in total) and hide all except one of the group members. So in the example under I would like only the red columns (First) to be visible, but the user could click on the Second and Third labels to see these columns. Is that possible? It seems like all measures are visible in the chart by default.

 

report_example.png.11ffeeb7822af5fef8dd8fde4e011e51.png

 

I am using JasperSoft Studio professional. Tried HTML5 chart.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...