Hi,
I'm trying to implement a range on a Y-axis on a Gantt-chart and I'm stuck (again ...) I have a number of GanttSeries which I populate in code. Afterwards I want to omit one of the series from the gantt-chart.A Ganttserie has a property Visible but setting it to false only results in not showing the serie BUT IS STILL GETS DRAWN ON THE CANVAS !!! Since it still gets drawn it still takes room on the canvas, resulting in a graph where all other data gets resised.
You can't see the series but when you hover over it you still can see it's there ...
So I was thinking of resolving this issue by using a range on the Y-axis but this doesn't work. I have tried the following :
chartHouseHistoryData.Axis.Y.RangeType =
AxisRangeType.Custom;
chartHouseHistoryData.Axis.Y.RangeMin = 0.0;
chartHouseHistoryData.Axis.Y.RangeMax = 50.0;
I have tried different values in RangeMax but nothing happens !! I find it strange to have to work with a double because the Y-axis works on a Ganttseries-base and would suspect that I need to provide the RangeMax with the MaximumSerie I want to display. That doens't work either ...
Please provide some code regarding this specific problem ...
Thanks,
Wim
I think the fact that Axis.Y.RangeType = Custom is not honored by GanttChart is a bug. I have entered it into our bug tracking system, bug # 14934. feel free to contact Infragistics Developer Support at http://infragistics.com/gethelp to inquire about the status of this bug at any time.
as a workaround, try setting the Axis.Y.Margin.Far to a negative value. the top GanttItems should disappear as a result.
Ok, please keep me informed in the bug-issue ...
As far as the workaround is concerned, this seems to work but how do I determine what the value should be ? Sometimes the series I want to "hide" contains only one Gantt-item, sometimes in could contain five or ten items.
Should the value be the number of items times the default itemheight of a gantt-item ?
Add-on ...
presuming this ("Should the value be the number of items times the default itemheight of a gantt-item ?") is correct, how would one determine the default itemheight of a gantt-item ?
this figure is hard to reliably resolve, but you might try something like this:
private void ultraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e) { IAdvanceAxis yAxis = e.Grid["Y"] as IAdvanceAxis; int heightOfOneGanttItem = (int)Math.Abs(Math.Ceiling(yAxis.Map(1.0) - yAxis.Map(0.0)));
}
I'm sorry but (again) this is not a possibility. Changing the Margins from within the FillSceneGraph forces the chart to redraw and so the FillSceneGraph is called again !!
Please keep me informed about possibilities. I've been trying to work around all shortcomings for a few months now and always get stuck at the last moment ...
Any progress on the bugreport yet ?
i fixed it just now. it will be some time before it gets released in a hotfix, though.
I'msorry to inform you that, after upgrading to version 2009-01, there is NO BEHAVIOUR CHANGE AT ALL !!!
Setting the RangeMin and RangeMax has no inpact whatsoever ...
Please advise. I have delayed this issue as long as possible but need a working solution soon !
it is not fixed in the release version of 2009.1. it should be in the first hotfix, though.
if you want information about when you can get the hotfix, please contact infragistics developer support (http://infragistics.com/gethelp).