📊 [Free] ChartMakerPlus - an extension to make google charts

ok thanks<3

The app is retrieving data from a firebase database and presenting it with a ChartmakerPlus line graph.

I would like to add a target line. Since the graph can be called to show 8 different group of data. So, I will need 8 different target lines.

I can add a sub-group of the database with each group's target or even hardcode the targets as constants.

I am thinking one possible method is to code a constant in a second column in the database?

Attached is the blocks of creating the table that is passed to the ChartmakerPlus.

What am I making difficult?

Quickest/Easiest way to achieve this:

(using the example aia project I have provided)

Create a dictionary containing keys that match the tags in Firebase, and values for each target:

Add these to the arrayTable list for each row:

Add a header for Target:

aquariumFBwithChartTarget.aia (17.2 KB)

Thank you - they was exactly what I was trying to do.
I have the last piece. The middle piece is where I could not think of.

How can I control the X axis in the graph? For example, the pH graph the blue data line is at 8.0 and targetline is 8.2. Can I eliminate the .25 increments and keep it at tenths? can I start the X at 7.7 and have 7.7, 7.8, 7.9, up to 8.5?

The date/time across the bottom - I need to keep the seconds in the data for sorting, but would like to truncate down to just hours / minutes on the graph display as "07-23 24h05m"

1 Like

Yes you can, you can set the limits for the x axis wherever you like.Read the line chart documentation:

Then apply your requirements in the options socket

You can find a similar example @ 100 posts up:

1 Like

Should be:

MM-dd HH'h'mm'm'

1 Like

I got the graph showing using a the options block. Since there are eight different sets of maxValue and minValue, can I put an if/then group with a join block for each true if OR should I create a constant for each category and load a variable to plug into options?

The if / else is working but seems clunky

1 Like

Can ChartMakerPlus do Dual-Y charts?

1 Like

For your if block, make a list of pairs, for example:

Herewith a simple demo of dual axes chart:

dualYAxes.aia (12.7 KB)

Read the documentation and ocnfiguration options for additional configuration:

https://developers.google.com/chart/interactive/docs/gallery/linechart#dual-y-charts

1 Like

The seven categories work fine. When I graph the phosphates data, I get an error message "All series on a given axis must be of the same data type".
I looked at the database and do not see a problem. What should I be looking for?
Attached is a pic of the data.
phosphates

1 Like

Probably these two:

image

when converted back from a string to a number ?? Put a zero in front > 0.04

I removed them, same error.
I deleted all of that category and added new data -same error
I moved the IF statement around so phosphates were not last, - same error


database

No issues here:

image

image

Oddly, the other 7 graphs work fine. I "all series on a given axis...". The horizontal axis is constant. The vertical axis changes by data. I deleted all phosphate data. entered only one value. Still error. I deleted the blocks for options on phosphates, error.
Not sure how to find the error.

Look at / Show the values in your arraytable for phosphates

Thank you - I dumped the before dataTable and tableArray2 into a Label. Found in a different group of blocks, I had misspelled a "phosphate" so the target column was responding as "not found".

Now back to my regularly scheduled fiddling. A few more things to sort out.

I have the graph part working but the make list to have two parts of the database into the array table is not. The array with phosphates is working and graphing as normal. Now trying to add "dosing" to be shown on the right axes. Do I need to build to separate dataTables and then merge them, sorta by date/time, then graph?

I provided an example for dual Y axes above:

Thank you for your example of dual Y axes,I had seen it above and been playing with it.
The example shows a graph that works. In my data set, the "Item" is my date/times. The Val1 might be Phosphates, and Val2 might be Dose. But the data is has gaps which makes the graph not correct. If I modify your example with a few more "items" to allow a test to be shown. If Val1 does not have a value on B, or Val 2 does not have a value on D, how does not need to be done?
In my data, the phosphates would be entered at different times than the dose so the there will be more items across the bottom but the data points are not on same date/time.