Jump to content
Software FX Community

Show Labels in AxisX


User (Legacy)

Recommended Posts

Hello:

I am having a problem using the chart to display a simple histogram. To

describe my problem, I will use the AxisLabels solution from the ChartFX

sample applications.

Consider the case when the ProductSales.txt files contains the following

text:

---------------

<?xml version="1.0"?>

<CHARTFX>

<COLUMNS>

<COLUMN NAME="Month" TYPE="String"/>

<COLUMN NAME="ProductA" TYPE="Integer"/>

<COLUMN NAME="ProductB" TYPE="Integer"/>

<COLUMN NAME="ProductC" TYPE="Integer"/>

</COLUMNS>

<ROW Month="Jan" ProductA="1256000" ProductB="2340000"

ProductC="3450000"></ROW>

</CHARTFX>

---------------

This means that I am only interested in the sales for the month of January.

I create a serie for each product and I want to display three separate bars,

each in its own color.

1. How can I display each bar separated from the others by space and still

have red for ProductA, green for ProductB and blue for ProductC?

2. How can I display ProductA under the red bar, ProductB under the green

bar and ProductC under the blue bar?

Thank you,

Mira

Link to comment
Share on other sites

You need a one (1) series chart.

You can either change the way you supply your data or us the Transposed flag

on DataSourceSettings.Style.

If you don´t use the Transposed flag, the data should look like this:

<COLUMNS>

<COLUMN NAME="Product" TYPE="String"/>

<COLUMN NAME="Quantity" TYPE="Integer"/>

</COLUMNS>

<ROW Product="ProductA" Quantity="1256000"></ROW>

<ROW Product="ProductB" Quantity="2340000"></ROW>

<ROW Product="ProductC" Quantity="3450000"></ROW>

</CHARTFX>

To get a different color for each point use:

chart.AllSeries.MultipleColors = true;

If you use the Transposed style, then you can continue to pass your data as

before except that you must eliminate the "Month" column.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...