Bubweb
  • 🌟News and Releases
    • New Templates
  • 🚀HELP GUIDE
    • Hire me
    • Getting Started
      • New Responsive Properties
      • Stripe
      • Google Login
      • Charts
        • Area
        • Column
        • Pie
        • Dumbbell
        • Polar Area
      • PWA
  • 🎨Templates
    • OpenAI & Claude
      • AI Agent Tools: OpenAI & Claude
    • Stable Diffusion SaaS Image Generator
      • Getting Started
      • Styles & Config
    • OpenAI & DALL-E
      • OpenAI SaaS - Tools Generate
        • 0️⃣New Responsive Properties
        • 1️⃣Configure Role & ID attribute
        • 2️⃣Configure OpenAI & DALL-E
        • 3️⃣Configure Stripe
        • 4️⃣Deploy to Live
        • Styles
        • PWA
    • Ecommerce
      • Ecommerce PWA - Stripe
        • New Responsive Properties
        • Company Role
        • Styles
        • Google Login
        • Stripe
        • PWA
        • 👁️‍🗨️Preview
    • CRM
      • CRM & Dashboard PWA - Lite
    • Dashboard Starter Kit
      • Global
        • 1️⃣New Responsive Properties
        • 2️⃣Configure Role
        • 3️⃣Styles
        • 4️⃣Charts
        • 5️⃣PWA
    • Social Network
      • Social Network Hub
        • 1️⃣New Responsive Properties
        • 2️⃣Configure Role
        • 3️⃣Styles
        • 4️⃣PWA
  • 🔌PLUGINS
    • Jotform
      • Getting Started
    • Microsoft OneDrive
      • Getting Started
Powered by GitBook
On this page
  • Chart Column
  • Example of a static column chart
  1. HELP GUIDE
  2. Getting Started
  3. Charts

Column

Setting up the chart

PreviousAreaNextPie

Last updated 1 year ago

Chart Column

Example of a static column chart

All I did was make the hexadecimal colors and the chart list dynamic

<!DOCTYPE html>
<html>
  <head>
    <script>
      window.onload = function () {
        var options = {
          grid: {
            show: true,
            padding: {
              top: 20,
              right: 0,
              bottom: 0,
              left: 0
            }
          },
          colors: ["#4F46E5"],
          series: [
            {
              name: "Sales",
              data: [
                { x: "Jan", y: "30" },
                { x: "Feb", y: "60" },
                { x: "Mar", y: "53" },
                { x: "Apr", y: "45" },
                { x: "May", y: "60" },
                { x: "Jun", y: "75" },
                { x: "Jul", y: "53" }
              ]
            }
          ],
          chart: {
            toolbar: {
              show: true
            },
            type: "bar",
            height: 260,
            sparkline: {
              enabled: false
            }
          },
          plotOptions: {
            bar: {
              columnWidth: "40%",
              borderRadius: 4,
              dataLabels: {
                position: "top"
              }
            }
          },
          dataLabels: {
            enabled: true,
            formatter: function (val) {
              return val + "%";
            },
            offsetY: -20,
            style: {
              fontSize: "12px",
              colors: ["#304758"]
            }
          },
          xaxis: {
            axisBorder: {
              show: true
            },
            axisTicks: {
              show: true
            },
            labels: {
              show: true,
              formatter: function (val) {
                return val;
              }
            },
            tooltip: {
              enabled: true
            }
          },
          yaxis: {
            axisBorder: {
              show: true
            },
            axisTicks: {
              show: true
            },
            labels: {
              show: true,
              formatter: function (val) {
                return val + "%";
              }
            }
          }
        };

        var chart = new ApexCharts(document.querySelector("#chart"), options);
        chart.render();
      };
    </script>
  </head>
  <body>
    <div id="chart" style="width: 95%;"></div>
    <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
  </body>
</html>

Content to show per list item

{x: '', y: ''}
🚀