Chart Axes min/max not working
-
Any idea why this code isn't working?
<ma-serial-chart style="height: 490px; width: 100%" series-1-values="m1FireDHWValues" series-1-title="Member 1 DHW Firing Rate" series-1-color="#FF0000" series-1-axis="left" series-1-type="smoothedLine" series-2-values="m3FireDHWValues" series-2-title="Member 3 DHW Firing Rate" series-2-color="#FF8700" series-2-axis="left" series-2-type="smoothedLine" series-3-values="m1TankValues" series-3-title="Member 1 Tank Temp" series-3-color="#00FFFF" series-3-axis="right" series-3-type="smoothedLine" series-4-values="m3TankValues" series-4-title="Member 3 Tank Temp" series-4-color="#00C5FF" series-4-axis="right" series-4-type="smoothedLine" legend="true" options="{ valueAxes:[ { axisColor:'#212125', color:'white', title: 'Firing Rate (%)', titleColor: 'white', fontSize:26, titleFontSize:26, minimum:0, maximum:100 }, { axisColor:'#212125', color:'white', title: 'Temperature (ºF)', titleColor: 'white', fontSize:26, titleFontSize:26, minimum:0, maximum:180 } ] }"> </ma-serial-chart>
-
Hi Mihai,
Perhaps this explains it? https://www.amcharts.com/kbase/user-defined-minmax-values-of-value-axis/
-
correct, you need to user the strictMinMax:true property to force the axes to be a given range
-
This isn't working for me:
options="{ valueAxes:[ { axisColor:'#212125', color:'white', title: 'Firing Rate (%)', titleColor: 'white', fontSize: 26, titleFontSize: 26, strictMinMAx: 'true', autoGridCount: 'false', gridCount: 10, labelFrequency: 1, minimum:0, maximum:100 }, { axisColor:'#212125', color:'white', title: 'Temperature (ºF)', titleColor: 'white', fontSize: 26, titleFontSize: 26, strictMinMAx: 'true', autoGridCount: 'false', gridCount: 18, labelFrequency: 2, minimum:0, maximum:180 } ]
Output:
-
strictMinMAx: 'true'
-->strictMinMax: true
remove the quotes fix the caps -
@phildunlap
Still no go:<ma-serial-chart style="height: 490px; width: 100%" series-1-values="m1FireDHWValues" series-1-title="Member 1 DHW Firing Rate" series-1-color="#FF0000" series-1-axis="left" series-1-type="smoothedLine" series-2-values="m3FireDHWValues" series-2-title="Member 3 DHW Firing Rate" series-2-color="#FF8700" series-2-axis="left" series-2-type="smoothedLine" series-3-values="m1TankValues" series-3-title="Member 1 Tank Temp" series-3-color="#00FFFF" series-3-axis="right" series-3-type="smoothedLine" series-4-values="m3TankValues" series-4-title="Member 3 Tank Temp" series-4-color="#2d6fd8" series-4-axis="right" series-4-type="smoothedLine" legend="true" options="{ valueAxes:[ { axisColor:'#212125', color:'white', title: 'Firing Rate (%)', titleColor: 'white', fontSize: 26, titleFontSize: 26, autoGridCount: 'false', gridCount: 10, labelFrequency: 1, minimum:0, maximum:100, strictMinMax: true }, { axisColor:'#212125', color:'white', title: 'Temperature (ºF)', titleColor: 'white', fontSize: 26, titleFontSize: 26, strictMinMax: true, autoGridCount: 'false', gridCount: 18, labelFrequency: 2, minimum:0, maximum:180 } ] }"> </ma-serial-chart>
-
This post is deleted! -
If you're going to use 4 series graphs, I suggest you do 4 value axes properties. Sods law, it's skipping it because the number of series charts and the values axes amount isn't the same. Just my opinion but even though you have two vertical axes, you still have four series points.