Skip to content

premkumar0509/Dynamic-Chart-Visualizer

Repository files navigation

📊 Dynamic Chart Visualizer for Business Central

The Dynamic Chart Visualizer is a Business Central control add-in that integrates with Google Charts to provide interactive and customizable data visualizations.
Users can select any table, define X and Y axes, choose a chart type, and instantly render dynamic charts inside Business Central.


📸 Screenshot

Here’s how the Dynamic Chart Visualizer looks inside Business Central:

Dynamic Chart Visualizer Screenshot


🚀 Features

  • ✅ Embed Google Charts directly inside Business Central.
  • ✅ Select any table and choose fields for X-axis and Y-axis.
  • ✅ Supports multiple chart types: Bar, Pie, 3D Pie, Line (default).
  • ✅ Fully responsive (charts redraw when page is resized).
  • ✅ Simple ControlAddIn + AL page integration.

🏗️ Project Structure

src/
├── Startup.js # Initializes control and loads Google Charts
└── Script.js # Renders charts dynamically
pages/
├── DynamicChartVisualizer.ControlAddIn.al # AL ControlAddIn definition
└── DynamicChartVisualizer.Page.al # AL Page for selecting data and chart rendering

🔧 How It Works

  1. Select a record (table) → Choose which Business Central table to visualize.
  2. Choose fields → Pick X-axis and Y-axis fields from that table.
  3. Select chart type → Bar, Pie, or 3D Pie.
  4. Click "Load Chart" → Data is passed from AL to the control add-in.
  5. Google Charts renders the chart dynamically in Business Central.

🖥️ Example

Page Selection

  • Record: Customer
  • X-Axis: Customer Name
  • Y-Axis: Balance (LCY)
  • Chart Type: Bar Chart

Chart Output

A Bar Chart showing customer balances with names on the X-axis.


📂 Control Add-In

controladdin "Dynamic Chart Visualizer"
{
    StartupScript = 'src/startup.js';
    Scripts = 'src/script.js', 'https://www.gstatic.com/charts/loader.js';

    HorizontalStretch = true;
    VerticalStretch = true;

    RequestedHeight = 500;
    RequestedWidth = 800;

    event ControlReady();

    procedure RunSomeCode(Data: JsonArray; ChartCaption: Text; ChartType: Integer);
}

🛠️ Tech Stack

  • AL Language → Business Central extension development
  • Google Charts → Visualization library
  • JavaScript → Chart rendering logic

📌 Use Cases

  • 📊 Visualizing sales by month, customer balances, inventory levels, etc.
  • ⚡ Allowing users to create ad-hoc reports and charts directly inside BC.
  • 🔄 Replacing static charts with interactive and responsive visualizations.

📜 License

This project is open-source and available under the MIT License.
You are free to use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published