# Easycharts and warning in Servoy 6.0.3

**URL:** <https://forum.servoy.com/t/easycharts-and-warning-in-servoy-6-0-3/15129>\
**Category:** Classic Servoy\
**Created:** [December 5, 2011, 12:21am UTC](https://forum.servoy.com/t/easycharts-and-warning-in-servoy-6-0-3/15129 "2011-12-05T00:21:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmidata](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/rmidata/32/4876_2.png) [@rmidata](https://forum.servoy.com/u/rmidata)\
**Post date:** [December 5, 2011, 12:21am UTC](https://forum.servoy.com/t/easycharts-and-warning-in-servoy-6-0-3/15129/1 "2011-12-05T00:21:37Z")

</div>

Hi!  
I was using easycharts with Servoy 5.2 and had no problems.  
Now, in Servoy 6, taking a line chart, when I define the values ​​I have the following warning and I can not fix, in setSampleValues():

WARNING: The function setSampleValues(Number,Array) is not applicable for the arguments (Number,Array)

The graph is displayed correctly, only warning given in the developer.  
Probe by multiple ways of defining an array but I can not get the warning

Thank!  
Roberto.

/\*\* @type {LineChart} \*/  
var chart = elements.LineChartBean;  
chart.reset()  
chart.setSeriesCount(4)  
chart.titleOn = true;  
chart.title = ‘title’  
var Bkgd = “0xFFFFFF”  
chart.background = new java.awt.Color(Bkgd) //Sets Background  
chart.sampleLabelsOn = true;  
chart.sampleLabels = Labels; //Array  
chart.legendOn = true  
chart.legendLabels = graf\_leyenda //Array

chart.sampleCount = graf\_total\_debe.length;  
chart.setSampleValues(0, graf\_total\_debe);  
chart.setSampleValues(1, graf\_total\_haber);  
chart.setSampleValues(2, graf\_total\_saldo);  
chart.setSampleValues(3, graf\_total\_saldo\_acum);

chart.setRange(0, graf\_valor\_Max \* 1.1);  
chart.setValueLabelsOn(true);  
chart.valueLabelStyle = 0  
chart.setLabel(“valueLabelPrefix”, “”);  
chart.valueLinesOn = true;

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 6, 2011, 8:54am UTC](https://forum.servoy.com/t/easycharts-and-warning-in-servoy-6-0-3/15129/2 "2011-12-06T08:54:20Z")

</div>

What is “graf\_total\_debe” ?  
(and the others?)

are those form variables?

declare them as what the warning wants you to have:

/\*\*

- @type Array
- 

\*/  
var graf\_total\_debe = new Array();

---

<div class="post-metadata">

**Author:** ![rmidata](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/rmidata/32/4876_2.png) [@rmidata](https://forum.servoy.com/u/rmidata)\
**Post date:** [December 6, 2011, 9:55pm UTC](https://forum.servoy.com/t/easycharts-and-warning-in-servoy-6-0-3/15129/3 "2011-12-06T21:55:40Z")

</div>

Thanks Johan!  
+1  
Roberto.

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [December 6, 2011, 10:01pm UTC](https://forum.servoy.com/t/easycharts-and-warning-in-servoy-6-0-3/15129/4 "2011-12-06T22:01:01Z")

</div>

Alternatively you can also use VelocityReport’s charting abilities:  
[https://www.servoyforge.net/projects/ve … i/Charting](https://www.servoyforge.net/projects/velocity-report/wiki/Charting)

There’s even an Eclipse project that will write the chart code for you:  
[https://www.servoyforge.net/projects/ve … ilder/wiki](https://www.servoyforge.net/projects/velocity-chartbuilder/wiki)

![;)]( "Wink")
