Jump to content
Software FX Community

Newbie problem with Series


User (Legacy)

Recommended Posts

I'm using Northwind and I created a view that gives me this::

Employee - Sales - Year

Andrew Fuller - 22834.7000 - 1996

Andrew Fuller - 74958.6000 - 1997

Anne Dodsworth - 11365.7000 - 1996

Anne Dodsworth - 29577.5500 - 1997

Janet Leverling - 19231.8000 - 1996

Janet Leverling - 111788.6100 - 1997

I want to use this data to have a side by side bar chart where the series

are the years, the values are the sales and the x axis labels are the

employee names.

I tried this but it doesn't work:

Chart1.DataSourceSettings.DataSource = dt;

Chart1.DataSourceSettings.DataType[0] =

SoftwareFX.ChartFX.DataType.KeyLegend;

Chart1.DataSourceSettings.DataType[1] =

SoftwareFX.ChartFX.DataType.Value;

Chart1.DataSourceSettings.DataType[2] =

SoftwareFX.ChartFX.DataType.Series;

Chart1.Series[0].Legend = "1996";

Chart1.Series[1].Legend = "1997";

I've tried many DataTypes but I always get the same ugly chart. What am I

missing?

--

Sergio Florez M.

Link to comment
Share on other sites

By default ChartFX uses each numeric column as a series in the chart and 

each row as points. What you need is called a Crosstab. Please check our

documentation under "Passing Data" and you should find some sample code.

Regards,

JC

Software FX Support

"Sergio Florez M." <sergioflorezm_@_hotmail.com> wrote in message

news:iVMOVt3SFHA.1772@webserver3.softwarefx.com...

> I'm using Northwind and I created a view that gives me this::

>

> Employee - Sales - Year

> Andrew Fuller - 22834.7000 - 1996

> Andrew Fuller - 74958.6000 - 1997

> Anne Dodsworth - 11365.7000 - 1996

> Anne Dodsworth - 29577.5500 - 1997

> Janet Leverling - 19231.8000 - 1996

> Janet Leverling - 111788.6100 - 1997

>

> I want to use this data to have a side by side bar chart where the series

> are the years, the values are the sales and the x axis labels are the

> employee names.

> I tried this but it doesn't work:

>

> Chart1.DataSourceSettings.DataSource = dt;

> Chart1.DataSourceSettings.DataType[0] =

> SoftwareFX.ChartFX.DataType.KeyLegend;

> Chart1.DataSourceSettings.DataType[1] =

> SoftwareFX.ChartFX.DataType.Value;

> Chart1.DataSourceSettings.DataType[2] =

> SoftwareFX.ChartFX.DataType.Series;

>

> Chart1.Series[0].Legend = "1996";

> Chart1.Series[1].Legend = "1997";

>

> I've tried many DataTypes but I always get the same ugly chart. What am I

> missing?

>

> --

> Sergio Florez M.

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...