Sign in to follow this  
Dhruva

How to control position of datavalue on chart?

Recommended Posts

Hi there

 

 

 

I have a graph which is basically 'v' shaped and I want to display a label for the value at the lowest point. I can set the displayValue attribute but because of the the text position and the shape of the graph the text is plotted over the graph line obscurring it. I guess I can set the alpha attribute to make it more transparent but I do not want to make it harder to read.

 

 

 

Is there a way to control where the data value is displayed?

 

 

 

Cheers

 

 

 

Paul

Share this post


Link to post
Share on other sites

Hello Paul,

I'm afraid there's no way to control the specific location of the data values, but if you could attach the XML (and tell us which graph you're working with) we'd gladly take a look and check if there is any workaround to the problem. :)

Share this post


Link to post
Share on other sites

HI

 

 

 

I am building the XML at runtime from a database and plotting Multi-series 2D line graphs. For each data set I have showValues set 0 but for specific values I am setting showValue = 1 and setting displayValue to some text. As the charts will always conform to a specific layout I want to be able to choose the position of the dataValue to best fit it into the space available. Maybe using a HTML formatted displayValues I could position the text relatively? What would be great is to be able to specify X and Y offsets as attributes on the set element or in a style applied to the displayValue.

 

 

 

The particular label that was causing the problem has been removed and only the tooltip remains but you can see the problem on other graphs.

 

 

 

Here is a URL to the demo http://www.opinionpanel.co.uk/module4/query.aspx. Simply click display results to view the graphs.

 

 

 

Paul

Share this post


Link to post
Share on other sites

Hello Paul,

I see the problem, but I'm afraid what you're asking is not possible as of now. For the time being, could you please consider using sufficient whitespaces to slightly reposition the visible part of the text?

Optionally, you could style the text thus, to display them on white boxes:

<styles>

<definition>

  <style name='Test' type='font' bgcolor='ffffff' />

</definition>

<application>

  <apply toObject='DATAVALUES' styles='Test' />

</application> 

</styles>

I know the workarounds are not perfect, but I hope they'll help, for now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this