Hello!
I am new to the chart control and I have some questions.
I have created a simple data table to act as data source. It contains 3 columns, Label, Sales and Budget. The Label column is used as Labels on the x-axis.
1. How do I change the name of the Columns? What I mean is the name showed in the legend. Sales, Budget are english names and I would like to localize.
These names also showed up on the x-axis but I found a way to hide those labels.
2. Can I increase the gap between the vertical x-axis labels and the chart itself? I think that the labels are a bit close.
3. Is 0 the standard min value of the y-axis or do I have to change this to be sure in the future.?
4. How can I change the format of the values showing up when I run a the mouse over a column. The Y-axis was created using this code:
gantSalesBudget.Axis.Y.Labels.ItemFormatString =
"<DATA_VALUE:### ### ##0> sek"
Thanks!
Zlatan,
For the first question I think you will have to change the names of the columns in the data table. Something like this:
datatable.Columns["Sales"].ColumnName = "försäljnings";
datatable.Columns["Budget"].ColumnName = "budgetförslag";
Is it possible for you to do that or does that completely confuse your application?
I will look into the other questions.
I have found a solution to question number 4. It is possible to set the same formatstring to the Tooltips property of the chart control.
So consider that one solved.
Have you been able to work this out? If not, could you post a simple sample application to this forum thread that I could work with and see if I can get it to look the way you want?
Have you got it working now?
The only thing that I haven't figured out is the spacing between the X-Axis and the labels.
The other questions are solved I think...
Could you describe you idea again, and the properties that I should change in order to get the right appearance...?
/H
Hello Zlatan,
Each axis on the chart has a padding property which you can use to set a distance between the axis and the labels. This will be move labels further away from the rest of the primitives. For example the months on your chart will be 25 pixels away from the x axis by using the following line of code,
this.ultraChart1.Axis.X.Labels.Layout.Padding = 25;
Let me know if you have any questions regarding this matter.
Since I am not using the labels it doesn't have the right effect. But I found out that their is a similar property for the SeriesLabels, and that did the trick.
So I guess you solved it ;-)
/Henrik