function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aurélien.LavalAurélien.Laval 

Garbled data to a visualforce chart

Hello,

 

I developped a visualforce chart and sometimes, datas are garbled.

 

Per example, a 10 is displayed as a 11 :

http://nsa33.casimages.com/img/2013/10/21/131021051400896700.png

 

I tried to change the data type to barSeries and it doesn't work.

 

I tried to change the chart's height from 600px to 950px and it doesn't work and I modified chart's options but it doesn't work too.

 

This is my code :

<apex:chart height="550px" width="100%" data="{!datas}" rendered="{!chartVisible}" resizable="true">
    	<apex:legend position="right"/>
        <apex:axis type="Numeric" position="left" fields="data1" minimum="0" maximum="{!maxNbParticipants}" title="Number of participants" grid="true"/>
        <apex:axis type="Category" position="bottom" fields="name" title="">
            <apex:chartLabel rotate="315"/>
        </apex:axis>
        <apex:lineSeries title="{!mapNames[0]}" fill="true" axis="left" xField="name" yField="data1" markerType="circle" markerSize="4" markerFill="#A44065" strokeColor="#A44065" />
        <apex:lineSeries title="{!mapNames[1]}" fill="false" axis="left" xField="name" yField="data2" markerType="circle" markerSize="4" markerFill="#4051A4" strokeColor="#4051A4" />
        <apex:lineSeries title="{!mapNames[2]}" fill="false" axis="left" xField="name" yField="data3" markerType="circle" markerSize="4" markerFill="#5EA440" strokeColor="#5EA440" />
    </apex:chart>

 

 

Why data are garbled please?

 

Thanks for your answers.

Best regards

firechimpfirechimp

Hi Aurelien,

Check the value of  {!maxNbParticipants} to see what this is at runtime. Is it 11?

 

 

Aurélien.LavalAurélien.Laval

{!maxNbParticipants} is 15 (we can see this value in bottom left of this picture).

 

{!maxNbParticipants} = the bigger value + 5.

So 10+5 = 15.

 

This is the complet chart : http://nsa34.casimages.com/img/2013/10/22/131022103923325003.png

 

That is strange is in others charts, values are not garbled.. : http://nsa34.casimages.com/img/2013/10/22/131022104559999672.png

 

I don't understand this behavior.. ?

Aurélien.LavalAurélien.Laval

Some one can help me please?