Jump to content
Software FX Community

Show Labels in AxisX

User (Legacy)

Recommended Posts


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



<?xml version="1.0"?>



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

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

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

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


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




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,


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:


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

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


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

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

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


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


Link to comment
Share on other sites


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

  • Create New...