Home Forums Chart Support remove gaps in between graphs Reply To: remove gaps in between graphs

#36142

@nidhi_dew,

It seems like you are passing timestamp in seconds whereas JavaScript uses milliseconds as timestamp. Hence you need to multiply the Unix timestamp by 1000 to convert it to JavaScript timestamp. You can add scaleBreaks to remove unnecessary regions with few lines of code as shown in the below code snippet.

 scaleBreaks: {
      customBreaks: [{
        startValue: 1631341054000,
        endValue: 1631343358000,
        spacing: 0,
        type :"straight",
      },
      {
        startValue: 1631345066000,
        endValue: 1631345183000,
        spacing: 0,
        type :"straight",
        }],  
    },

Also take a look at this updated JSFiddle for complete code.

remove gaps between dataPoints in rangeBar chart


Ranjitha R
Team CanvasJS