Prompt JpGraphErrorAplothasanillegalscale .. Solution

Source: Internet
Author: User
Urgent, prompt JpGraphErrorAplothasanillegalscale ..... I used the xy axis data in the database, but an Error was reported, prompting JpGraphErrorAplothasanillegalscale. Warn to be in A hurry and prompting JpGraph Error A plot has an illegal scale .....
I used the x-y-axis data in the database, but an Error was reported, prompting JpGraph Error A plot has an illegal scale. this cocould for example be that you are trying to use text auto scaling to draw a line plot with only one point or that the plot area is too small. it cocould also be that no input data value is numeric (perhaps only '-' or 'X'). my code is as follows. This is an example of modifying the location of the annotation.


$ Data = $ cny; // array of red line data on the y axis. $ cny indicates data:
$ Lbl = $ cnx; // x axis Data $ cny is the date 09-01,09-28

/// // The same as the example below ///

$ Graph = new Graph (1028,500); // create a new Graph object. The image length is PX and the width is PX.

$ Graph-> SetScale ("textlin"); // sets the scale mode.

$ Graph-> img-> SetMargin (30, 30, 80, 30); // you can specify a chart boundary.

$ Graph-> title-> Set ("** bank order trend chart"); // you can specify the chart title.

$ Graph-> title-> SetFont (FF_SIMSUN, FS_BOLD); // set the Chinese font of the title
$ Graph-> legend-> SetFont (FF_SIMSUN, FS_BOLD); // you can specify the font of a line.

$ Lineplot = new LinePlot ($ data); // create a new LinePlot object

$ Lineplot-> SetLegend ("red line"); // you can specify the legend text.


$ Lineplot-> SetColor ("red"); // Set the curve color

$ Graph-> xaxis-> SetTickLabels ($ lbl); // Configure the x axis coordinates.


$ Graph-> Add ($ lineplot); // draw a curve on the statistical chart


------ Solution --------------------
Not very clear about your problem.
$ Data = $ cny;
$ Lbl = $ cnx;

Is the problem caused by these two values? Then you can compare it with the original value to see if the type is different.
------ Solution --------------------
A little strange, haha
Which of the following statements does not support variables?
$ Cny = array (2, 4, 7 );
You mean this is not the case?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.