Forum Replies Created by saqib

Viewing 12 posts - 1 through 12 (of 12 total)
  • in reply to: Show 30 background Line (1 for Each Day). #30958

    Sorry My Bad. I want this for axisX.

    in reply to: Show Tooltip without Mouse Hover #30705

    Thanks. Let me Take a look and try this if it works.

    in reply to: Show Tooltip without Mouse Hover #30700

    Here is the sample project Based on your Angular Example.

    Github Repo

    in reply to: Show Tooltip without Mouse Hover #30699

    I am using it in my Angular Project. I downloaded CanvasJs Angular Example and it shows SAME Error even in your Angular Sample project.
    I am trying to make Working Example to share with you so you can track this bug.

    in reply to: Show Tooltip without Mouse Hover #30683

    its Showing Error:

    core.js:6014 ERROR TypeError: chart.toolTip.showAtX is not a function

    showAtX() is not defined. i have tested in in stackblitz and its working but not in my Code.

    in reply to: axisY not calculating to 100%; #30619

    it Worked. Thanks a lot for this library.

    in reply to: axisY not calculating to 100%; #30607

    its something like this:

    JS Fiddle

    Check this example. in this example its showing 97% at most. but in my Actual example its showing 89% at most.

    • This reply was modified 3 years, 10 months ago by saqib.
    in reply to: How to use fixed Y axis 0-100% #30525

    Got the solution with some changes in for Loop.

     let a = [];
      chart.options.data.forEach((val, i)=>{
        //alert(JSON.stringify(val), i);
        val.dataPoints.forEach((val2)=>{
          a.push(val2.y)
        })
      })
      maxY = Math.max(...a);
      console.log(maxY, a)
    in reply to: How to use fixed Y axis 0-100% #30523

    One more thing!!
    What if i have More then 1 Line. how can i calculate 100% for Multi data (multiple objects as dataPoints).
    in the blow data i have max point in 2 object and it can be in any object as it is multi line chart. how can i calculate in that scenario.

    data: [              
          {
            // Change type to "doughnut", "line", "splineArea", etc.
            type: "spline",
            dataPoints: [
              { x: 10, y: 150 },
              { x: 20, y: 400 },
              { x: 30, y: 500 },
              { x: 40, y: 2000 },
              { x: 50, y: 814 },
              { x: 60, y: 68 },
              { x: 70, y: 28 },
              { x: 80, y: 34 },
              { x: 90, y: 14 }
            ]
          },
          {
            type: "spline",
            dataPoints: [
              { x: 10, y: 150 },
              { x: 20, y: 400 },
              { x: 30, y: 800 },
              { x: 40, y: 1500 },
              { x: 50, y: 814 },
              { x: 60, y: 68 },
              { x: 70, y: 3000 },
              { x: 80, y: 34 },
              { x: 90, y: 14 }
            ]
          }
        ]
    • This reply was modified 3 years, 10 months ago by saqib.
    in reply to: How to use fixed Y axis 0-100% #30509

    Thanks. It Worked.

    in reply to: How to use fixed Y axis 0-100% #30427

    I want to Y value to counted as 100%.
    Actually my Data looks like this:

    dataPoints: [
      { x: new Date(), y: 150 },
      { x: new Date(), y: 400},
      { x: new Date(), y: 500 },
      { x: new Date(), y: 2000 },
    ]

    `axisY: {
    suffix: “%” // this should be calculated to 100% of Y values.
    },`

    in reply to: How to use fixed Y axis 0-100% #30394

    i have data like:

    dataPoints: [
    { x: 10, y: 150 },
    { x: 20, y: 400},
    { x: 30, y: 500 },
    { x: 40, y: 2000 },
    { x: 50, y: 814 },
    { x: 60, y: 68 },
    { x: 70, y: 28 },
    { x: 80, y: 34 },
    { x: 90, y: 14}
    ]

    I want to show axisY to 100%. is there any solution.

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