Perspective XY Chart: Logarithmic value axis cannot have values <= 0

I am working on a perspective project where I am using an XY chart to display some data to the end user. The data is coming from my tag historian set up on some tags that are outputting very small numeric values (we're talking about values down in the 1E-12 to 1E-13 range). I know that leaving the min and max values in the y-axis section of an XY chart lets the chart auto determine what should be the min and max values for displaying your data:

But whenever I check the logarithmic property, I get the following error:

Could someone explain why this is happening and what to do to address this issue? I'm guessing it has to do with my data source and that there are null values or negative values in my datasource.

  1. As a matter of interest, why have you got a binding on yAxes.0.value.logarithmic?
  2. Can you post the chart's dataSource here so we can try it out? See Wiki - how to post code on this forum if required.
  1. I have a binding on yAxes.0.value.logarithmic to allow the end user to toggle between linear scale and logarithmic scale.
  2. My apologies if this is in the incorrect format, here is my datasource:
{
  "data": [
    {
      "t_stamp": 1729537394789,
      "Series3": 9.999999960041972e-13,
      "Series4": 2.4500000552624135e-12
    },
    {
      "t_stamp": 1729537396589,
      "Series3": 9.999999960041972e-13,
      "Series4": 2.4500000552624135e-12
    },
    {
      "t_stamp": 1729537398389,
      "Series3": -6.939999790123164e-13,
      "Series4": 1.6600000454086716e-12
    },
    {
      "t_stamp": 1729537400189,
      "Series3": -6.939999790123164e-13,
      "Series4": 1.6600000454086716e-12
    },
    {
      "t_stamp": 1729537401989,
      "Series3": 2.560000009286384e-13,
      "Series4": 3.6299999464639576e-12
    },
    {
      "t_stamp": 1729537403789,
      "Series3": 2.560000009286384e-13,
      "Series4": 3.6299999464639576e-12
    },
    {
      "t_stamp": 1729537405589,
      "Series3": 1.8399999406060186e-12,
      "Series4": 3.0699999833960767e-12
    },
    {
      "t_stamp": 1729537407389,
      "Series3": 1.8399999406060186e-12,
      "Series4": 3.0699999833960767e-12
    },
    {
      "t_stamp": 1729537409189,
      "Series3": 4.019999936231977e-13,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537410989,
      "Series3": 4.019999936231977e-13,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537412789,
      "Series3": 4.019999936231977e-13,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537414589,
      "Series3": 1.3899999857722167e-12,
      "Series4": 3.520000046650096e-12
    },
    {
      "t_stamp": 1729537416389,
      "Series3": 1.3899999857722167e-12,
      "Series4": 3.520000046650096e-12
    },
    {
      "t_stamp": 1729537418189,
      "Series3": 6.389999748952768e-13,
      "Series4": 4.440000016953105e-12
    },
    {
      "t_stamp": 1729537419989,
      "Series3": 6.389999748952768e-13,
      "Series4": 4.440000016953105e-12
    },
    {
      "t_stamp": 1729537421789,
      "Series3": 1.3300000207064344e-12,
      "Series4": 3.0100000183302944e-12
    },
    {
      "t_stamp": 1729537423589,
      "Series3": 1.3300000207064344e-12,
      "Series4": 3.0100000183302944e-12
    },
    {
      "t_stamp": 1729537425389,
      "Series3": 1.3300000207064344e-12,
      "Series4": 3.0100000183302944e-12
    },
    {
      "t_stamp": 1729537427189,
      "Series3": 5.840000249883459e-13,
      "Series4": 2.5900000460293837e-12
    },
    {
      "t_stamp": 1729537428989,
      "Series3": 6.570000077830984e-13,
      "Series4": 4.729999811964314e-12
    },
    {
      "t_stamp": 1729537430789,
      "Series3": 6.570000077830984e-13,
      "Series4": 4.729999811964314e-12
    },
    {
      "t_stamp": 1729537432589,
      "Series3": 6.570000077830984e-13,
      "Series4": 4.729999811964314e-12
    },
    {
      "t_stamp": 1729537434389,
      "Series3": 6.570000077830984e-13,
      "Series4": 1.860000001241424e-12
    },
    {
      "t_stamp": 1729537436189,
      "Series3": 6.570000077830984e-13,
      "Series4": 1.860000001241424e-12
    },
    {
      "t_stamp": 1729537437989,
      "Series3": 1.1100000042382763e-12,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537439789,
      "Series3": 1.1100000042382763e-12,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537441589,
      "Series3": -2.0099999681159886e-13,
      "Series4": 2.569999985393978e-12
    },
    {
      "t_stamp": 1729537443389,
      "Series3": -2.0099999681159886e-13,
      "Series4": 2.569999985393978e-12
    },
    {
      "t_stamp": 1729537445189,
      "Series3": 1.3700000335570284e-12,
      "Series4": 4.0900000400356795e-12
    },
    {
      "t_stamp": 1729537446989,
      "Series3": 1.3700000335570284e-12,
      "Series4": 4.0900000400356795e-12
    },
    {
      "t_stamp": 1729537448789,
      "Series3": 1.3700000335570284e-12,
      "Series4": 4.0900000400356795e-12
    },
    {
      "t_stamp": 1729537450589,
      "Series3": 1.1299999564534646e-12,
      "Series4": 2.569999985393978e-12
    },
    {
      "t_stamp": 1729537452389,
      "Series3": 1.1299999564534646e-12,
      "Series4": 2.569999985393978e-12
    },
    {
      "t_stamp": 1729537454189,
      "Series3": 1.0400000088547912e-12,
      "Series4": 2.759999910909028e-12
    },
    {
      "t_stamp": 1729537455989,
      "Series3": 1.0400000088547912e-12,
      "Series4": 2.759999910909028e-12
    },
    {
      "t_stamp": 1729537457789,
      "Series3": 9.670000260600387e-13,
      "Series4": 2.5399998944408697e-12
    },
    {
      "t_stamp": 1729537459589,
      "Series3": 9.670000260600387e-13,
      "Series4": 2.5399998944408697e-12
    },
    {
      "t_stamp": 1729537461389,
      "Series3": 9.130000087117368e-14,
      "Series4": 3.209999974163047e-12
    },
    {
      "t_stamp": 1729537463189,
      "Series3": 9.130000087117368e-14,
      "Series4": 3.209999974163047e-12
    },
    {
      "t_stamp": 1729537464989,
      "Series3": 1.3700000335570284e-12,
      "Series4": 3.0300000789657e-12
    },
    {
      "t_stamp": 1729537466789,
      "Series3": 1.3700000335570284e-12,
      "Series4": 3.0300000789657e-12
    },
    {
      "t_stamp": 1729537468589,
      "Series3": 1.3700000335570284e-12,
      "Series4": 3.0300000789657e-12
    },
    {
      "t_stamp": 1729537470389,
      "Series3": 1.5500000371745926e-12,
      "Series4": 3.6000000723512837e-12
    },
    {
      "t_stamp": 1729537472189,
      "Series3": 1.5500000371745926e-12,
      "Series4": 3.6000000723512837e-12
    },
    {
      "t_stamp": 1729537473989,
      "Series3": 1.1100000042382763e-12,
      "Series4": 2.189999917523444e-12
    },
    {
      "t_stamp": 1729537475789,
      "Series3": 1.1100000042382763e-12,
      "Series4": 2.189999917523444e-12
    },
    {
      "t_stamp": 1729537477589,
      "Series3": -9.860000186115436e-13,
      "Series4": 3.1899999135276413e-12
    },
    {
      "t_stamp": 1729537479389,
      "Series3": -9.860000186115436e-13,
      "Series4": 3.1899999135276413e-12
    },
    {
      "t_stamp": 1729537481189,
      "Series3": -9.860000186115436e-13,
      "Series4": 3.1899999135276413e-12
    },
    {
      "t_stamp": 1729537482989,
      "Series3": 1.100000014578155e-13,
      "Series4": 2.8499999669279186e-12
    },
    {
      "t_stamp": 1729537484789,
      "Series3": 1.100000014578155e-13,
      "Series4": 2.8499999669279186e-12
    },
    {
      "t_stamp": 1729537486589,
      "Series3": 1.5500000371745926e-12,
      "Series4": 3.209999974163047e-12
    },
    {
      "t_stamp": 1729537488389,
      "Series3": 1.5500000371745926e-12,
      "Series4": 3.209999974163047e-12
    },
    {
      "t_stamp": 1729537490189,
      "Series3": 8.21000006260425e-13,
      "Series4": 3.780000184389065e-12
    },
    {
      "t_stamp": 1729537491989,
      "Series3": 8.21000006260425e-13,
      "Series4": 3.780000184389065e-12
    },
    {
      "t_stamp": 1729537493789,
      "Series3": 2.9200001249417296e-13,
      "Series4": 2.2300000387942553e-12
    },
    {
      "t_stamp": 1729537495589,
      "Series3": 2.9200001249417296e-13,
      "Series4": 2.2300000387942553e-12
    },
    {
      "t_stamp": 1729537497389,
      "Series3": 1.639999984773266e-12,
      "Series4": 2.320000094813146e-12
    },
    {
      "t_stamp": 1729537499189,
      "Series3": 1.639999984773266e-12,
      "Series4": 2.320000094813146e-12
    },
    {
      "t_stamp": 1729537500989,
      "Series3": 1.639999984773266e-12,
      "Series4": 2.320000094813146e-12
    },
    {
      "t_stamp": 1729537502789,
      "Series3": 1.0599999610699795e-12,
      "Series4": 1.4599999811557018e-12
    },
    {
      "t_stamp": 1729537504589,
      "Series3": 1.0599999610699795e-12,
      "Series4": 1.4599999811557018e-12
    },
    {
      "t_stamp": 1729537506389,
      "Series3": 4.559999838664452e-13,
      "Series4": 2.34999996892582e-12
    },
    {
      "t_stamp": 1729537508189,
      "Series3": 4.559999838664452e-13,
      "Series4": 2.34999996892582e-12
    },
    {
      "t_stamp": 1729537509989,
      "Series3": -2.560000009286384e-13,
      "Series4": 3.4899999556969874e-12
    },
    {
      "t_stamp": 1729537511789,
      "Series3": -2.560000009286384e-13,
      "Series4": 3.4899999556969874e-12
    },
    {
      "t_stamp": 1729537513589,
      "Series3": -2.560000009286384e-13,
      "Series4": 3.4899999556969874e-12
    },
    {
      "t_stamp": 1729537515389,
      "Series3": 7.670000160171775e-13,
      "Series4": 2.870000027563324e-12
    },
    {
      "t_stamp": 1729537517189,
      "Series3": -1.8300000458135873e-13,
      "Series4": 3.1600000394149674e-12
    },
    {
      "t_stamp": 1729537518989,
      "Series3": -1.8300000458135873e-13,
      "Series4": 3.1600000394149674e-12
    },
    {
      "t_stamp": 1729537520789,
      "Series3": -1.8300000458135873e-13,
      "Series4": 3.1600000394149674e-12
    },
    {
      "t_stamp": 1729537522589,
      "Series3": -9.48999993172217e-13,
      "Series4": -3.6499999528892546e-13
    },
    {
      "t_stamp": 1729537524389,
      "Series3": -9.48999993172217e-13,
      "Series4": -3.6499999528892546e-13
    },
    {
      "t_stamp": 1729537526189,
      "Series3": -2.1900000259436614e-13,
      "Series4": 2.810000062497542e-12
    },
    {
      "t_stamp": 1729537527989,
      "Series3": -2.1900000259436614e-13,
      "Series4": 2.810000062497542e-12
    },
    {
      "t_stamp": 1729537529789,
      "Series3": 5.480000134228113e-13,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537531589,
      "Series3": 5.480000134228113e-13,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537533389,
      "Series3": 5.480000134228113e-13,
      "Series4": 3.3999998996780967e-12
    },
    {
      "t_stamp": 1729537535189,
      "Series3": 8.760000103774646e-13,
      "Series4": 2.0599999570741767e-12
    },
    {
      "t_stamp": 1729537536989,
      "Series3": 5.109999879834848e-13,
      "Series4": 5.220000213329579e-12
    },
    {
      "t_stamp": 1729537538789,
      "Series3": 5.109999879834848e-13,
      "Series4": 5.220000213329579e-12
    },
    {
      "t_stamp": 1729537540589,
      "Series3": 5.109999879834848e-13,
      "Series4": 5.220000213329579e-12
    },
    {
      "t_stamp": 1729537542389,
      "Series3": 9.309999602843955e-13,
      "Series4": 1.8800000618768298e-12
    },
    {
      "t_stamp": 1729537544189,
      "Series3": 9.309999602843955e-13,
      "Series4": 1.8800000618768298e-12
    },
    {
      "t_stamp": 1729537545989,
      "Series3": 1.67999999762386e-12,
      "Series4": 2.0599999570741767e-12
    },
    {
      "t_stamp": 1729537547789,
      "Series3": 1.67999999762386e-12,
      "Series4": 2.0599999570741767e-12
    },
    {
      "t_stamp": 1729537549589,
      "Series3": 3.099999911718859e-13,
      "Series4": 3.520000046650096e-12
    },
    {
      "t_stamp": 1729537551389,
      "Series3": 3.099999911718859e-13,
      "Series4": 3.520000046650096e-12
    },
    {
      "t_stamp": 1729537553189,
      "Series3": 1.4800000417911074e-12,
      "Series4": 2.499999990010493e-12
    },
    {
      "t_stamp": 1729537554989,
      "Series3": 1.4800000417911074e-12,
      "Series4": 2.499999990010493e-12
    },
    {
      "t_stamp": 1729537556789,
      "Series3": 1.4800000417911074e-12,
      "Series4": 2.499999990010493e-12
    },
    {
      "t_stamp": 1729537558589,
      "Series3": 1.8300000458135873e-13,
      "Series4": 3.810000058501739e-12
    },
    {
      "t_stamp": 1729537560389,
      "Series3": 1.8300000458135873e-13,
      "Series4": 3.810000058501739e-12
    },
    {
      "t_stamp": 1729537562189,
      "Series3": 2.7699999412267307e-12,
      "Series4": 2.2099999781588497e-12
    },
    {
      "t_stamp": 1729537563989,
      "Series3": 2.7699999412267307e-12,
      "Series4": 2.2099999781588497e-12
    },
    {
      "t_stamp": 1729537565789,
      "Series3": -4.19999999405965e-13,
      "Series4": 5.589999817201541e-12
    },
    {
      "t_stamp": 1729537567589,
      "Series3": -4.19999999405965e-13,
      "Series4": 5.589999817201541e-12
    },
    {
      "t_stamp": 1729537569389,
      "Series3": -9.130000358167911e-13,
      "Series4": 2.660000041412869e-12
    },
    {
      "t_stamp": 1729537571189,
      "Series3": -9.130000358167911e-13,
      "Series4": 2.660000041412869e-12
    },
    {
      "t_stamp": 1729537572989,
      "Series3": -9.130000358167911e-13,
      "Series4": 2.660000041412869e-12
    }
  ]
}

Isn't the problem that you're asking the chart to get the log of a negative number?
Thought experiment: what value of x in 10x will give you a negative result?

More here:

2 Likes