Home Forums Chart Support How can I remove the Hyphen associated with my axisY values?

How can I remove the Hyphen associated with my axisY values?

Viewing 2 posts - 1 through 2 (of 2 total)
  • #59989

    <div>
    <CanvasChart
    option={{
    dataPointWidth: 20, // Adjust width as needed
    dataPointMaxWidth: 22, // Slightly higher than width
    innerWidth: 350,
    animationEnabled: true,
    axisX: {
    labelFontColor: “rgba(61, 70, 90, 1)”,
    labelFontSize: 10,
    intervalType: “year”,
    labelFormatter(label: any) {
    return moment(label.value).year();
    },
    },
    axisY: {
    labelFontColor: “rgba(61, 70, 90, 1)”,
    labelFontSize: 10,
    gridThickness: 0,
    labelFormatter(e: any) {
    return priceFormatter2decimal.format(Math.abs(e.value));
    },
    },
    legend: {
    maxHeight: 20,
    horizontalAlign: “left”,
    verticalAlign: “left”,
    cursor: “pointer”,
    },
    toolTip: {
    shared: true,
    contentFormatter: function (e: any) {
    return (
    “<div style=’padding:2px 4px;’>” +
    “<span style=’ font-size: 10px; font-weight: 500; line-height: 14px; text-align: left; color:rgba(61, 70, 90, 1);’>Available :</span> ” +
    `<span style=’ font-size: 10px; font-weight: 500; line-height: 14px; text-align: left; color:rgba(61, 70, 90, 1);’>${numberComma(
    e.entries[0].dataPoint.y
    )}</span> ` +
    “<br />” +
    “<span style=’ font-size: 10px; font-weight: 500; line-height: 14px; text-align: left; color:rgba(100, 110, 131, 1);’>Total :</span> ” +
    `<span style=’ font-size: 10px; font-weight: 500; line-height: 14px; text-align: left; color:rgba(100, 110, 131, 1);’>${numberComma(
    e.entries[1].dataPoint.y
    )}</span>` +
    “</div>”
    );
    },
    cornerRadius: 4,
    animationEnabled: true,
    },
    }}
    seriesData={seriesData}
    />
    </div>

    #59990

    @ayankhan21,

    Are you referring to the axis ticks? If so, you can remove the hyphen next to the axis labels by setting the tickLength to 0. This will hide the ticks completely. If you’re referring to something else, could you please share a pictorial representation so that we can understand the scenario better and help you out?

    Axis Ticks, Grids & Interlaced Colors


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.