Home Forums Chart Support markerimage

markerimage

Viewing 4 posts - 1 through 4 (of 4 total)
  • #33675

    Dear Canvas Team,
    Please check markerimage not shown in both graph Please HelpCanvas Custommarkerimage

    #33700

    @ashu-sharma,

    In the link that you have shared, there are couple of issues because of which image is not being shown. Please find them addressed below.

    1. Image for the 1st datapoint is not shown as markerImageUrl is not passed to it. Passing markerImageUrl works fine.
    {"y":"","label":125, "markerImageUrl":"https:\/\/soundoflife.in\/audiology\/images\/less-than.png"}

    2. Images are not being shown in 2nd chart as imageUrl property is being stored in 2nd dataseries of the chart but while passing it as src, you are trying to read it from 1st dataseries. Reading it from 2nd dataseries works fine in this case. Please find the code-snippet below.

    function addMarkerImages1(chart1) {
      for (var i = 0; i < chart1.data[1].dataPoints.length; i++) {
        Markers.push($("<img>").attr("src",chart1.data[1].dataPoints[i].ImageUrl)
          .css("display", "none")
          .css("height", 20)
          .css("width", 20)
        
          .appendTo($("#chartContainer1>.canvasjs-chart-container"))
        );
        positionMarkerImage1(Markers[i], i);
      }
    }

    Image as Marker across Multiple Charts

    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, understand the scenario better and help you out.

    Considering this as duplicate of markerimage, hence closing the same.


    Vishwas R
    Team CanvasJS

    #33707

    Thank You For This Valuable Time.

    Please Tell me how to started Y axis 120 to -10 .Audiogram

    Please suggest.

    #33748

    @ashu-sharma,

    You can set custom range to axis by setting minimum & maximum. Based on the image that you have shared, you can use reversed axis to show negative values towards top & positive towards bottom. Below is the code-snippet to set y-axis range from -10 to 120.

    axisY: {
        reversed: true,
        minimum: -10,
        maximum: 120
    }

    Chart with Reversed Y-Axis


    Vishwas R
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.