My report on the web page shows a Pie Chart and a Bar chart side by side.
It worked fine both on the web page and in the PDF export.
But then I updated my wkhtmltopdf to the version with QT patches.
Now, the web page still works nicely.
However, when I export to PDF, the Bar Chart disappears.
My report code is as follows:
# BAR CHART
select 'dbr.chart', 'Column', '2D Column';
select 'dbr.chart.options', 'chart.scale', 40; # With wkhtmltopdf QT version this causes the bar chart to disappear in PDF
SELECT `Lateness Category`, COUNT(`Lateness Category`) AS `value`, COUNT(`Lateness Category`)
FROM tmp_table_aging
GROUP BY `Lateness Category`;
In doing some testing, I found that removing the line
select 'dbr.chart.options', 'chart.scale', 40;
will allow the Bar Chart to be displayed, even with the wkhtmltopdf QT version
But I need this command in order to decrease the size of the Bar chart so that my Pie Chart and Bar Chart can fit on the page side by side.
If I don't have it, then they appear one above the other.
Do you have an alternative to select 'dbr.chart.options', 'chart.scale', 40;?
p.s. If I try adding percentages to the first line above e.g.
select 'dbr.chart', 'Column', '2D Column', '40%', '40%';
then it also disappears on the PDF export.
Another unrelated question I have is about my Pie Chart.
# PIE CHART
select 'dbr.chart', 'Pie';
select 'dbr.colstyle', 'value', '{percent|1}% {value}';
SELECT `Lateness Category`, COUNT(`Lateness Category`) AS `value`, COUNT(`Lateness Category`)
FROM tmp_table_aging
GROUP BY `Lateness Category`;
It displays on the page nicely, with percentages next to each slice of the pie.
And When I hover over the mouse, it also displays which grouping the slice belongs to.
However, when I export to PDF I don't have, of course, the effect of hovering with the mouse.
Can I display the groupings on the side - per slice color?
I know that if use chart.js instead of ChartDirector then it will do that, but I want to use ChartDirector.