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!
Have you got it working now?
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?
Thanks! I found that there is property called zeroaligned on the chart.data property, so that is probably what you mean.?
i have played with the extent property but i cannot see that it helps. But perhaps there are different extent properties? I dont want to use vertical labels if that can be avoided.
/H
Zlatan,
You can use a combination of increasing the axis extent and setting vertical alignment on the labels. As to your third question, the min value is the smallest value from the data source, but min and max can be forced by setting a custom range. You can also try setting char.ZeroAligned = true.
Let me know if this helps.
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.