String Handling in Highcharts (5)

Source: Internet
Author: User
String Handling in Highcharts (5)
string as the Y value
Because Highcharts does not support string as the Y value, nor does it resolve the name of the node to the y-axis, it can only be converted by instance 2-9.
"Instance 2-10:strdatay" generates a chart of a student's score table, as shown in table 2.3. Where the X value is the number of exams, and the result is the Y value.

Table 2.3 Test results of a classmate


The core code is as follows:
  • Series: [{
  • Data: [2, 1, 3, 2,3]//convert string to scale value
  • }],
  • YAxis: [{
  • Type: ' Category ',
  • categories:[' fail ', ' pass ', ' good ', ' good ']//Specify the scale
  • }],
  • Xaxis: [{
  • Type: ' Category ',
  • categories:[' first time ', ' second ', ' third ', ' fourth ', ' fifth time '
  • }],
After executing the code, the effect.

The Y value is a string



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

String Handling in Highcharts (5)

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.