Forum Replies Created by Vishwas R

Viewing 15 posts - 166 through 180 (of 1,601 total)
  • in reply to: Trial Version text #35856

    @raj-chetule,

    CanvasJS commercial version doesn’t carry any watermark or credit link. You can purchase commercial version from the pricing page.

    For further queries, please contact sales@canvasjs.com.


    Vishwas R
    Team CanvasJS

    in reply to: Label below Splitline (New problem) #35815

    @kinokatsu,

    Yes, setting either color to transparent or thickness to 0 will work in this case. Thanks for the reply which will help others who has similar use-case.


    Vishwas R
    Team CanvasJS

    in reply to: How to add blank space to index label #35807

    @exclaim1337,

    Padding or offset in indexlabel is not available as of now. However, by adding unicode space / braille pattern dots-0 in the beginning / end, you can adjust indexlabel to be shown within the slice of doughnut. Please take a look at this updated JSFiddle for working example.

    Double Doughnut Charts


    Vishwas R
    Team CanvasJS

    in reply to: Label below Splitline (New problem) #35794

    @kinokatsu,

    There is no changes made related to stripline in recent releases. However, I observe that the JSFiddle provided in the other forum thread seems to be working fine. Also the color property is not set to transparent in the JSFiddle that you have shared. Setting it to transparent (currStripline.set("color", "transparent");) seems to be working fine. Please take a look at this updated JSFiddle for complete working code.

    stripline label positioned below line


    Vishwas R
    Team CanvasJS

    in reply to: How to update values in line chart from MySQL DB #35651

    @kodian,

    You can update datapoints & re-render chart at every 10 seconds with the help of setInterval. Please refer to this forum thread for more information & examples.


    Vishwas R
    Team CanvasJS

    in reply to: export graph and its data into excel #35633

    @daniel_peixoto,

    The code will work with trial version – which is fully-featured & can be used to evaluate for upto 30 days. You can check out license page for license-related queries or contact sales@canvasjs.com.


    Vishwas R
    Team CanvasJS

    in reply to: How to update values in line chart from MySQL DB #35632

    @kodian,

    In the sample project that you have shared, there are couple issues in parsing the data that you are fetching from database. Parsing the response-data properly seems to be working fine. Please take a look at this updated sample project.

    Multi Series Line Chart - Data from Database


    Vishwas R
    Team CanvasJS

    in reply to: export graph and its data into excel #35612

    @daniel_peixoto,

    Thanks for reporting the use-case. There was a minor issue with the object reference in the external code added for exporting the chart data as CSV. We have updated the same, please take a look at updated JSFiddle.
    Export Multi Series Chart Data as CSV


    Vishwas R
    Team CanvasJS

    in reply to: How to update values in line chart from MySQL DB #35602

    @kodian,

    The sample shared seems to have some dependency issues & is not working locally. Please refer to the screenshot below.
    user shared sample dependencies

    Can you kindly share working sample along with all the dependencies so that we can run it locally, understand the scenario better and help you out?


    Vishwas R
    Team CanvasJS

    in reply to: How to update values in line chart from MySQL DB #35596

    @kodian,

    We are looking into your query & get back to you at the earliest.


    Vishwas R
    Team CanvasJS

    in reply to: export graph and its data into excel #35174

    @sptrainee31,

    Previously shared solution seems to be working only for single-series & not for multi-series. The code provided in the previously shared solution can be further improved to make it work with multi-series chart as shown in below code-snippet.

    function convertChartDataToCSV(args) {
      var result = '',
          ctr, keys, columnDelimiter, lineDelimiter, data;
    
      data = args.data || null;
      if (data == null || !data.length) {
        return null;
      }
    
      columnDelimiter = args.columnDelimiter || ',';
      lineDelimiter = args.lineDelimiter || '\n';
    
      var mergedData = mergeData(data);
    
      keys = Object.keys(mergedData[0]);
      result = '';
      result += keys.join(columnDelimiter);
      result += lineDelimiter;
    
      mergedData.forEach(function (item) {
        ctr = 0;
        keys.forEach(function (key) {
          if (ctr > 0) result += columnDelimiter;
          result += (typeof (item[key]) != undefined ? item[key] : "");
          ctr++;
        });
        result += lineDelimiter;
      });
      return result;
    }

    Please take a look at this JSFiddle for working code. Also take a look at this external plugin, which has been updated to work with multi-series chart.


    Vishwas R
    Team CanvasJS

    in reply to: Toolbar color with chart options? #35172

    [Update]


    @mbringezu
    ,

    We have just released v3.4 Beta-1 with this feature. Please refer to the release blog for more information. Do download the latest version from download page & let us know your feedback.

    JavaScript Chart Toolbar


    Vishwas R
    Team CanvasJS

    in reply to: Reset button #35116

    @malvika,

    You can reset the axis range programmatically by setting viewportMinimum & viewportMaximum to null. Please refer to the code-snippet below which shows how to reset the axis range on button click.

    document.getElementById("resetChart").addEventListener("click", function() {
      chart.axisX[0].set("viewportMinimum", null, false);
      chart.axisX[0].set("viewportMaximum", null);
    });

    Please take a look at this JSFiddle for complete code.
    Reset Axis Range Programmatically


    Vishwas R
    Team CanvasJS

    in reply to: How to update values in line chart from MySQL DB #35000

    @kodian,

    CanvasJS supports multi-series charts as demonstrated in the previously shared sample. In order to render just one line (single dataseries), you need to pass just one dataseries in the chart-options as shown below.

    $.each((data), function(key, value){
    	chart.options.data[0].dataPoints.push({label: value[0], y: parseInt(value[1])});
    });

    Please take a look at this updated sample project for working code. Also refer to PHP Gallery for more set of examples along with source-code.

    If you are still facing issue, can you kindly share sample project over Google-Drive or Onedrive along with sample database and brief us further so that we can understand your issue better & help you out?

    PHP Dynamic Chart with Data from MySQL Database


    Vishwas R
    Team CanvasJS

    in reply to: How to update values in line chart from MySQL DB #34987

    @mohsaid,

    You can update datapoints in the chart for every 2 seconds by changing chart-options & calling chart.render() within setInterval.

    setInterval(function() {
    	chart.options.data[0].dataPoints.push({x: 10, y: 20});
    	chart.render();
    }, updateInterval);

    To update the same with the data from the database, you need to read data from database & return it from PHP (service.php), parse it to the format accepted by CanvasJS & render the chart. Please find the code-snippet below.

    var updateChart = function() {
    	$.getJSON("service.php", function(result) {
    		dps.splice(0, dps.length);
    		$.each(result, function(index, value) {
    			dps.push(value);
    		});
    	});
    
    	chart.render();
    };
    
    setInterval(function() {
    	updateChart()
    }, updateInterval);

    Please take a look at this sample project for complete working code.

    Also refer to this forum thread and PHP Gallery Page for more examples along with working code. You can also download PHP sample that you can run locally from our download page.

    PHP Chart with Data from Database


    Vishwas R
    Team CanvasJS

Viewing 15 posts - 166 through 180 (of 1,601 total)