Forum Replies Created by Thangaraj Raman

Viewing 15 posts - 61 through 75 (of 232 total)
  • in reply to: Div rows are not aligned with chart horizontal rows #43726

    @mridula,

    As addressed in the previous reply, setting the height of the chart-container based on the height of the table seems to be working fine in this case. In the sample that you have shared, setting the height of 2nd chart to 279px seems to be working fine. Please find the code-snippet below.

    #chartContainer-1 {
      height: 279px !important;
    }

    Aligning chart with table


    Thangaraj Raman
    Team CanvasJS

    in reply to: Div rows are not aligned with chart horizontal rows #43685

    @mridula,

    Changing the height of the chart container(div) should work fine in your case.

    If you are still facing issues, kindly create a sample project reproducing the issue and share it with us over Google Drive or OneDrive so that we can look into the code, run it locally to understand the scenario better, and help you out.


    Thangaraj Raman
    Team CanvasJS

    in reply to: How To Implement canvasjs LWC #43679

    @akshatchoudhary,

    CanvasJS charts seems to be working fine with salesforce lightning web component. Please take a look at this Github Repo for the working code.

    If you are still facing issues, kindly create a sample project reproducing the issue and share it with us over Google Drive or OneDrive so that we can look into the code, run it locally to understand the scenario better, and help you out.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Date AxisX (Trend) + Group and Stack #43673

    Jason,

    It is not possible to render a grouped-stacked chart over a single axis as of now. However, you can render each stack over a different axis to achieve the same.

    Please check this JSFiddle for a working example.

    Grouped stacked column chart


    Thangaraj Raman
    Team CanvasJS

    in reply to: Date AxisX (Trend) + Group and Stack #43649

    Jason,

    Can you kindly brief us further on your requirement with a pictorial representation or an example so that we can understand your requirement better and suggest an appropriate solution?


    Thangaraj Raman
    Team CanvasJS

    in reply to: Chart Labeling Issue #43605

    @shivamjoshi976,

    You can use labels instead of x-value to show the axis-x labels as per your requirement.

    If you are still facing issues, kindly create a JSFiddle with sample data and share it with us so that we can look into the code, understand the scenario better, and help you out.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Bar Chart #43539

    @saloni,

    You can use toolTipContent to display custom content in the tooltip or if you are looking to show some text over all the bars at once, you can use indexLabel.

    If this does not meet your requirement, kindly brief us further with a pictorial representation or an example so that we can understand your requirement better and suggest an appropriate solution.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Chart not showing #43526

    @uncleboss12,

    Please check this documentation page for a step-by-step tutorial on integrating CanvasJS with your Vue application.

    If you are still facing issues, kindly create a sample project reproducing the issue and share it with us over Google Drive or OneDrive so that we can look into the code, run it locally to understand the scenario better, and help you out.


    Thangaraj Raman
    Team CanvaSJS

    in reply to: Integrate commercial CanvasJs via NPM #43511

    Ragu,

    The non-commercial version of CanvasJS is available over NPM as of now. You can download the commercial version package from My Account page and the steps to integrate have been addressed in the instruction.html file.


    Thangaraj Raman
    Team CanvasJS

    @haykay470,

    Can you kindly create a JSFiddle, reproducing the issue you are facing & share it with us so that we can look into the code / chart-options being used, understand the scenario better and help you out?


    Thangaraj Raman
    Team CanvasJS

    in reply to: Watermark #43450

    @arseneksa97,

    You can use subtitles to show a watermark in the plot area of the chart as shown in the code snippet below:

    subtitles: [{
        text: "Built using CanvasJS",
        fontSize: 40,
        verticalAlign: "center",
        dockInsidePlotArea: true,
        fontColor: "rgba(0,0,0,0.1)"
    }],

    Please check this JSFiddle for a working example.

    Chart with Watermark


    Thangaraj Raman
    Team CanvasJS

    in reply to: Show min and max value in half doughnut chart #43425

    @bkshn,

    You can add 2 dummy datapoints in the hidden region of the doughnut chart and use their indexlabels to show the minimum and maximum value of the gauge as shown in the code snippet below:

    var data = {
        type: "doughnut",
        indexLabelPlacement: "inside",
        innerRadius: "60%",
        dataPoints: [
          {
            y: 1,
            indexLabel: gauge.maximum + "",
            color: "transparent"
          },
          {
            y: gauge.maximum - 2,
            color: "transparent",
            toolTipContent: null
          },
          {
            y: 1,
            indexLabel: "0",
            color: "transparent"
          },
          gauge.data,
          gauge.unoccupied,
       ],
    };

    Please check this JSFiddle for a working example.

    Guage showing minimum and maximum values


    Thangaraj Raman
    Team CanvasJS

    in reply to: Show min and max value in half doughnut chart #43408

    @bkshn,

    A doughnut chart does not have axes. If you want to highlight the minimum and maximum values from the datapoint array, you can use subtitles to achieve the same.

    If this doesn’t meet your requirement, kindly share a pictorial representation and brief us further about your requirement so that we can understand your scenario better and help you out with an appropriate solution.


    Thangaraj Raman
    Team CanvasJS

    in reply to: 404 error when GETing /static/canvasjs.min.js #43392

    @lesliedewhurst01,

    We have tested the sample locally and it seems to be working fine on our end. It looks like you might have copied just the template(index.html) & missed out on replacing the view(views.py).

    Please take a look at this sample project for a working example. Replacing the trial version of the CanvasJS file (canvasjs.min.js) with the commercial version also seems to be working fine.

    If you are still facing issues, kindly help us with more information like errors in the console, the browser in which the problem occurs or steps to reproduce the issue, etc.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Need a Gauge Chart #43352

    @chrisstone,

    We don’t have a gauge chart as of now but a semi-doughnut chart can be used to achieve the same. Please follow the steps below for creating a gauge chart using a doughnut chart.

    First, we need to create an object that will store all the necessary data that is needed to be shown on the gauge chart. The code snippet below shows an example of that object:

    var gauge = {
      title:{text: "Gauge Chart"},
      data: { y: 7 }, //gauge value 
      maximum: 10
    };

    In the second step, we will initialize the chart object and populate its dataPoints considering the fact that only half of the doughnut chart is displayed. Please refer to the code snippet below for achieving the same:

    var chart = new CanvasJS.Chart("chartContainer");
    createGauge(chart);
    
    //Function for gauge
    function createGauge(chart){
      //Caluculation of remaining parameters to render gauge with the help of doughnut
      gauge.unoccupied = {
        y: gauge.maximum - gauge.data.y, 
        color: "#DEDEDE", 
        toolTipContent: null, 
        highlightEnabled: false,
        click : function (){ gauge.unoccupied.exploded = true; }
      }
      gauge.data.click = function (){ gauge.data.exploded = true; };
      if(!gauge.data.color)
        gauge.data.color = "#69C434";
      gauge.valueText = {text: gauge.data.y.toString(), verticalAlign :"center"};
    
      var data = {
        type: "doughnut",
        dataPoints: [
          {
            y: gauge.maximum,
            color: "transparent",
            toolTipContent: null
          },
          gauge.data,
          gauge.unoccupied
        ],
      };
    
      if(!chart.options.data)
        chart.options.data = [];
      chart.options.data.push(data);
    
      if(gauge.title){
        chart.options.title = gauge.title;
      }
    
      //For showing value
      if(!chart.options.subtitles)
        chart.options.subtitles = [];
      chart.options.subtitles.push(gauge.valueText);
    
      chart.render();
    }

    Please take a look at this JSFiddle for a working example with sample code.

    Gauge Chart


    Thangaraj Raman
    Team CanvasJS

Viewing 15 posts - 61 through 75 (of 232 total)