Forum Replies Created by Sanjoy

Viewing 15 posts - 1 through 15 (of 177 total)
  • in reply to: Chart doesnt scale while printing #19624

    @aksangwan

    Setting the scale option to 100 in browser print dialog panel should work fine in your case. Please refer this article to enable scaling in chrome.

    —-
    Sanjoy Debnath
    Team CanvasJS

    • This reply was modified 6 years, 10 months ago by Sanjoy.
    • This reply was modified 6 years, 10 months ago by Sanjoy.
    in reply to: How we can use Stacking for multi series line chart? #19609

    @aksangwan,

    Are you looking for staackedArea Chart?

    —–
    Sanjoy Debnath
    Team CanvasJS

    in reply to: Can I set custom text labels for both X and Y? #19404

    @srmagill

    You can show labels in axisX using label property whereas you can show labels in axisY with the help of labelFormatter method. Please take a look at this jsFiddle for the same.

    —–
    Sanjoy Debnath
    Team CanvasJS

    in reply to: Stacked Bar Chart Draggable? #19294

    @adriandev

    Here is an example of draggable stackedBar Chart.

    ___
    Sanjoy Debnath
    Team CanvasJS

    in reply to: CanvasJS with Webpack and VueJS #19195

    @cedstrash

    Sorry, CanvasJS doesn’t provide ES6 modules as of now.

    —-
    Sanjoy Debnath
    Team CanvasJS

    in reply to: CanvasJS with Webpack and VueJS #18963

    @cedstrash

    Please checkout this example on using CanvasJS chart in Vue.js. You don’t need to build official CanvasJS library, you can include the CanvasJS script in the head of the HTML.

    canvasjs chart integration with vuejs

    ___
    Sanjoy Debnath
    Team CanvasJS

    in reply to: CanvasJS with Webpack and VueJS #18947

    @cedstrash

    We are looking into it and will get back to you at the earliest.

    —–
    Sanjoy Debnath
    Team CanvasJS

    @aksangwan

    Getting all the data-series on crosshair move is not possible as of now. But, you can get the value of current data-point as a parameter in labelFormatter when snapToDataPoint is true.
    Also, mouseover event of data-series can be used to get current data-series that have been hovered.

    ——
    Sanjoy Debnath
    Team CanvasJS

    in reply to: Step LIne Chart for 24 hours #18649

    @sahiss,

    Please take a look at this jsfiddle.
    Also, please refer to this forum thread.

    For license related queries please email us at sales@canvasjs.com.

    ——
    Sanjoy Debnath,
    Team CanvasJS

    in reply to: Pie/Columns Chart Border #18646

    @ieldorado,

    Sorry, as of now Pie/Column don’t have any border. And we don’t have any timeline for it yet. Instead, you can look for bevelEnabled property.
    Please take a look at this workaround for adding border to Column.

    —–
    Sanjoy Debnath,
    Team CanvasJS

    in reply to: Crowded display #18638

    @intijk,

    X-values can either be numeric or date-time/time-stamp, but not string. Please take a look at the page for more information.


    Sanjoy Debnath,
    Team CanvasJS

    in reply to: Pie/Columns Chart Border #18623

    @ieldorado,

    We are looking into it and will get back to you at the earliest.

    —–
    Sanjoy Debnath
    Team CanvasJS

    in reply to: What if, all y : data is 0 ? #18595

    @nik-sol,

    One more help in similar case,
    We need to hide legends in this situation as well.

    You can toggle showInLegend property if you are looking to hide legend for dataPoints with y-values as 0 or null as shown in the code snippet below:

    showDefaultText(chart, "No Data Found!");
    
    function showDefaultText(chart, text) {
      var dataPoints = chart.options.data[0].dataPoints;
      var isEmpty = !(dataPoints && dataPoints.length > 0);
    
      if (!isEmpty) {
        for (var i = 0; i < dataPoints.length; i++) {
          isEmpty = !dataPoints[i].y;
          if (!isEmpty)
            break;
        }
      }
    
      if (!chart.options.subtitles)
        chart.options.subtitles = [];
      if (isEmpty) {
        chart.options.subtitles.push({
          text: text,
          verticalAlign: 'center',
        });
        chart.options.data[0].showInLegend = false;
      } else {
        chart.options.subtitles = [];
        chart.options.data[0].showInLegend = true;
      }
    }

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

    CanvasJS pie chart with no data found message and no legend


    Sanjoy Debnath
    Team CanvasJS

    in reply to: Crowded display #18354

    @intijk

    It seems like you have set maximum and interval properties of axisX. Removing them should work fine. If this doesn’t suit your requirements, can you please create a jsfiddle reproducing the issue you are facing so that we can understand it better and help you out.


    Sanjoy Debnath
    Team CanvasJS

    in reply to: What if, all y : data is 0 ? #17889

    @nik-sol,

    In cases like above in which all the dataPoints have y-values as 0 or null, you can add subtitles to the chart with a message like “No Data Found!” as shown below:

    showDefaultText(chart, "No Data Found!");
    
    function showDefaultText(chart, text){
      var dataPoints = chart.options.data[0].dataPoints;
      var isEmpty = !(dataPoints && dataPoints.length > 0);
    
      if(!isEmpty){
        for(var i = 0; i < dataPoints.length; i++){
          isEmpty = !dataPoints[i].y;
          if(!isEmpty)
            break;
        }
      }
    
      if(!chart.options.subtitles)
        chart.options.subtitles = [];
      if(isEmpty)
        chart.options.subtitles.push({
          text : text,
          verticalAlign : 'center',
        });
      else
        chart.options.subtitles = [];
    }

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

    CanvasJS pie chart with no data found message


    Sanjoy Debnath
    Team CanvasJS

Viewing 15 posts - 1 through 15 (of 177 total)