Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
315
How to reclaim column spaces created by null values
posted

Hi,

 I created a column chart to show Country wise city wise sales. (See attached file). Chart was showing all cities in each country. Data i provided is

Sum(Freight)        ShipCountry   ShipCity       
---------------------      ---------------     ---------------
598.5800              Argentina       Buenos Aires
6205.3900            Austria           Graz
1186.1100            Austria           Salzburg
458.9100              Belgium         Bruxelles
821.2300              Belgium         Charleroi

Chart was repeating All cities for each country with null values. Only labels was visible. I removed lable with the help of following code: -

class LabelRenderer : IRenderLabel
{
public string ToString(Hashtable context)
{
double dataValue = 0;
dataValue = (
double)context["DATA_VALUE"];
 

if (dataValue == 0)
return "";

return (string)context["ITEM_LABEL"];
}
}

Now a large area looks blank. It shows huge gap between bars. My question is how to remove this blank area.

 Nazir

  • 28496
    Offline posted

    sorry, this post ended up in my junk mail folder for some reason and i missed it during my regular sweep of the forums.

    i'm also sorry to inform you that the column chart doesn't support uneven sets, so reclaiming that space won't be possible without manipulating the primitives directly in a custom layer or the FillSceneGraph event.

    you can submit a feature request here:  http://devcenter.infragistics.com/protected/requestfeature.aspx