function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
B1B1 

How to display the realtime object date into the Lightning Chart ?

Hi All,

I have created a Lightning Charts, which is working fine with a dummy data. Am looking to display a realtime obejct tadat to be dispalyed in Lightning charts. Please help me out.

Code :

setupPieChart : function(component) {
        
        var data = [
            {
                value: 300,
                color:"#F7464A",
                highlight: "#FF5A5E",
                label: "Red"
            },
            {
                value: 50,
                color: "#46BFBD",
                highlight: "#5AD3D1",
                label: "Green"
            },
            {
                value: 100,
                color: "#FDB45C",
                highlight: "#FFC870",
                label: "Yellow"
            }
        ];
        
        var el = component.find('pieChart').getElement();
        var ctx = el.getContext('2d');
        new Chart(ctx).Pie(data);
    }