|
Stacked Bar Chart |
Posted by Mark Nash on Dec-12-2014 00:11 |
|
Hi
I am trying to create a stacked bar chart that is displayed as a result of a pie chart slice being clicked. Basically it is a drill down of more info about the selected pie slice.
Document attached with the general idea.
How would I go about doing this in ASP.Net? I already have the pie charts and click events handled.
Thanks
Mark
|
Re: Stacked Bar Chart |
Posted by Peter Kwan on Dec-12-2014 04:02 |
|
Hi Mark,
There are some examples of drilldown in the Clickable Charts section of the ChartDirector
documentation. May be you can use them as a reference.
In brief, the pie is clicked, the browser can jump to another ASPX page (the pie can act like
a hypertext link). In that ASPX page, you can determine which sector is being clicked (it is
being passed as a query parameter to the ASPX page), and then obtain the necessary data
and draw the stacked bar chart.
The above is just the simplest case. You can modify it to fit your own needs. For example,
instead of jump to another ASPX page, you can load the stacked bar ASPX page in an
IFRAME or popup window, etc..
Hope this can help.
Regards
Peter Kwan |
Re: Stacked Bar Chart |
Posted by Mark Nash on Dec-12-2014 04:24 |
|
Hi
I just need an example of a stacker bar for reference. The rest of it is already wired
Thanks
Mark |
Re: Stacked Bar Chart |
Posted by Peter Kwan on Dec-13-2014 00:40 |
|
Hi Mark,
In the original "Simple Clickable Chart" sample code, there is a Clickable Pie Chart. When the
pie chart is clicked, it jumps to another sample page "piestub.aspx".
Instead of using "piestub.aspx", please change the path to "stackedbar.aspx" (this is
another sample code that comes with ChartDirector). In this way, when the pie is clicked, it
will display a stacked bar chart.
The "stackedbar.aspx" sample code is using hard coded data. What you need to do is to
replace them with your actual data, and to modify the styles of the chart (the colors,
setting the axis to transparent, etc) to fit you needs.
Hope this can help.
Regards
Peter Kwan |
Re: Stacked Bar Chart |
Posted by Mark Nash on Dec-18-2014 05:31 |
|
Thanks. I'll take a look.
One other question. Chart Dir seems to be ignoring the BackColor property:
<chart:WebChartViewer ID="WebChartCompensationOverview" runat="server" BackColor="#f9f9f9" OnClickHotSpot="WebChartCompensationOverview_ClickHotSpot" />
Is that a limitation of the trial download ?
Thanks
Mark |
Re: Stacked Bar Chart |
Posted by Peter Kwan on Dec-18-2014 22:12 |
|
Hi Mark,
I have tested the BackColor property in my machine, and it works normally, just like how it
would work in the standard ASP.NET Image control.
For example, if I configure the chart to have a transparent background, then I can see the
BackColor of the control. This is the same as the standard ASP.NET Image control (that the
Image must be transparent in order to see the background color of the control).
Hope this can help.
Regards
Peter Kwan |
|