Home › forums › Using CanvasJS › Bubble Charts getting cut
Tagged: bubble chart getting cut in axis
This topic contains 5 replies, has 4 voices, and was last updated by Vishwas R 1 month, 1 week ago.
Few of my bubble charts getting cut both on X and Y axis and some in top too.
Will canvasJS bubble chart not auto adjust and give the bubble without getting cut.
For eg: if I have data point (0,10) I am able to see only half bubble as the remaining half gets under the negative X axis.
Will canvasJS for bubble charts cannot auto adjust and show the full bubble?
I can understand by finding the Xmin, Xmax.YMin and YMax of my datapoints I can set the minimum and maximum by extrapolating it but that is not working in all cases. So would like to know is there is in-house solution for the issue if not what could be the possible ways to not get the bubble truncated.
As the axes automatically start from the lowest value in dataPoints, if you want all of your bubbles in full, you’d have to change the minimum and maximum values. Please take a look at this jsFiddle.
Thanks for the response.I am v1.8.0 and my chart has only render() and options. So nothing exposed apart from that.
So how could I make this work without an upgarde to v1.9.0.
Methods and properties were introduced in v1.9.6 so this can’t be done with older versions. Please download the latest version from here.
Sorry this is an old thread, but facing similar concern. Why don’t we handle this on the charting side ?
> if you want all of your bubbles in full, you’d have to change the minimum and maximum values.
Finding the appropriate delta calls for some logic. E.g.for the above situation, we need to find the maximum bubble radius, multiply that with the pixelValueRatio to get the delta in yAxis/xAxis. Lemme know if I am missing something here.
Was also referring to https://github.com/highcharts/highcharts/blob/master/js/parts-more/BubbleSeries.js#L470
I came by the similar issue when setting markerSize in a lineChart and some of the markers were cutting off at xAxis.Thx!
Thanks for your suggestion, we will reconsider this behavior for future releases.
You must be logged in to reply to this topic.