Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - How to bind ObservableCollection<LineSeries> to Chart -


i have litle problem chart binding. possible have dynamic number of series wpf toolkit line chart?

i found many examples how manualy.

for example if have like:

    <chartingtoolkit:chart grid.columnspan="4" grid.row="3" horizontalalignment="stretch"  verticalalignment="stretch" name="chart_distribution" title="chart title"> 

and model like:

public class test : baseviewmodel {     private readonly observablecollection<lineseries>  _lineseries = new observablecollection<lineseries>();                        public observablecollection<lineseries> lineseries         {             { return _lineseries; }         }     private void test()         {             var collection = new observablecollection<requestsinprocess>();             var collection2 = new observablecollection<requestsinprocess>();              collection.add(new requestsinprocess(0, 4));             collection.add(new requestsinprocess(1, 1));             collection.add(new requestsinprocess(2, 4));             collection.add(new requestsinprocess(3, 3));              collection2.add(new requestsinprocess(0, 3));             collection2.add(new requestsinprocess(1, 2));             collection2.add(new requestsinprocess(2, 2));             collection2.add(new requestsinprocess(3, 1));              var lineseries1 = new lineseries();             lineseries1.independentvaluepath = "amountofrequests";             lineseries1.dependentvaluepath = "time";             lineseries1.title = "line series1";             lineseries1.itemssource = collection;             charts.add(lineseries1);              var lineseries2 = new lineseries();             lineseries2.independentvaluepath = "amountofrequests";             lineseries2.dependentvaluepath = "time";             lineseries2.title = "line series2";             lineseries2.itemssource = collection2;             charts.add(lineseries2);              collection2.add(new requestsinprocess(4, 4));             collection.add(new requestsinprocess(4, 4));          } } 

how can bind chart observablecollection? possible?

there solution on following blog post:

http://jmorrill.hjtcentral.com/home/tabid/428/entryid/351/silverlight-charts-binding-multiple-series.aspx

colin e.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -