Add numbers from the list to ChartMakerPlus

Good afternoon.
I am researching the use of bar_chart ChartMakerPlus and ran into a problem. The digital values that I receive in the program I store in an array (list). How do I need to format it correctly so that the data appears as a column chart?

Can you show an example of your array (list)?

To make a column chart you would use the .ColumnChart block from the extension

For a basic column chart your data needs to be like this:

[
[ 'Name', 'Age'],
['Bob',24],
['Sue',27]
['Joe',23]
]

which in blocks would look like this:

image

I studied the material here (Help with Error msg: Data column(s) for axis #0 cannot be of type string (chartmaker plus extension)), but so far I have not been able to bring the array (list) to the desired form. Now he looks like this [0, 0, 0, 29, 24, 3, 21, 28, 12, 10, 15, 4]

Do you want a column for each of those items?
You will need to add some text headers...

[
["Items","Value"],
["A",0],
["B",0],
["C",0],
["D",29],
["E",24],
...
]
1 Like

thanks for the help and advice, everything worked out. I would like to clarify: is it possible to draw a horizontal line on such a diagram that will mark the level (for example, below the maximum by 10 units)?

It looks like it is possible to do this - see here:
https://developers.google.com/chart/interactive/docs/gallery/combochart#example

You would need to add another series to your data with all values at 10, then include the series requirements in your options

1 Like

I will study further. Thank you very much. You, as always, are on top!

I got such blocks. I'll leave it here, perhaps a clear example can help someone

I have just spotted that a different type of chart is drawn (ComboChart):

var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));

This would require some more code and a new block in order to work. I will add it to my list of things to update the extension with...

1 Like

Oh, that would be just fine.
It turns out that I still cannot implement my idea? Or is there a way out for me? I looked at the page, there is a clean code and I have no idea how to work with it

You could just create an html page with the combo chart code and your data.

It is possible to feed a chart with your data using the webviewstring feature of the webviewer.

1 Like

Hello Timai2!
I was very difficult but figured out with combined tables and was able to display the application table of this type. I do not know how to raise my data. I understand that you need to use WebViewString, but I do not have such experience. Could you help me a little or give an example of such work?


And this is the code in the file index.html (I will send it as index.txt, rename it)index.txt (1.0 KB)

Try this

comboChart.aia (2.9 KB)

Chart is sized in the html to fit a portrait screen
I added empty series either side of the data to extend the line
When building the values, the numbers must be numbers in AI2.

image

1 Like

Fabulous! I repeated it according to your example and everything worked out. Thank you very much for the help.

Good afternoon.
There is a question about data parsing. In the chart functions, I found the ability to display explanations to the data via {role: 'tooltip'}. I checked the finished code in the emulator, it works well and outputs data and signs explanations. What's my mistake?tooltip.txt (1.2 KB)
here is the sending block itself


I am using your version of the parsing file with the addition chart2.txt (1.4 KB)

Instead of
image

Try with
image

this method is shown in the first post here for styling individual colours of bars.

Good additional use of options :slight_smile:

1 Like

unfortunately it didn't work

It works for me, but there is no "hover" with android, so you have to touch the column.

Example data

Chart
image

Html
combo.html.txt (1.4 KB)

1 Like

Now I have succeeded. Thanks. I gained new knowledge and new experience. All this is thanks to YOU. :grinning: :+1: :muscle:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.