2014年7月13日 星期日

[RESOLVED] Asp.net clickable chart control


Hi all...


I am new to asp.net . I created a chart control with data binding and it has one series. Now I need the chart to be clickable which navigates to another pages by clicking each area. I found this solution,


                         Chart3.Series["Series1"].Url="EffJaEla.aspx";


But, here all the areas(If it is a column chart, all the columns are navigating to "EffJaEla.aspx" only) are navigatin to one page. I need to navigate to different pages by clicking columns. If the chart is with 4 columns, I need to navigate to 4 pages by
clicking 4 columns. Please help me...



Hi ThiTha,


Microsofts  chart control definitely does support click-through. Check below article out at 4guysfromrolla.


http://www.4guysfromrolla.com/articles/102809-1.aspx


And for more articles please have a look at the threads below


http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418


http://forums.asp.net/t/1551832.aspx/1


http://forums.asp.net/t/1802726.aspx/1


http://www.advsofteng.com/doc/cdnetdoc/simpleclickable.htm


Hope this helps.


Thanks,


Jatin



here is the similar thread post,


http://forums.asp.net/t/1551832.aspx/1



Hi jats...


Actually I went through these links....but I couldn't find an answere...


Here is my design...


 

         BackColor="64, 64, 0" Palette="Chocolate" onload="Chart2_Load">

            

                

                  LegendText="EFFICIENCY" Palette="BrightPastel">

                 

                


            


            

            

            


            

                

                


            


        




    ConnectionString="<%$ ConnectionStrings:KPIConnectionString1 %>"

    SelectCommand="SELECT [Efficiency], [Fty] FROM [Efficiency_Summery] WHERE ([TransactionDate] = @TransactionDate) ORDER BY [Fty]">

   

    

   


  



There I bind data to the chart.....


then the chart is developped....


Assume I am in a column chart...


I have 4 columns in my chart... I need to click all these columns and navigate to 4 different pages with 4 columns...


Chart3.Series["Series1"].Url="EffJaEla.aspx";


This code navigates to one page by all 4 columns and it does not allow to use 4 urls...


I need to use 4 urls for 4 columns...


Hope you underestood this....


Please help me....



Thanks a lot...




Hi Ijas...


Actually I went through these links....but I couldn't find an answere...


Here is my design...


 

         BackColor="64, 64, 0" Palette="Chocolate" onload="Chart2_Load">

            

                

                  LegendText="EFFICIENCY" Palette="BrightPastel">

                 

                


            


            

            

            


            

                

                


            


        




    ConnectionString="<%$ ConnectionStrings:KPIConnectionString1 %>"

    SelectCommand="SELECT [Efficiency], [Fty] FROM [Efficiency_Summery] WHERE ([TransactionDate] = @TransactionDate) ORDER BY [Fty]">

   

    

   


  



There I bind data to the chart.....


then the chart is developped....


Assume I am in a column chart...


I have 4 columns in my chart... I need to click all these columns and navigate to 4 different pages with 4 columns...


Chart3.Series["Series1"].Url="EffJaEla.aspx";


This code navigates to one page by all 4 columns and it does not allow to use 4 urls...


I need to use 4 urls for 4 columns...


Hope you underestood this....


Please help me....



Thanks a lot...



Hi,


Do you refer the link
http://www.4guysfromrolla.com/articles/102809-1.aspx
? You can set the points url property in the chart control's databound event like this


Protected Sub chtCategoriesProductCount_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles chtCategoriesProductCount.DataBound
For Each point As DataPoint In chtCategoriesProductCount.Series("Categories").Points
Dim categoryId As Integer = point.YValues(1)
point.Url = String.Format("~/Demos/DrillDown/ProductsInCategory.aspx?CategoryID={0}", categoryId.ToString())
...
Next
End Sub

And refer the radchart control:


http://www.telerik.com/community/forums/aspnet-ajax/chart/create-chart-click-event.aspx


Hope it can help you


沒有留言:

張貼留言