jdorn / php-reports

A PHP framework for displaying reports from any data source, including SQL and MongoDB
http://jdorn.github.com/php-reports
GNU Lesser General Public License v3.0
477 stars 235 forks source link

Adding Stacked bar charts #186

Open pydubreucq opened 9 years ago

pydubreucq commented 9 years ago

Hi, It could be a nice feature du add Stacked bar charts type like in this docs : https://developers.google.com/chart/interactive/docs/gallery/barchart I don't know how, but it could be very usefull to me. Best Regards Pierre-Yves

PhobosK commented 5 years ago

Hi, Have you tried something like this: For 100% Stacked bars:

-- CHART: {
--      type: "ColumnChart",
--      dataset: 0,
--      columns: [
--          "Name of the client",
--          "No of sold",
--          "No of ordered"
--      ],
--      options: {
--          isStacked: "percent",
--          animation: {
--              duration: 2000,
--              easing: 'inAndOut',
--              startup: true,
--          },
--          explorer: { keepInBounds: true }
--      }
-- }

OR for just Stacked Bars:

-- CHART: {
--      type: "ColumnChart",
--      dataset: 0,
--      columns: [
--          "Name of the client",
--          "No of sold",
--          "No of ordered"
--      ],
--      options: {
--          isStacked: true,
--          animation: {
--              duration: 2000,
--              easing: 'inAndOut',
--              startup: true,
--          },
--          explorer: { keepInBounds: true }
--      }
-- }