Jump to content
JChartFX Community
  • 0

Horizontal scroll


Question

4 answers to this question

Recommended Posts

  • 0

1. Unfortunately scrolling is not supported in 3D charts, the reason for this is that in 2D we render all the points and when scrolling only change clipping and location of the viewport for performance reasons

2. Not sure what you mean by this, please provide screenshot.

3. About the labels, we do not consider the labels as part of the calculation of the Axis Min/Max so it is possible they will get clipped. The only workaround would be for you to set the Min/Max to ensure this does not happen. 

Regards,

JuanC

Link to post
Share on other sites
  • 0
On 8/25/2020 at 8:42 PM, JuanC said:

1. Unfortunately scrolling is not supported in 3D charts, the reason for this is that in 2D we render all the points and when scrolling only change clipping and location of the viewport for performance reasons

2. Not sure what you mean by this, please provide screenshot.

3. About the labels, we do not consider the labels as part of the calculation of the Axis Min/Max so it is possible they will get clipped. The only workaround would be for you to set the Min/Max to ensure this does not happen. 

Regards,

JuanC

There's my response up there

Link to post
Share on other sites
  • 0

If your chart has only 1 series, there is a workaround which is to try to show the labels on top of the bars except of bars that are too close to the top, unfortunately this is not a built in feature so you will have to loop through your values and adjust the per-point label attributes, e.g. something like this

    for(var i = 0; i < chart1.getData().getPoints(); i++) {
        var value = chart1.getData().getItem(0, i);
        if (Math.abs(value - max) <= factor) {
            chart1.getPoints().getItem(0, i).getPointLabels().setLineAlignment(cfx.StringAlignment.Near);
        }
    }
 

Where max is the maximum of your data values and factor is calculated to make sure you only change the point label alignment for the values that are close to the top so are likely to get clipped in a scrolling chart.

Regards,

JuanC

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...