Jump to content
Software FX Community

Chart and DataTable


User (Legacy)

Recommended Posts

I too was having difficulties with binding at run time and solved by doing 

the following:

Given:

_dsView as Dataset

_dtViewDimension as DataTable

The following is the base logic flow of my application:

1. User selects a "View"

a) Chart1.DataSource, _dsView, and _dtViewDimension are set to nothing

B) _dsView, and _dsViewDimension are created and populated

c) Chart1.DataSource = _dsViewDimension

The above works great but...

I also needed to set the Chart1.DataSourceSettings.DataType() settings

differently each time so I also do the following:

Me.Chart1.DataSourceSettings.DataType(0) =

SoftwareFX.ChartFX.DataType.Label

Me.Chart1.DataSourceSettings.DataType(1) =

SoftwareFX.ChartFX.DataType.NotUsed

Me.Chart1.DataSourceSettings.DataType(2) =

SoftwareFX.ChartFX.DataType.KeyLegend

' TURN OFF all Data Value Columns

Me.Chart1.DataSourceSettings.DataType(3) =

SoftwareFX.ChartFX.DataType.NotUsed

Me.Chart1.DataSourceSettings.DataType(4) =

SoftwareFX.ChartFX.DataType.NotUsed

Me.Chart1.DataSourceSettings.DataType(5) =

SoftwareFX.ChartFX.DataType.NotUsed

Me.Chart1.DataSourceSettings.DataType(6) =

SoftwareFX.ChartFX.DataType.NotUsed

' TURN ON selected Data Value Columns according to "View" selected

For Each itmX In Me._ActiveView.FactNames

Select Case itmX.Name

Case "SUM_WorkHours"

Me.Chart1.DataSourceSettings.DataType(3) =

SoftwareFX.ChartFX.DataType.NotUsed

Case "SUM_WorkAmount"

Me.Chart1.DataSourceSettings.DataType(4) =

SoftwareFX.ChartFX.DataType.NotUsed

Case "SUM_BillHours"

Me.Chart1.DataSourceSettings.DataType(5) =

SoftwareFX.ChartFX.DataType.NotUsed

Case "SUM_BillAmount"

Me.Chart1.DataSourceSettings.DataType(6) =

SoftwareFX.ChartFX.DataType.NotUsed

End Select

Next

I have just started using ChartFX amd perhaps the above is incorrect or

inelegant but it works.

Hope this helps,

Kurt

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:1T7Xwv0JFHA.1652@webserver3.softwarefx.com...

> That depends on how you are binding the chart. If you are doing it at

> design time the answer is yes, if you are doing it at run-time the answer

> is "it depends". Please let me know a little more about your scenario and

> I will be able to give you more information.

>

> --

> FP

> Software FX

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...