ZingChart how to get all tables

I want to get all x labels and y labels, as well as x and y label in zingchart. How to do it?

enter image description here

+4
source share
1 answer

"Main label X" and "Main label Y" are called scaleX.label and scaleY.label in zingchart. You will need to specify a text parameter for this object:

scaleY :{
  label : {
    text : "Main label y"
  } 
}

By default, each elevation in ZingChart is predefined based on values. To change this, there are two ways to do this:

  • , . . , node ; .

  • scale values, . , . .. scaleX.values: [4,5,6,7] 4 7.

, , :

var myConfig = {
  type: "bar", 
  plotarea : {
    margin : "dynamic"
  },
  series : [
    {
      values : [35,42,67,89,25,34,67,85]
    }
  ],
  scaleY : {
    label : {
      text : "Scale Y"
    },
    values : [30,40,50]
  },
  scaleX : {
    label : {
      text : "Scale X"
    },
    labels : ["first", "second", "third"]
  }
};

zingchart.render({ 
  id : 'myChart', 
  data : myConfig, 
  height: 400, 
  width: 600 
});
<!DOCTYPE html>
<html>
  <head>
    <script src= "https://cdn.zingchart.com/zingchart.min.js"></script>
  </head>
  <body>
    <div id='myChart'></div>
  </body>
</html>
+2

Source: https://habr.com/ru/post/1617634/


All Articles