Jump to content
Software FX Community

Converting from Lite to Pro


BrandonM
 Share

Recommended Posts

Hi,

  Is there a sample or documentation on going from the .Lite version of ChartFX to the Pro/Commercial version?  I've found it's not as simple as referencing the new controls and using the same code.  

 

Here are the two charts I have in .Lite:

Chart1

DataSource is a DataTable (dt) with one column - "Failure" With chart_da_1.DataType(0) = DataType.Value.AxisX.LabelsFormat.Decimals = 0.Titles(0).Text = "System Sensitivity".AxisX.Max = 10000.Gallery = Bar.DataSource = dt.DefaultView.Legend(0) = "189".Legend(0) = "066".Legend(0) = "264".Legend(0) = "337".Legend(0) = "203".Legend(0) = "584".Legend(0) = "646".Legend(0) = "353".Legend(0) = "341".Legend(0) = "352" .BackColor = Color.White.AxisY.Gridlines = True.Series(0).Color = Color.Blue

Chart2 Source is basic DataTable(dt) with two columns: Miles, Reli

 chart_da_2.DataType(0) = DataType.Label chart_da_2.DataType(1) = DataType.Value chart_da_2.DataType(2) = DataType.NotUsed chart_da_2.Gellery = Scatter chart_da_2.NValues = 2 chart_da_2.Titles(0).Text = "System Reliability" chart_da_2.DataSource = dt chart_da_2.BackColor = Color.White chart_da_2.AxisY.Gridlines = True chart_da_2.MarkerShape = SoftwareFX.ChartFX.Lite.MarkerShape.Rect chart_da_2.AxisX.AdjustScale()

Any help would be greatly appreciated.I tried this:Dim dtp as DataProviders.DataTableProvider = New DataTableProvider(dt)With Chart2 DataSourceSettings.Fields.Add(New FieldMap("Miles", FieldUsage.Label)) DataSourceSettings.Fields.Add(New FieldMap("Reli", FieldUsage.Value)) DataSourceSettings.DataSource = dtpEnd With

 

And I get a line, but it's going the wrong way (X/Y flipped)

When I bind Chart1, I get no data available (I checked the datatable and the DataTableProvider and both have values)Thanks,Brandon

 

Link to comment
Share on other sites

  • 1 month later...

Hi,

Chart FX Lite was developed based on Chart FX .Net 6.2. You will probably notice a lot of similarities between the lite version and Chart FX .Net 6.2 (full version). However, Chart FX 7 is a completely different product with a different API as well. If you want to use Chart FX 7, please refer to the Migration table which is included in the Chart FX Resource Center when you install the trial version. Unfortunately, a specific document showing the differences between Chart FX .NET 6.2 and Chart FX 7 is not available, but you can refer to the links below in order to obtain detailed information on the new features available:

http://www.softwarefx.com/sfxNetProducts/ChartFX/default.aspx

New Features available in Chart FX 7:

http://www.softwarefx.com/sfxNetProducts/ChartFX/features/default.aspx

The following link provides several resources such as samples, help and documentation:

http://support.softwarefx.com/ProductBase.aspx?Product=CfxNet70

In order to to configure how Chart FX will plot the data provided by the DataProvider in Chart FX 7 you need to use the Fields collection. This property is very useful when you want to control how Chart FX retrieves and displays the information from the database. For example, here is a connection made to a database with a SELECT statement. Lets say that you want the first field in the recordset (Month) to be used as a label. You would configure the datatype of that field to be a label and the others to be values. Make sure you set DataType before doing the DataAdapter.Fill(dataSet):

string mySelectQuery = "SELECT Month, Projected, Sales from DemoSales"; string myConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=ChartfxLiteSamples.mdb;";

System.Data.OleDb.OleDbConnection myConnection = new System.Data.OleDb.OleDbConnection(myConnectionString);

System.Data.DataSet ds = new System.Data.DataSet();

System.Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter(mySelectQuery, myConnection);

adapter.Fill(ds, "Sales");

chart1.DataSourceSettings.Fields.Add(new FieldMap("Month", FieldUsage.Label));

chart1.DataSourceSettings.Fields.Add(new FieldMap("Projected", FieldUsage.Value));

chart1.DataSourceSettings.Fields.Add(new FieldMap("Sales", FieldUsage.Value));

chart1.DataSourceSettings.DataSource = ds.Tables[0];

Regards,

RandyJ

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...