Jump to content
Software FX Community

Drill Down - setUrl


User (Legacy)

Recommended Posts

Hello

I am trying to drill down on a pie chart using the following code in a JSP.

<%

chart1.getPoint(<series>, index>).setUrl("destination");

%>

The drill down works fine when there is only one chart being displyed by a

JSP. However, if there are multiple charts on the same JSP, the URL on the

2nd chart points to the URL of the first chart (even though the two charts,

and hence their URLs are entirely different).

Is this a known issue with charfx? If so, what could be a possible

workaround?

Thank You

KC

Link to comment
Share on other sites

Hi KC,

The way to solve that issue is by adding a forth parameter to the getHtmlTag

call, i.e:

chart1.getHtmlTag("450","280","PNG","chart1")

chart2.getHtmlTag("450","280","PNG","chart2")

That forth parameter will be used as the Map name, so each chart will use

their own image map, and the links will be right.

I realize this parameter has not been documented, I'll put a request to

update the docs.

Regards,

GA

Software FX

"Kunal Chawla" <kunal.chawla@appiancorp.com> wrote in message

news:WeJbj3ofFHA.1484@webserver3.softwarefx.com...

> Hello

>

> I am trying to drill down on a pie chart using the following code in a

> JSP.

> <%

> chart1.getPoint(<series>, index>).setUrl("destination");

> %>

>

> The drill down works fine when there is only one chart being displyed by a

> JSP. However, if there are multiple charts on the same JSP, the URL on the

> 2nd chart points to the URL of the first chart (even though the two

> charts,

> and hence their URLs are entirely different).

>

> Is this a known issue with charfx? If so, what could be a possible

> workaround?

>

> Thank You

>

> KC

>

>

Link to comment
Share on other sites

Thanks for the reply. I have a follow up question.

The solution you suggested works fine for a JSP that has 2 (or a known

number of ) Chart objects that are unique (for example: chart1 and chart2)

so distinct Image maps can be generated for each graph.

I have a JSP, which generates a graph using

chart1.getHtmlTag("450","280","PNG","chart1")

This JSP being rendered by a page multiple times to display multiple graphs

on the same page (like a Dashboard). Since the Chart object name (i.e.

chart1) does not change each time a new graph is created, the Image maps for

all charts are not generated corectly by this solution. I am not sure if I

can dynamically change the name of a Java object (i.e. chart1 ) each time

the code is executed.

Do you have any other suggestions on how to solve this problem.

Thanks

KC

"SoftwareFX Support" <noreply> wrote in message

news:Xi36ejjgFHA.1484@webserver3.softwarefx.com...

> Hi KC,

>

> The way to solve that issue is by adding a forth parameter to the

getHtmlTag

> call, i.e:

>

> chart1.getHtmlTag("450","280","PNG","chart1")

> chart2.getHtmlTag("450","280","PNG","chart2")

>

> That forth parameter will be used as the Map name, so each chart will use

> their own image map, and the links will be right.

>

> I realize this parameter has not been documented, I'll put a request to

> update the docs.

>

> Regards,

> GA

> Software FX

>

>

> "Kunal Chawla" <kunal.chawla@appiancorp.com> wrote in message

> news:WeJbj3ofFHA.1484@webserver3.softwarefx.com...

> > Hello

> >

> > I am trying to drill down on a pie chart using the following code in a

> > JSP.

> > <%

> > chart1.getPoint(<series>, index>).setUrl("destination");

> > %>

> >

> > The drill down works fine when there is only one chart being displyed by

a

> > JSP. However, if there are multiple charts on the same JSP, the URL on

the

> > 2nd chart points to the URL of the first chart (even though the two

> > charts,

> > and hence their URLs are entirely different).

> >

> > Is this a known issue with charfx? If so, what could be a possible

> > workaround?

> >

> > Thank You

> >

> > KC

> >

> >

>

>

Link to comment
Share on other sites

Dear KC,

The string you pass to getHtmlTag can be anything you want.

"Charles" or even "Jack"

It is just a unique identifier for the ImageMap on the browser to know which

region corresponds.

I am not sure if numbers work but a simple int that you declare that keeps

track of every time

getHtmlTag is called and is then incremented should work just fine.

Try this to illustrate what I am talking about.

int i = 0;

chart1.getHtmlTag("450","280","PNG", "chart" + i++);

chart2.getHtmlTag("450","280","PNG", "chart" + i++);

Hope this helps.

-c

"Kunal Chawla" <kunal.chawla@appiancorp.com> wrote in message

news:onE20TwgFHA.1476@webserver3.softwarefx.com...

> Thanks for the reply. I have a follow up question.

> The solution you suggested works fine for a JSP that has 2 (or a known

> number of ) Chart objects that are unique (for example: chart1 and chart2)

> so distinct Image maps can be generated for each graph.

>

> I have a JSP, which generates a graph using

>

> chart1.getHtmlTag("450","280","PNG","chart1")

>

> This JSP being rendered by a page multiple times to display multiple

> graphs

> on the same page (like a Dashboard). Since the Chart object name (i.e.

> chart1) does not change each time a new graph is created, the Image maps

> for

> all charts are not generated corectly by this solution. I am not sure if I

> can dynamically change the name of a Java object (i.e. chart1 ) each time

> the code is executed.

> Do you have any other suggestions on how to solve this problem.

>

> Thanks

> KC

>

> "SoftwareFX Support" <noreply> wrote in message

> news:Xi36ejjgFHA.1484@webserver3.softwarefx.com...

>> Hi KC,

>>

>> The way to solve that issue is by adding a forth parameter to the

> getHtmlTag

>> call, i.e:

>>

>> chart1.getHtmlTag("450","280","PNG","chart1")

>> chart2.getHtmlTag("450","280","PNG","chart2")

>>

>> That forth parameter will be used as the Map name, so each chart will

>> use

>> their own image map, and the links will be right.

>>

>> I realize this parameter has not been documented, I'll put a request to

>> update the docs.

>>

>> Regards,

>> GA

>> Software FX

>>

>>

>> "Kunal Chawla" <kunal.chawla@appiancorp.com> wrote in message

>> news:WeJbj3ofFHA.1484@webserver3.softwarefx.com...

>> > Hello

>> >

>> > I am trying to drill down on a pie chart using the following code in a

>> > JSP.

>> > <%

>> > chart1.getPoint(<series>, index>).setUrl("destination");

>> > %>

>> >

>> > The drill down works fine when there is only one chart being displyed

>> > by

> a

>> > JSP. However, if there are multiple charts on the same JSP, the URL on

> the

>> > 2nd chart points to the URL of the first chart (even though the two

>> > charts,

>> > and hence their URLs are entirely different).

>> >

>> > Is this a known issue with charfx? If so, what could be a possible

>> > workaround?

>> >

>> > Thank You

>> >

>> > KC

>> >

>> >

>>

>>

>

>

Link to comment
Share on other sites

Thanks a lot.

It works like a dream.

KC

"Software FX Support" <support@softwarefx.com> wrote in message

news:Z2cUWpwgFHA.1476@webserver3.softwarefx.com...

> Dear KC,

> The string you pass to getHtmlTag can be anything you want.

> "Charles" or even "Jack"

> It is just a unique identifier for the ImageMap on the browser to know

which

> region corresponds.

> I am not sure if numbers work but a simple int that you declare that keeps

> track of every time

> getHtmlTag is called and is then incremented should work just fine.

> Try this to illustrate what I am talking about.

> int i = 0;

> chart1.getHtmlTag("450","280","PNG", "chart" + i++);

> chart2.getHtmlTag("450","280","PNG", "chart" + i++);

>

> Hope this helps.

> -c

>

> "Kunal Chawla" <kunal.chawla@appiancorp.com> wrote in message

> news:onE20TwgFHA.1476@webserver3.softwarefx.com...

> > Thanks for the reply. I have a follow up question.

> > The solution you suggested works fine for a JSP that has 2 (or a known

> > number of ) Chart objects that are unique (for example: chart1 and

chart2)

> > so distinct Image maps can be generated for each graph.

> >

> > I have a JSP, which generates a graph using

> >

> > chart1.getHtmlTag("450","280","PNG","chart1")

> >

> > This JSP being rendered by a page multiple times to display multiple

> > graphs

> > on the same page (like a Dashboard). Since the Chart object name (i.e.

> > chart1) does not change each time a new graph is created, the Image maps

> > for

> > all charts are not generated corectly by this solution. I am not sure if

I

> > can dynamically change the name of a Java object (i.e. chart1 ) each

time

> > the code is executed.

> > Do you have any other suggestions on how to solve this problem.

> >

> > Thanks

> > KC

> >

> > "SoftwareFX Support" <noreply> wrote in message

> > news:Xi36ejjgFHA.1484@webserver3.softwarefx.com...

> >> Hi KC,

> >>

> >> The way to solve that issue is by adding a forth parameter to the

> > getHtmlTag

> >> call, i.e:

> >>

> >> chart1.getHtmlTag("450","280","PNG","chart1")

> >> chart2.getHtmlTag("450","280","PNG","chart2")

> >>

> >> That forth parameter will be used as the Map name, so each chart will

> >> use

> >> their own image map, and the links will be right.

> >>

> >> I realize this parameter has not been documented, I'll put a request to

> >> update the docs.

> >>

> >> Regards,

> >> GA

> >> Software FX

> >>

> >>

> >> "Kunal Chawla" <kunal.chawla@appiancorp.com> wrote in message

> >> news:WeJbj3ofFHA.1484@webserver3.softwarefx.com...

> >> > Hello

> >> >

> >> > I am trying to drill down on a pie chart using the following code in

a

> >> > JSP.

> >> > <%

> >> > chart1.getPoint(<series>, index>).setUrl("destination");

> >> > %>

> >> >

> >> > The drill down works fine when there is only one chart being displyed

> >> > by

> > a

> >> > JSP. However, if there are multiple charts on the same JSP, the URL

on

> > the

> >> > 2nd chart points to the URL of the first chart (even though the two

> >> > charts,

> >> > and hence their URLs are entirely different).

> >> >

> >> > Is this a known issue with charfx? If so, what could be a possible

> >> > workaround?

> >> >

> >> > Thank You

> >> >

> >> > KC

> >> >

> >> >

> >>

> >>

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...