Home forums Using CanvasJS Need Average between primary and secondary axis

This topic contains 2 replies, has 2 voices, and was last updated by  mujahid_102 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #14656



    I am using CanvasJS and I am very much happy about this. Now I need help to calculate average between primary and secondary y-axis on Bar Chart. Suppose I am comparing values between two marks. Two teachers given their marks on a single question. I want to compare both and generate the average and show it either level or index level. I can access only one value using
    indexLabelFormatter: function (e){

    but cant access both primary and secondary values at a time. I need help please. A sample shown in bellow
    Q2 |____________|_3___________
    (avg 4) |_________________________|5
    Q1 |_________________________| 5
    (avg 4.5)|___________________|4


    Suyash Singh


    Thank you for your interest in CanvasJS.

    Here is an example of showing the average on axis labels. For this you need to find the average of dataPoints and set it to axis label using chart options before rendering the chart.

    Suyash Singh
    Team CanvasJS



    Thanks a lot brother

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

You must be logged in to reply to this topic.