Forum Replies Created by Thangaraj Raman

Viewing 15 posts - 166 through 180 (of 204 total)
  • in reply to: Range in line chart #37206

    @shwetabolaj,

    You can use the Range Selector in StockCharts to control the range of data being shown. Within the range selector, you can set the range and rangeType for range buttons to achieve your requirement.


    Thangaraj Raman
    Team CanvasJS

    in reply to: axisY accuracy #37197

    @jimginn,

    The format in which crosshair labels are rendered depends on various parameters like axis range. In your case, you can set the crosshair valueFormatString property as valueFormatString: "#,###.###" to achieve your requirement.


    Thangaraj Raman
    Team CanvasJS.

    in reply to: CanvasJs with React Typescript #37161

    @rushikesh-gadekar,

    CanvasJS React charts seem to be working fine with React Typescript. Can you kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive so that we can look into your code, run it locally at our end to understand the scenario better, and help you out?


    Thangaraj Raman
    Team CanvasJS

    in reply to: CSP support #37155

    @shruti-srivastava,

    [Update]

    We have released v3.5 GA with support for CSP. Please refer to the release blog for more information.

    We have just released Chart v3.5 Beta-1 with a few improvements related to CSP. Please refer to the release blog for more information. Do download the latest version from download page & let us know your feedback.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Stripline Labels #37059

    @mustadirmahmood,

    Stripline labels are positioned on top of the respective stripline and not on the line itself. In your case, the labels are getting overlapped due to the closeness of stripline values.

    You can avoid the overlapping by showing some of the labels near to the axis and other labels either at the center or far from the axis using the labelAlign property. When stripline values are very close, you can set a different color for each stripline and also set the corresponding labelFontColor to differentiate each stripline and its label.

    Please check this JSFiddle for a working example.

    Stripline Labels


    Thangaraj Raman
    Team CanvasJS

    in reply to: Charts print in height solution #37012

    @gittek,

    You can scale-up or scale-down the chart before exporting using exportChart method and reset it back soon after exporting. Please take a look at this JSFiddle for a working example.

    Scale chart before exporting

    If the solution suggested doesn’t fulfill your requirement, kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive so that we can look into the code, understand the scenario better and help you out.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Speedo Meter Chart #37005

    @m-usman,

    You can customize a DIV using CSS to visualize the needle as shown in the code snippet below –

    HTML
    <div class="speedometer__needle js-needle"></div>

    CSS

    .speedometer__needle {
      position: absolute;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: transparent;
      top: 72%;
      left: 50%;
      transition: .3s ease-in-out;

    To position the needle at a specific point you can use CSS transform property. Please check the code snippet below –

    $( '.js-needle' ).css({
      'transform' : 'translate(-50%, -50%) rotate('+  (tickValue * 18.0) + 'deg)'
    });

    Please check this JSFiddle for a working example which meets your requirement.

    Speedometer Chart


    Thangaraj Raman
    Team CanvasJS

    in reply to: Speedometer chart #37003

    @m-usman,

    You can customize a DIV using CSS to visualize the needle as shown in the code snippet below –

    HTML
    <div class="speedometer__needle js-needle"></div>

    CSS

    .speedometer__needle {
      position: absolute;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: transparent;
      top: 72%;
      left: 50%;
      transition: .3s ease-in-out;

    To position the needle at a specific point you can use CSS transform property. Please check the code snippet below –

    $( '.js-needle' ).css({
      'transform' : 'translate(-50%, -50%) rotate('+  (tickValue * 18.0) + 'deg)'
    });

    Please check this JSFiddle for a working example which meets your requirement.

    Speedometer Chart


    Thangaraj Raman
    Team CanvasJS

    in reply to: Chart Overlapping Issue #36958

    @keval-panchal,

    The dataPointWidth is auto calculated such that no column is overlapped in case of a single series or multi-series chart. In your case, you are setting the dataPointWidth manually which makes the columns overlap with each other.

    Please take a look at this updated JSFiddle for a working example.

    Multi-Series Column Chart

    Considering this thread as a duplicate of Bar Chart Overlapping Issue and hence closing the same.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Bar Chart Overlapping Issue #36957

    @keval-panchal,

    The dataPointWidth is auto calculated such that no column is overlapped in case of a single series or multi-series chart. In your case, you are setting the dataPointWidth manually which makes the columns overlap with each other.

    Please take a look at this updated JSFiddle for a working example.

    Multi-Series Column Chart


    Thangaraj Raman
    Team CanvasJS

    in reply to: Fix date on x-axis #36911

    @ahadali791,

    You can convert the x-values to labels and combine dataPoints with the same date using similar x-values. Please find the code snippet for the same below.

    function setXValue(data) {
      var xValue = 0;
      for(var i = 0; i < data.length; i++) {
        if(data[i+1] && data[i].x.getTime() === data[i+1].x.getTime()) {
          data[i].label = data[i].x;
          data[i].x = xValue;
        }
        else {
          data[i].label = data[i].x;
          data[i].x = xValue;
          xValue++
        }
      }
      return data
    }

    Please take a look at this JSFiddle for a working example.

    Range Column Chart


    Thangaraj Raman
    Team CanvasJS

    in reply to: Creating waterfall chart by selecting point in linechart #36889

    @kerrith,

    You can create a drilldown chart to achieve your requirement. Please take a look at this gallery page for an example on the same.

    Drilldown Chart


    Thangaraj Raman
    Team CanvasJS

    in reply to: Fix date on x-axis #36876

    @ahadali791,

    Can you kindly brief us further about your requirement along with a pictorial representation and also create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with sample data so that we can look into your code, run it locally at our end to understand the scenario better, and help you out?


    Thangaraj Raman
    Team CanvasJS

    in reply to: Choose which line we need in front #36802

    @ragu1991nathan,

    Chart renders dataseries in the same sequence in which they are passed to the chart-options. Passing the dataseries with red color before the dataseries with blue color should work fine in your case. Please take a look at this updated JSFiddle for a working example.

    chart with dataseries in sequence


    Thangaraj Raman
    Team CanvasJS

    in reply to: Scale ratio in canvasjs for both axes #36624

    @mustadirmahmood,

    To achieve your requirement, you can loop through the dataPoints and convert each y-value from millimeter to pixel as the chart is rendered based on pixels. Please take a look at this updated JSFiddle for a working example on the same.


    Thangaraj Raman
    Team CanvasJS

Viewing 15 posts - 166 through 180 (of 204 total)