Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

lubicz99
Valued Contributor

Change Line Chart to Bar based on condition

I have a line chart that sometimes only has one data point depending on which year or years are selected as my dimension.

I want the chart to automatically change to a bar chart when there is only one data point and be a line chart when more than one year is selected.

I do now want to create a separate chart, nor do I want to hit a button to make the change.   I want to write a condition that will change the chart automatically as my end user works in the production app.

Hope someone has done this already and can help.

Thanks,

line chart with 1 data point.PNG

1 Solution

Accepted Solutions
jsakalis
New Contributor III

Re: Change Line Chart to Bar based on condition

How about the attached method.

It conditionally shows a line or bar chart based on 1 or not 1 year.

3 Replies
jsakalis
New Contributor III

Re: Change Line Chart to Bar based on condition

How about the attached method.

It conditionally shows a line or bar chart based on 1 or not 1 year.

lubicz99
Valued Contributor

Re: Change Line Chart to Bar based on condition

That looks like a good option.  Let me play with it and see how it works in my app

lubicz99
Valued Contributor

Re: Change Line Chart to Bar based on condition

Thanks for your quick reply John.  Once I changed my chart to a combo chart, I was able to do exactly what I wanted to do.  Every day I learn something new visiting this forum.

Community Browser