jfetner

Invalid Xml Data For Linked Chart

Recommended Posts

If one of my linked charts has a javascript link the linked chart fails to load with an Invalid xml error.  The linked chart loads correctly when I remove the link and if I load the linked chart separatly it also works.  Here is an example: (See the 2004-quarterly linked chart).

 

<chart caption='Yearly sales' xAxisName='Year' yAxisName='Sales'>
  <set label='2004' value='37800' link='newchart-xml-2004-quarterly' />
  <set label='2005' value='21900' link='newchart-xml-2005-quarterly' />
  <set label='2006' value='32900' link='newchart-xml-2006-quarterly' />
  <set label='2007' value='39800' link='newchart-xml-2007-quarterly' />
 
  <linkeddata id='2004-quarterly'>
    <chart caption='Quarterly Sales Summary' subcaption='For the year 2004'
    xAxisName='Quarter' yAxisName='Sales' >
      <set label='Q1' value='3700'  link='JavaScript: isJavaScriptCall=true; drillDownToLink("location");'/>
      <set label='Q2' value='2900' />
      <set label='Q3' value='3200' />
      <set label='Q4' value='3900' />
    </chart>
  </linkeddata>
 
  <linkeddata id='2005-quarterly'>
    <chart caption='Quarterly Sales Summary' subcaption='For the year 2005'
      xAxisName='Quarter' yAxisName='Sales'>
      <set label='Q1' value='7800' />
      <set label='Q2' value='2100' />
      <set label='Q3' value='3290' />
      <set label='Q4' value='3800' />
    </chart>
  </linkeddata>

  <linkeddata id='2006-quarterly'>
    <chart caption='Quarterly Sales Summary' subcaption='For the year 2006'
      xAxisName='Quarter' yAxisName='Sales'>
      <set label='Q1' value='3800' />
      <set label='Q2' value='2190' />
      <set label='Q3' value='3290' />
      <set label='Q4' value='3980' />
    </chart>
  </linkeddata>

  <linkeddata id='2007-quarterly'>
    <chart caption='Quarterly Sales Summary' subcaption='For the year 2007'
      xAxisName='Quarter' yAxisName='Sales'>
      <set label='Q1' value='3780' />
      <set label='Q2' value='1900' />
      <set label='Q3' value='2900' />
      <set label='Q4' value='9800' />
    </chart>
  </linkeddata>

</chart>

Share this post


Link to post
Share on other sites

If one of my linked charts has a javascript link the linked chart fails to load with an Invalid xml error.  The linked chart loads correctly when I remove the link and if I load the linked chart separatly it also works.  Here is an example: (See the 2004-quarterly linked chart).

 

<chart caption='Yearly sales' xAxisName='Year' yAxisName='Sales'>

  <set label='2004' value='37800' link='newchart-xml-2004-quarterly' />

  <set label='2005' value='21900' link='newchart-xml-2005-quarterly' />

  <set label='2006' value='32900' link='newchart-xml-2006-quarterly' />

  <set label='2007' value='39800' link='newchart-xml-2007-quarterly' />

 

  <linkeddata id='2004-quarterly'>

    <chart caption='Quarterly Sales Summary' subcaption='For the year 2004'

    xAxisName='Quarter' yAxisName='Sales' >

      <set label='Q1' value='3700'  link='JavaScript: isJavaScriptCall=true; drillDownToLink("location");'/>

      <set label='Q2' value='2900' />

      <set label='Q3' value='3200' />

      <set label='Q4' value='3900' />

    </chart>

  </linkeddata>

 

  <linkeddata id='2005-quarterly'>

    <chart caption='Quarterly Sales Summary' subcaption='For the year 2005'

      xAxisName='Quarter' yAxisName='Sales'>

      <set label='Q1' value='7800' />

      <set label='Q2' value='2100' />

      <set label='Q3' value='3290' />

      <set label='Q4' value='3800' />

    </chart>

  </linkeddata>

 

  <linkeddata id='2006-quarterly'>

    <chart caption='Quarterly Sales Summary' subcaption='For the year 2006'

      xAxisName='Quarter' yAxisName='Sales'>

      <set label='Q1' value='3800' />

      <set label='Q2' value='2190' />

      <set label='Q3' value='3290' />

      <set label='Q4' value='3980' />

    </chart>

  </linkeddata>

 

  <linkeddata id='2007-quarterly'>

    <chart caption='Quarterly Sales Summary' subcaption='For the year 2007'

      xAxisName='Quarter' yAxisName='Sales'>

      <set label='Q1' value='3780' />

      <set label='Q2' value='1900' />

      <set label='Q3' value='2900' />

      <set label='Q4' value='9800' />

    </chart>

  </linkeddata>

 

</chart>

Hi,

 

Could you please URL encode the "&" character in your "link" as "&" and see if this helps?

Ex:

<set ... link="JavaScript: isJavaScriptCall=true; drillDownToLink(&quot;location&quot;);" />
 

Hope this helps. :)

Share this post


Link to post
Share on other sites

when I update xml data in linkedchart always turn back to level 0. How to keep the same level?

Hi,

 

Please note that while you update the XML data in the chart, you are re-rendering the chart to reflect the change in the data.

 

Hence, every time you update the data, the chart would be displayed from the parent chart.

 

Hope this helps. :)

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