How to implement a chart using amCharts?

Asked

Viewed 832 times

4

I am trying to implement a bar/column chart using the tool own amCharts that uses XML, but I’m not able to edit it to get a specific bar. What would be the simplest solution for implementation using amCharts?

  • What do you mean by "specific"? Of a different color or format, for example?

  • yes, I want it to show only one bar/column per entity. Remember that it is done via xml.

1 answer

5


You can try to use only one dataset (a node graph). For example, in XML Data use something like the following:

<chart>
  <series>
    <value xid="0">Entidade 1</value>
    <value xid="1">Entidade 2</value>
    <value xid="2">Entidade 3</value>
    <value xid="3">Entidade 4</value>
    <value xid="4">Entidade 5</value>
  </series>
  <graphs>
    <graph gid="0">
      <value xid="0">69</value>
      <value xid="1">101</value>
      <value xid="2">66</value>
      <value xid="3">23</value>
      <value xid="4">41</value>
    </graph>
  </graphs>
</chart>

Remembering that the ID (and also the name and color) of the data set is set in XML Settings:

...
<graph gid="0">
    <title>Meu Gráfico</title>
    <color>ADD981</color>
</graph>
...

Resulting:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.