Forum Replies Created by Thangaraj Raman

Viewing 15 posts - 91 through 105 (of 226 total)
  • in reply to: Axis X combines label with x value bug #42463

    @antosimi,

    You seem to be passing both x-value and label because of which it shows few numbers in between based on the axis interval. Passing just y-value and label should work fine in your case.

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


    Thangaraj Raman
    Team CanvasJS

    in reply to: Theme font size and option font size work differently #42431

    @elcollie,

    You seem to be using undocumented methods and properties. addTheme is an internal property with certain functionality and might not apply font-size as defined across all the elements in the chart. We suggest you use chart.options to set the labelFontSize in this case since it will apply the font-size based on the defined value.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Show start and end labels for stripline #42407

    @mustadirmahmood,

    Only one label will be shown for a stripline, as of now. However, you can add 2 additional striplines, one at the startValue position and the other at the endValue position, and use their individual labels to achieve your requirement.

    Please check this JSFiddle for a working example.

    Labels for start and end values of stripline


    Thangaraj Raman
    Team CanvasJS

    in reply to: On click event on data points #42389

    @richfords,

    The click event is fired only within the area of the marker as of now. However, you can set markerBorderThickness to a value greater than 0 and markerBorderColor to transparent to increase the area in which the click event is fired without changing the size of the marker.

    Please check this JSFiddle for a working example.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Possible to show fewer datapoints on mobile? #42375

    @elitriona,

    Showing fewer datapoints based on the screen size of the device is not available as an inbuilt feature as of now. However, you can achieve the same with a few lines of code. Please check the code snippet below.

    var screenWidth = jQuery(window).width();
    var dpsCount = 6;            //no. of datapoints to be displayed on phone
    var dps = [];
    
    if(screenWidth <= 768 ) {
      for(var i = 0; i < dpsCount; i++) {
         dps.push(chart.options.data[0].dataPoints[i]);
      }
      chart.options.data[0].dataPoints = dps;
      chart.render();
    } 

    Please check this JSFiddle for a working example.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Blurry X Axis Labels when Animation Enabled #42360

    @mjohnson8thlight-com,

    Chart elements may look blurred on changing the zoom level within the display setting of the browser or windows. Resetting the zoom level to 100% should work fine in this case.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Blurry X Axis Labels when Animation Enabled #42352

    @mjohnson8thlight-com,

    We are unable to reproduce the issue at our end, the chart seems to be proper & not blurry. Can you kindly provide more information like the version of CanvasJS & the browser that you are using so that we can try reproducing with the same environment?


    Thangaraj Raman
    Team CanvasJS

    in reply to: Rendering multiple charts in one page. #42310

    Shashi,

    For your case, we suggest you to use separate variables for each chart instance or to keep all the chart instances in an array as shown below.

    var chartsArray = [];
    chartsArray.push(new CanvasJS.Chart("chartContainer1", { //Chart 1  Options }));
    chartsArray.push(new CanvasJS.Chart("chartContainer2", { //Chart 2 Options }));
    for(var i = 0; i < chartsArray.length; i++) {
        chartsArray[i].render();
    }


    Thangaraj Raman
    Team CanvasJS.

    @avb,

    The JSFiddle that you have shared seems to be broken. Could you please share an updated JSFiddle with working code so that we can look into the code/chart options being used, understand the scenario better, and help you out?

    Also, we are unable to understand what you mean by center the chart data with a blank space on the right instead of filling till the end. Could you please brief us further with a pictorial representation or an example with the steps to understand your requirement so that we can suggest an appropriate solution?


    Thangaraj Raman
    Team CanvasJS

    in reply to: Change cursor icon #42252

    @lakipower,

    Changing the cursor while hovering over the underlying area of an area chart is not possible as of now.


    Thangaraj Raman
    Team CanvasJS

    in reply to: X-axis click event #42236

    @weijian-zhu2,

    You can bind mouse events to the chart container and get mouse coordinates in pixels, which can be converted to corresponding values along the axis using convertPixelToValue as shown in this documentation page. Please take a look at the code snippet below:

    jQuery(".canvasjs-chart-canvas").last().on("click", 
        function(e){
    	var parentOffset = $(this).parent().offset();
    	var relX = e.pageX - parentOffset.left;
    	var xValue = Math.round(chart.axisX[0].convertPixelToValue(relX));
    	console.log(xValue);
    });


    Thangaraj Raman
    Team CanvasJS

    in reply to: stacked rangebar order by date #42184

    @dpanscik,

    Glad that you were able to figure it out.


    Thangaraj Raman
    Team CanvasJS

    in reply to: stacked rangebar order by date #42174

    @dpanscik,

    Sorting datapoints by x values using the below code snippet seems to be working fine for data-time values as well. Please check this JSFiddle for a working example.

    function compareDataPointX(dataPoint1, dataPoint2) {
      return dataPoint1.x - dataPoint2.x;
    }

    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: AJAX return data #42159

    @dpanscik,

    Glad you were able to figure it out. As of now, AJAX call has to be performed separately, and chart options can be updated based on the data fetched from it.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Chart not work in ios #42137

    @bhuvnesh,

    CanvasJS stockchart works fine in both Windows and iOS. 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

Viewing 15 posts - 91 through 105 (of 226 total)