Jump to content
JChartFX Community
  • 0
ql_maxg

BUG - 2 elements with identical ID

Question

ql_maxg    0

Hello!

Just found another bug:

http://jsfiddle.net/t8ufarc3/17/

 

Please note, script produced 2 elements:

<div id="chart" class="jchartfx"> ...

and

<svg width="832" height="400" xmlns="http://www.w3.org/2000/svg"xmlns:sfx="http://www.softwarefx.com/ns" xmlns:xlink="http://www.w3.org/1999/xlink" id="chart" class="jchartfx">...

 

----------

with the same id="chart", that should be fixed, it causes some issues in my app.

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
JuanC    3

We do generate those 2 divs, one for measuring and the second one is the svg rendering of the chart.

 

We will research if we can rename the measuring one but you never specified which issue is caused in your app as maybe there is a workaround for it.

 

JuanC

Share this post


Link to post
Share on other sites
  • 0
ql_maxg    0

There are 2 issues:

1 HTML/xHTML not valid with 2 identical IDs of elements.

2 It produces a buggy PNG exported image with 2 canvases overlapped.

Share this post


Link to post
Share on other sites
  • 0
JuanC    3

Our current internal build will not assign an ID to the first div (used for rendering). This should be part of the pre-release bits soon.

 

Also note that if you have 2 charts in a page, we will be changing the ID of the second (and so on) svgs. In reality we do not need that ID at all but we are afraid we might break somebody who is using getElementById to get to the svg element.

 

Regards,

 

JuanC 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×