Welcome Guest Search | Active Topics |

Datapoint labels slide on top of axes issue
Topsolutions
#1 Posted : Monday, September 21, 2015 7:23:03 AM(UTC)
Rank: Newbie

Groups: DataVizJQuery, jQueryGauges, Registered
Joined: 8/6/2013(UTC)
Posts: 2

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

I encountered a strange behaviour when working with datapoint Labels and zoom+slide,
I have this simple column chart:
[img]https://drive.google.com/file/d/0B_hWU5z1QeE3UGJHN1BSazh0cEE/view?usp=sharing[/img]

When i zoom-in and drag the chart to the left. the datalpoint labels sort of slides on top of the left axis:
[img]https://drive.google.com/open?id=0B_hWU5z1QeE3amViTWYtMzB4elk[/img]
(Notice the "10" label floating on the left axis)

This happens in horizontal and vertical scrolling with all axes (left,right,top,bottom), quite a problem since it hides some of the text and looks bad...

is there a way to prevent this from happening? (axis background / somehow determine the chart's actual area)

sample code of the chart's creation:
Code:

$("#Chart").jqChart({
                    title: { text: "Test" },
                    animation: { duration: 1},
                    shadows: { enabled: true },
                    axes: [
                        {
                            labels: { cursor: "pointer" },
                            location: "bottom",
                            title: { fillStyle: "black", font: "18px sans-serif", lineWidth: 1, text: "Bottom"},
                            zoomEnabled: true
                        },
                        {
                            interval: 50,
                            location: "left",
                            majorGridLines: { interval: 12.5 },
                            title: { fillStyle: "black", font: "18px sans-serif", lineWidth: 1, text: "Left"}
                        }
                    ],
                    series: [
                        {
                            cursor: "pointer",
                            data: [["1", 10],["2", 5]],
                            labels: { font: "15px sans-serif" },
                            nullHandling: "break",
                            title: "1",
                            type: "column"
                        },
                        {
                            cursor: "pointer",
                            data: [["1", 2],["2", 18]],
                            labels: { font: "15px sans-serif" },
                            nullHandling: "break",
                            title: "2",
                            type: "column"
                        }
                    ],
                    legend: { allowHideSeries: true, title: { text: "Legend" }, visible: true },
                    border: { visible: false },
                });


Thanks.
Dragan
#2 Posted : Friday, September 25, 2015 5:49:42 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

currently this is the desired behavior. Before we clipped the labels when they are outside the chart area, but we had some complaints about this. If you want you can set some color to the data point labels, so it will be visible that they are different that the axis labels.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.127 seconds.