Forum Replies Created by Thangaraj Raman

Viewing 15 posts - 1 through 15 (of 204 total)
  • @ranc,

    You can set the datapoint color based on the datapoint value, whether it’s rising or falling as shown in the code snippet below:

    function changeBorderColor(chart){
      var dataSeries;
      for( var i = 0; i < chart.options.data.length; i++){
        dataSeries = chart.options.data[i];
        for(var j = 0; j < dataSeries.dataPoints.length; j++){
          dataSeries.dataPoints[j].color = (dataSeries.dataPoints[j].y[0] <= dataSeries.dataPoints[j].y[3]) ? (dataSeries.risingColor ? dataSeries.risingColor : dataSeries.color) : (dataSeries.fallingColor ? dataSeries.fallingColor : dataSeries.color);
        }
      }
    }

    Please check this JSFiddle for a working example.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Inline images blocked by Content Security Policy #44833

    @ashley-mercer,

    Thanks for reporting the use case. We will revisit this in future releases.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Gradient Fill for RangeAreaChart #44824

    @kinokatsu,

    Gradient is there in our roadmap but no definite timeline yet.


    Thangaraj Raman
    Team CanvasJS

    in reply to: How to make it work? #44719

    @vendland,

    The samples from our website have been built using Eclipse and we suggest you to run it in Tomcat server(<=v9) within Eclipse. However, if you want to run it in IntelliJ IDEA, you will have to configure Tomcat server(<=v9) within IntelliJ IDEA. Please refer to this article for a tutorial on the same.


    Thangaraj Raman
    Team CanvasJS

    in reply to: How to make it work? #44714

    @vendland,

    The sample that you have shared is not working irrespective of the chart code. Please refer to the screenshot below. Spring MVC downloadable sample seems to be working fine. You can download the same from here.

    Spring Maven Intellij Sample


    Thangaraj Raman
    Team CanvasJS

    in reply to: Empty Charts #44612

    @doubletop,

    Date-time values can be displayed on a chart by week, month, or year based on the data being passed to it. Please take a look at this gallery page for an example of creating a chart using month-wise data.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Using CanvasJs from Typescript #44553

    @friksa,

    You can download the commercial version package from the My Account page and the steps to integrate have been addressed in the instruction.html file which is present inside each package under the @canvasjs folder.

    For example, if you are integrating CanvasJS charts with Angular, download the commercial version and navigate to @canvasjs > angular-charts > instruction.html


    Thangaraj Raman
    Team CanvasJS

    in reply to: Integrate commercial CanvasJs via NPM #44549

    Xavier,

    Thanks for your valuable feedback. As of now, the commercial version of the package is available to download from My Account page only.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Using CanvasJs from Typescript #44490

    @friksa,

    You can download the commercial version of CanvasJS from My Account page and follow the instructions in the readme file to integrate it into your project.


    Thangaraj Raman
    Team CanvasJS

    in reply to: how to enable chart toolbar #44455

    @pritish70,

    Please take a look at this gallery example where exporting is enabled. Setting the exportEnabled property to true in chart option seems to work fine. Please refer to documentation for more chart options & customizations available.


    Thangaraj Raman
    Team CanvasJS

    in reply to: how to enable chart toolbar #44449

    @pritish70,

    You can enable the chart toolbar for printing and saving charts as an image in CanvasJS Angular Charts by setting exportEnabled to true.


    Thangaraj Raman
    Team CanvasJS

    in reply to: Multi series pareto chart #44317

    @lujakob,

    The interval at which axis labels are shown is auto-calculated based on the axis range. You can set the x-axis interval to 1 to show the x-axis labels at whole numbers.

    Please check this updated StackBlitz for a working example of the same.


    Thangaraj Raman
    Team CanvasJS

    in reply to: stacked column stacked all label into 1 column #44312

    @chteow,

    In the case of Stacked Charts, datapoints across multiple dataseries are aligned based on x-values and not labels. Passing x-value along with the label should work fine in this case.

    Please take a look at this JSFiddle for a working example on the same.

    StackedColumn chart aligned based on x-values


    Thangaraj Raman
    Team CanvasJS

    in reply to: Scaling charts #44291

    @irene,

    By default, the chart width is 100% and height is 400px. To scale the chart, you can set the width and height of the container in which the chart will be rendered based on your requirement as shown in the code snippet below.

    <div id="chartContainer" style="height: 500px; width: 800px;">


    Thangaraj Raman
    Team CanvasJS

    in reply to: Range column graph with different index labels #44268

    @alexg00,

    1. Is it possible in range area chart to have top and bottome lines in different color?

    It is not possible to set different colors for the top and bottom lines of a range area chart as of now. However, you can add a line dataseries with the y-values same as one of the range values in the range area chart to fulfill your requirement. Please take a look at this JSFiddle for a working example on the same.

    2. Is it possible to set a different area color between points in the range area chart?

    The range area chart can only have one fill color as of now. However, by splitting your datapoints into multiple range area dataseries, you can achieve your requirement. Please take a look at this JSFiddle for a working example on the same.

    3. Is it possible to set a different chart background color between points in the range area chart?

    Could you please elaborate on what you mean by “set a different chart background color between points” or share a pictorial representation of this requirement so that we can understand your scenario better and help you out with an appropriate solution?

    Range Area Chart with different line colors


    Thangaraj Raman
    Team CanvasJS

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