Programatically setting chart data with Arguments or ArgumentsString not working
Programatically setting chart data with Arguments or ArgumentsString not working
I'm programatically adding some charts to my report as per http://stimulsoft.helpserve.com/index.p ... d=49&nav=0. It works fine if I use a data source as in that example but if I try using the Arguments/Values properties or the ArgumentsString/ValuesString properties no data appears on the chart. Setting the ArgumentsString/ValuesString through the designer works. Example of failing report attached.
- Attachments
-
- 1777.CreateChart.zip
- (41.77 KiB) Downloaded 257 times
Programatically setting chart data with Arguments or ArgumentsString not working
Hello.
And to set 'List of Values' and 'List of Arguments' properties you should use next code:
Thank you.
To set Argument/Value properties you should use next code:aaronrc wrote:I'm programatically adding some charts to my report as per http://stimulsoft.helpserve.com/index.p ... d=49&nav=0. It works fine if I use a data source as in that example but if I try using the Arguments/Values properties or the ArgumentsString/ValuesString properties no data appears on the chart. Setting the ArgumentsString/ValuesString through the designer works. Example of failing report attached.
Code: Select all
item.Argument = new Stimulsoft.Report.Components.StiArgumentExpression("{Products.Categories.CategoryName}");
item.Value = new Stimulsoft.Report.Components.StiExpression("{2*Products.UnitPrice}");
Code: Select all
item.ListOfArguments = new Stimulsoft.Report.Components.StiListOfArgumentsExpression("USA;England;Russia");
item.ListOfValues = new Stimulsoft.Report.Components.StiListOfValuesExpression("10;20;15");