Phppchart shows Chinese problems $ MyData = new pData ();
$ MyData-> addPoints (array (25, 10, 25, 10, 25, 10, 25, 10, 25, 10), "Temperature ");
$ MyData-> addPoints (array (2, 4, 6, 4, 5, 6, 4, 5, 8, 6, 1), "Pressure ");
$ MyData-> setSerieDrawable ("Pressure", FALSE );
$ MyData-> setAxisName (0, "total order amount ");
$ MyData-> addPoints (iconv_arr (array ("may January", "May February", "May March", "May April", "May", "May June", "May July ", "August", "August"), "Labels ");
$ MyData-> setSerieDescription ("Labels", "Months ");
$ MyData-> setAbscissa ("Labels ");
Pchart is used in PHP, but the label does not display Chinese characters or Chinese characters are garbled. how can this problem be solved?
Reply to discussion (solution)
Pchart is based on GD, while GD can only draw UTF-8-encoded Chinese characters
Please check whether the requirements are met
Pchart is based on GD, while GD can only draw UTF-8-encoded Chinese characters
Please check whether the requirements are met
Header ("content-type: text/html; charset = utf-8 ");
$ Font = "c :\\ windows \ fonts \ simkai. ttf ";
$ MyPicture-> setFontProperties (array ("FontName" => $ font, "FontSize" => 11 ));
$ MyPicture-> drawText (, "analysis graph", array ("FontSize" => 20, "Align" => TEXT_ALIGN_BOTTOMMIDDLE ));
My title can display Chinese characters, because the drawText parameter can use "FontName" => $ font, but the label does not know how to get it.
Pchart is based on GD, while GD can only draw UTF-8-encoded Chinese characters
Please check whether the requirements are met
The question above is how the label displays Chinese, and the title can now be displayed as Chinese
Then you can check whether the font settings are correct.
Then you can check whether the font settings are correct.
Master, add QQ to help me see Bei 412906819
Pchart is based on GD, while GD can only draw UTF-8-encoded Chinese characters
Please check whether the requirements are met
The question above is how the label displays Chinese, and the title can now be displayed as Chinese
Amount. The problem is solved. I still don't understand pchar. Thank you
Pchart is based on GD, while GD can only draw UTF-8-encoded Chinese characters
Please check whether the requirements are met
The question above is how the label displays Chinese, and the title can now be displayed as Chinese
Amount. The problem is solved. I still don't understand pchar. Thank you
Is swelling solved?
Now I have encountered the same problem. I beg for help.