Forum Replies Created by Vishwas R

Viewing 15 posts - 1,066 through 1,080 (of 1,615 total)
  • in reply to: How can i use canvasjs in ionic 2? #20997

    @danniela_navarrete77,

    Just like having DOM in a website/web-app, you can create a DOM for chart-container in html and script-part goes inside js/ts (based on your usage) files. Please take a look at this tutorial on Building Mobile App with Angular & Ionic. Also please refer this tutorial on Ionic.


    Vishwas R
    Team CanvasJS

    in reply to: Chart Animation Pause and Resume #20978

    @smit,

    Sorry, this feature is not available as of now.


    Vishwas R
    Team CanvasJS

    in reply to: Ability to change markerSize for hover state #20977

    Pavlo,

    Thanks for your feedback. We will consider this behaviour for future releases.


    Vishwas R
    Team CanvasJS

    @ayomirotoye,

    It seems to be working fine. Can you kindly share sample project over Onedrive or Google-Drive so that we can look into your code, understand your scenario better and help you out?

    Please find the screenshot below:
    CanvasJS Doughnut Chart in Spring MVC


    Vishwas R
    Team CanvasJS

    in reply to: How can i use canvasjs in ionic 2? #20954

    @danniela_navarrete77,

    You can save CanvasJS file (canvasjs.min.js) in src folder of your project (‘src/assets/js’ or ‘src/lib’) and import the CanvasJS library to your app using import CanvasJS from 'canvasjs.min' (path may vary based on file location like ‘./src/assets/js/canvasjs.min’ or ‘./src/lib/canvasjs.min’). Or you can add it in your html file using script-tag. Please take a look at this ionic documentation on Adding 3rd Party Libraries.

    Also please refer this tutorial on How to Install 3rd Party Libraries in Ionic 2 and step-by-step guide given in this github thread for more info.


    Vishwas R
    Team CanvasJS

    in reply to: Stacked Area Y-Axis Max Not Correct #20952

    Paul,

    Its not a bug but its due to invalid x-value that has been passed to chart. moment().startOf('d') is not a valid JavaScript date-time object, however moment().startOf('d')._d is valid date-time object. Passing valid date-time object should work fine in your case. Please take a a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

    in reply to: Export to pdf not working #20893

    @theprogrammers,

    You can pass image width and height parameters to addImage method of jsPDF to handle clipping of chart while exporting it as PDF. Please refer to jsPDF documentation for more information on the same. Below is the code-snippet with width & height parameters.

    var dataURL = canvas.toDataURL();
    var pdf = new jsPDF();
    pdf.addImage(dataURL, 'JPEG', 20, 20, 170, 80); //addImage(image, format, x-coordinate, y-coordinate, width, height)
    pdf.save("download.pdf");

    Please take a look at this updated JSFiddle for complete code.


    Vishwas R
    Team CanvasJS

    in reply to: Multiple canvasjs charts in MVC partial views #20892

    @arbitus40,

    Can you kindly share sample project along with sample data over Google-drive or Onedrive so that we can look at your code, understand it better and help you out?


    Vishwas R
    Team CanvasJS

    Bimal,

    The behaviour is designed so that toolTip is shown based on nearest x-values irrespective of y-values and chart-type. However toolTip will be shown only when you hover on column when its not shared.


    Vishwas R
    Team CanvasJS

    Bimal,

    We observe that the toolTIp gets hidden while panning the chart. Can you kindly create jsfiddle reproducing the issue so that we can understand your scenario better and help you out?


    Vishwas R
    Team CanvasJS

    in reply to: update chart with new values #20849

    @Unixssh,

    rangeChanging and rangeChanged are triggered everytime when viewportMinimum or viewPortMaximum are updated while zooming, panning, or reset. If you like to perform some task within rangeChanging/rangeChanged for custom range, you can add a condition to check the range before the actual functionality.

    rangeChanging: function(e) {
        if(e.axisX[0].viewportMinimum > customRangeMinimum && e.axisX[0].viewportMaximum < customRangeMaximum) {
            //Your code goes here
        }
    }


    Vishwas R
    Team CanvasJS

    in reply to: update chart with new values #20841

    @unixssh,

    You can perform data filtering based on range of zoomed region with the help of rangeChanging event. Initially you can read all data using AJAX and pass it to chart. Based on range of zoomed-region, you can filter the datapoints upon zooming. Below is the code snippet.

    if (e.trigger === "zoom") {
        chart.options.data[0].dataPoints = [];
        if (((e.axisX[0].viewportMaximum - e.axisX[0].viewportMinimum) / hours) < 1) {
            for (var i = 0; i < dps.length; i++) {
                chart.options.data[0].dataPoints.push(dps[i]);
            }
        } else if (((e.axisX[0].viewportMaximum - e.axisX[0].viewportMinimum) / (hours)) < 24) {
            for (var i = 0; i < dps.length; i += 10) {
                chart.options.data[0].dataPoints.push(dps[i]);
            }
        }
    }

    Please take a look at this JSFiddle for an working example on the same.
    column chart with data filtering

    moving the code to rangeChanged function it seems the chart is not render properly and i don’t understand why

    In the JSFiddle that you have shared, you are generating new dataPoints with x-value as date-time which is outside the range you have zoomed. Because of this you may find chart to be blank after zooming into a certain region – without any dataPoints.


    Vishwas R
    Team CanvasJS

    in reply to: Embed chart in outlook #20838

    @drentsch,

    Due to security reasons mail-clients doesn’t support JavaScript in mail. Due to this, its not possible to embed charts in the mail. However you can export chart as an image and embed image in the mail.


    Vishwas R
    Team CanvasJS

    in reply to: viewportMaximum not working for stacked column chart #20806

    @bimal-shah,

    We have just released v2.1.2 with this bug fix. Please refer to the release blog for more information. Do download the latest version from our download page and let us know your feedback.


    Vishwas R
    Team CanvasJS

    in reply to: update chart with new values #20796

    @unixssh,

    Datapoint accepts x-value and y-value with optional label and z-value. In your case, you seem to be passing a property called ‘w’ instead of ‘y’ on clicking update button. Changing chart.options.data[0].dataPoints[i] = {x:date1, w:w}; to chart.options.data[0].dataPoints[i] = {x:date1, y:w}; should work fine in your case.

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


    Vishwas R
    Team CanvasJS

Viewing 15 posts - 1,066 through 1,080 (of 1,615 total)