Gabriel Posted May 28, 2007 Report Share Posted May 28, 2007 Hello, I've been fiddling with this issue for a while now and I believe that there is a bug in the way the webforms wrapper manages data passed as a ListProvider. The attached code-behind code illustrates the issue. The first thing to note is that in setting up an array of arrays (allarrays() in the code) the array with largest index (dummy() in the code) is not plotted in the graph, though it appears as a series in the legend. Now, this only happens when I set the DataType properties in the DataSourceSettings class. That is to say that all lines are plotted correctly so long as the "chart.DataSourceSettings.DataType(x)" are left untouched. The second issue to note is that the array set to XValue in the code is not the array set as the XValue in the chart. In the example code the last array is set as the XValue (the dummy() array). Notice that it is in fact the 'series4()' array that is acting as the XValue. If the first array is set as the XValue the graph X-axis indecies always seem to start at 1 or 0 (which ever is default) no matter what the first array contains. I should also add that I have the latest version of ChartFX7 installed and that I am using VS 2005. If the issues remain poorly defined let me know. I can clarify my explanations. Thank you Default.aspx.vb: Imports softwarefx.ChartFX.Wrapper.Internet.Server Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim chart As New SoftwareFX.ChartFX.Wrapper.Internet.Server.Chart(Chart1_new, False) Dim series1() As Integer = {11, 12, 13, 14, 15, 16, 17} Dim series2() As Integer = {1, 0, 1, 0, 1, 0, 1} Dim series3() As Integer = {1, 2, 3, 4, 5, 6, 7} Dim series4() As Double = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7} Dim dummy() As Integer = {5, 6, 7, 8, 9, 10, 11} Dim allarrays() As Object = {series1, series2, series3, series4, dummy} chart.DataSourceSettings.DataType(0) = SoftwareFX.ChartFX.Wrapper.DataType.Value chart.DataSourceSettings.DataType(1) = SoftwareFX.ChartFX.Wrapper.DataType.Value chart.DataSourceSettings.DataType(2) = SoftwareFX.ChartFX.Wrapper.DataType.Value chart.DataSourceSettings.DataType(3) = SoftwareFX.ChartFX.Wrapper.DataType.Value chart.DataSourceSettings.DataType(4) = SoftwareFX.ChartFX.Wrapper.DataType.XValue Dim list As New ChartFX.WebForms.DataProviders.ListProvider(allarrays) chart.DataSourceSettings.DataSource = list End Sub End Class Link to comment Share on other sites More sharing options...
Frank Posted May 29, 2007 Report Share Posted May 29, 2007 Thank you for your feedback. I was able to reproduce the problem and found the cause. The problem will be resolved in the next Service Pack. As a workaround, you can bypass the wrapper by going directly to the new API: Chart1_new.DataSourceSettings.Fields.Clear(); Chart1_new.DataSourceSettings.Fields.Add(New ChartFX.WebForms.FieldMap("Field1", ChartFX.WebForms.FieldUsage.Value)) Chart1_new.DataSourceSettings.Fields.Add(New ChartFX.WebForms.FieldMap("Field2", ChartFX.WebForms.FieldUsage.Value))Chart1_new.DataSourceSettings.Fields.Add(New ChartFX.WebForms.FieldMap("Field3", ChartFX.WebForms.FieldUsage.Value)) Chart1_new.DataSourceSettings.Fields.Add(New ChartFX.WebForms.FieldMap("Field4", ChartFX.WebForms.FieldUsage.Value))Chart1_new.DataSourceSettings.Fields.Add(New ChartFX.WebForms.FieldMap("Field5", ChartFX.WebForms.FieldUsage.XValue)) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.