Jump to content
JChartFX Community
  • 0

Remove line shadow and sort values in the tooltips


flapane

Question

 Hi,

I've searched through examples, but I couldn't find a solution.

How do I remove the (don't get me wrong) ugly shadow that appears if I switch from coreBasic to coreVector?

jGjSn6i.jpg

How can I dinamically sort the y-axis values in the tooltip, so that they are always displayed from the smallest to the biggest value?

IEwoIax.jpg 

Thanks in advance

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

To remove the shadow of the line you can do this

    chart1.setGallery(cfx.Gallery.Lines);

    chart1.getGalleryAttributes().setTemplate("LineBasic");

I noticed in the screenshot you posted the shadow does not really "match" the green line, is this the behavior you are getting? If so, can you tell us the browser you are using and possibly post a small sample that duplicates this? 

Sorting the list of series in the tooltips is currently not supported but is something interesting so we will consider this for future versions/builds.

JuanC 

Desktop.zip

Link to comment
Share on other sites

  • 0

It seems to be a bug in FireFox, I tested FF28 in both Windows (8.1 x64) and MacOS, the line shadow looks ok in Windows but looks wrong in MacOS. I was able to simplify to the following svg, this looks good in IE10 / IE11, it also looks good in Chrome, Safari in MacOS but fails to render correctly in FF in MacOS (apparently it also fails for you in Windows so it might be driver related as it looks ok in FF28 in Windows for me).

<svg width="600" height="400" x="0" y="0">

  <defs>

    <clipPath id="C0sStyle0">

      <rect x="35" y="30" width="535" height="340"></rect>

    </clipPath>

    <filter id="C0sStyle1">

      <feGaussianBlur stdDeviation="2"></feGaussianBlur>

      <feOffset dx="0" dy="2"></feOffset>

    </filter>

  </defs>

  

  <g>

    <polyline filter="url(#C0sStyle1)" clip-path="url(#C0sStyle0)" points="88.9,127.35714285714283 195.7,175.78571428571428 302.5,78.92857142857144 409.3,103.14285714285711 516.0999999999999,30.5 " style="stroke:#000000;stroke-width:3;stroke-opacity:0.30196078431372547;fill:none"></polyline>

    <polyline clip-path="url(#C0sStyle0)" points="88.9,127.35714285714283 195.7,175.78571428571428 302.5,78.92857142857144 409.3,103.14285714285711 516.0999999999999,30.5 " style="stroke:#4281a4;stroke-width:3;fill:none"></polyline>

  </g>

</svg>

JuanC 

If I remove the clip-path from the first polyline (that generates the shadow) it looks ok so the bug seems to be related to this. I have tested FF in the same MacOS machine before and it looked ok so it might be a new bug in FF28.

JuanC 

Link to comment
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...