Subversion Repositories SmartDukaan

Rev

Rev 34388 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34388 Rev 34426
Line 32... Line 32...
32
    document.getElementById('barchart').onclick = function (evt) {
32
    document.getElementById('barchart').onclick = function (evt) {
33
        var activePoints = myChart.getElementsAtEvent(evt);
33
        var activePoints = myChart.getElementsAtEvent(evt);
34
        if (activePoints.length > 0) {
34
        if (activePoints.length > 0) {
35
            var dataIndex = activePoints[0]._index;  // Kaunsa bar click hua
35
            var dataIndex = activePoints[0]._index;  // Kaunsa bar click hua
36
            var brand = options.data.labels[dataIndex];  // Brand Name
36
            var brand = options.data.labels[dataIndex];  // Brand Name
37
 
-
 
38
            console.log("Clicked label(brand)-:", brand);
37
            console.log("Clicked label(brand)-:", brand);
39
 
-
 
40
            // new bar chart for details veiw of specific brand's model wise
-
 
41
            makeModelWiseChart(brand, from, to, fofoId,quantity_type);
38
            makeModelWiseChart(brand, from, to, fofoId,quantity_type);
42
        }
39
        }
43
    };
40
    };
44
 
41
 
45
    function makeModelWiseChart(brandName, fromDate, toDate, partnerId,quantity_Type) {
42
    function makeModelWiseChart(brandName, fromDate, toDate, partnerId, quantity_Type) {
46
          doGetAjaxRequestHandler(`${context}/brandWiseFofoSaleData?from=${fromDate}&to=${toDate}&brand=${brandName}&fofoId=${partnerId}&isQuantity=${quantity_Type}`,function (response) {
43
        doGetAjaxRequestHandler(`${context}/brandWiseFofoSaleData?from=${fromDate}&to=${toDate}&brand=${brandName}&fofoId=${partnerId}&isQuantity=${quantity_Type}`, function (response) {
47
             $('.model_charbar_container').html(response);
44
            $('#modelChartModal .model_charbar_container').html(response);
-
 
45
            $('#modelChartModal').modal('show');
48
         });
46
        });
49
    }
47
    }
50
</script>
48
</script>
51
49