echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] markArea is not accurate with bar series

Open Edo2610 opened this issue 1 year ago • 13 comments

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html

Steps to Reproduce

The chart options to reproduce the problem are:

option = {
  grid: [
    {
      id: 'gridDataSx',
      left: '50px',
      right: '50px',
      top: '40px',
      height: '30%'
    },
    {
      id: 'gridChannelSx',
      left: '50px',
      right: '50px',
      top: '45%',
      height: '30%',
      show: true,
      backgroundColor: '#0000ff'
    }
  ],
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      animation: false
    }
  },
  dataZoom: [
    {
      type: 'inside',
      filterMode: 'none',
      xAxisIndex: [0, 1]
    },
    {
      type: 'slider',
      filterMode: 'none',
      xAxisIndex: [0, 1]
    }
  ],
  xAxis: [
    {
      id: 'xDataSx',
      gridIndex: 0,
      type: 'category',
      show: true,
      data: [
        7600, 7604, 7608, 7612, 7616, 7620, 7624, 7628, 7632, 7636, 7640, 7644, 7648,
        7652, 7656, 7660, 7664, 7668, 7672, 7676, 7680, 7684, 7688, 7692, 7696,
        7700, 7704, 7708, 7712, 7716, 7720, 7724, 7728, 7732, 7736, 7740, 7744,
        7748, 7752, 7756, 7760, 7764, 7768, 7772, 7776, 7780, 7784, 7788, 7792,
        7796, 7800, 7804, 7808, 7812, 7816, 7820, 7824, 7828, 7832, 7836, 7840,
        7844, 7848, 7852, 7856, 7860, 7864, 7868, 7872, 7876, 7880, 7884, 7888,
        7892, 7896, 7900, 7904, 7908, 7912, 7916, 7920, 7924, 7928, 7932, 7936,
        7940, 7944, 7948, 7952, 7956, 7960, 7964, 7968, 7972, 7976, 7980, 7984,
        7988, 7992, 7996, 8000, 8004, 8008, 8012, 8016, 8020, 8024, 8028, 8032,
        8036, 8040, 8044, 8048, 8052, 8056, 8060, 8064, 8068, 8072, 8076, 8080,
        8084, 8088, 8092, 8096, 8100, 8104, 8108, 8112, 8116, 8120, 8124, 8128,
        8132, 8136, 8140, 8144, 8148, 8152, 8156, 8160, 8164, 8168, 8172, 8176,
        8180, 8184, 8188, 8192, 8196, 8200, 8204, 8208, 8212, 8216, 8220, 8224,
        8228, 8232, 8236, 8240, 8244, 8248, 8252, 8256, 8260, 8264, 8268, 8272,
        8276, 8280, 8284, 8288, 8292, 8296, 8300, 8304, 8308, 8312, 8316, 8320,
        8324, 8328, 8332, 8336, 8340, 8344, 8348, 8352, 8356, 8360, 8364, 8368,
        8372, 8376, 8380, 8384, 8388, 8392, 8396, 8400, 8404, 8408, 8412, 8416,
        8420, 8424, 8428, 8432, 8436, 8440, 8444, 8448, 8452, 8456, 8460, 8464,
        8468, 8472, 8476, 8480, 8484, 8488, 8492, 8496, 8500, 8504, 8508, 8512,
        8516, 8520, 8524, 8528, 8532, 8536, 8540, 8544, 8548, 8552, 8556, 8560,
        8564, 8568, 8572, 8576, 8580, 8584, 8588, 8592, 8596, 8600, 8604, 8608,
        8612, 8616, 8620, 8624, 8628, 8632, 8636, 8640, 8644, 8648, 8652, 8656,
        8660, 8664, 8668, 8672, 8676, 8680, 8684, 8688, 8692, 8696, 8700, 8704,
        8708, 8712, 8716, 8720, 8724, 8728, 8732, 8736, 8740, 8744, 8748, 8752,
        8756, 8760, 8764, 8768, 8772, 8776, 8780, 8784, 8788, 8792, 8796, 8800,
        8804, 8808, 8812, 8816, 8820, 8824, 8828, 8832, 8836, 8840, 8844, 8848,
        8852, 8856, 8860, 8864, 8868, 8872, 8876, 8880, 8884, 8888, 8892, 8896,
        8900, 8904, 8908, 8912, 8916, 8920, 8924, 8928, 8932, 8936, 8940, 8944,
        8948, 8952, 8956, 8960, 8964, 8968, 8972, 8976, 8980, 8984, 8988, 8992,
        8996, 9000, 9004, 9008, 9012, 9016, 9020, 9024, 9028, 9032, 9036, 9040,
        9044, 9048, 9052, 9056, 9060, 9064, 9068, 9072, 9076, 9080, 9084, 9088,
        9092, 9096, 9100, 9104, 9108, 9112, 9116, 9120, 9124, 9128, 9132, 9136,
        9140, 9144, 9148, 9152, 9156, 9160, 9164, 9168, 9172, 9176, 9180, 9184,
        9188, 9192, 9196, 9200, 9204, 9208, 9212, 9216, 9220, 9224, 9228, 9232,
        9236, 9240, 9244, 9248, 9252, 9256, 9260, 9264, 9268, 9272, 9276, 9280,
        9284, 9288, 9292, 9296, 9300, 9304, 9308, 9312, 9316, 9320, 9324, 9328,
        9332, 9336, 9340, 9344, 9348, 9352, 9356, 9360, 9364, 9368, 9372, 9376,
        9380, 9384, 9388, 9392, 9396, 9400, 9404, 9408, 9412, 9416, 9420, 9424,
        9428, 9432, 9436, 9440, 9444, 9448, 9452, 9456, 9460, 9464, 9468, 9472,
        9476, 9480, 9484, 9488, 9492, 9496, 9500, 9504, 9508, 9512, 9516, 9520,
        9524, 9528, 9532, 9536, 9540, 9544, 9548, 9552, 9556, 9560, 9564, 9568,
        9572, 9576, 9580, 9584, 9588, 9592, 9596, 9600, 9604, 9608, 9612, 9616,
        9620, 9624, 9628, 9632, 9636, 9640, 9644, 9648, 9652, 9656, 9660, 9664,
        9668, 9672, 9676, 9680, 9684, 9688, 9692, 9696, 9700, 9704, 9708, 9712,
        9716, 9720, 9724, 9728, 9732, 9736, 9740, 9744, 9748, 9752, 9756, 9760,
        9764, 9768, 9772, 9776, 9780, 9784, 9788, 9792, 9796, 9800, 9804, 9808,
        9812, 9816, 9820, 9824, 9828, 9832, 9836, 9840, 9844, 9848, 9852, 9856,
        9860, 9864, 9868, 9872, 9876, 9880, 9884, 9888, 9892, 9896, 9900, 9904,
        9908, 9912, 9916, 9920, 9924, 9928, 9932, 9936, 9940, 9944, 9948, 9952,
        9956, 9960, 9964, 9968, 9972, 9976, 9980, 9984, 9988, 9992, 9996, 10000,
        10004, 10008, 10012, 10016, 10020, 10024, 10028, 10032, 10036, 10040,
        10044, 10048, 10052, 10056, 10060, 10064, 10068, 10072, 10076, 10080,
        10084, 10088, 10092, 10096, 10100, 10104, 10108, 10112, 10116, 10120,
        10124, 10128, 10132, 10136, 10140, 10144, 10148, 10152, 10156, 10160,
        10164, 10168, 10172, 10176, 10180, 10184, 10188, 10192, 10196, 10200,
        10204, 10208, 10212, 10216, 10220, 10224, 10228, 10232, 10236, 10240,
        10244, 10248, 10252, 10256, 10260, 10264, 10268, 10272, 10276, 10280,
        10284, 10288, 10292, 10296, 10300, 10304, 10308, 10312, 10316, 10320,
        10324, 10328, 10332, 10336, 10340, 10344, 10348, 10352, 10356, 10360,
        10364, 10368, 10372, 10376, 10380, 10384, 10388, 10392, 10396, 10400,
        10404, 10408, 10412, 10416, 10420, 10424, 10428, 10432, 10436, 10440,
        10444, 10448, 10452, 10456, 10460, 10464, 10468, 10472, 10476, 10480,
        10484, 10488, 10492, 10496, 10500, 10504, 10508, 10512, 10516, 10520,
        10524, 10528, 10532, 10536, 10540, 10544, 10548, 10552, 10556, 10560,
        10564, 10568, 10572, 10576, 10580, 10584, 10588, 10592, 10596, 10600,
        10604, 10608, 10612, 10616, 10620, 10624, 10628, 10632, 10636, 10640,
        10644, 10648, 10652, 10656, 10660, 10664, 10668, 10672, 10676, 10680,
        10684, 10688, 10692, 10696, 10700, 10704, 10708, 10712, 10716, 10720,
        10724, 10728, 10732, 10736, 10740, 10744, 10748, 10752, 10756, 10760,
        10764, 10768, 10772, 10776, 10780, 10784, 10788, 10792, 10796, 10800,
        10804, 10808, 10812, 10816, 10820, 10824, 10828, 10832, 10836, 10840,
        10844, 10848, 10852, 10856, 10860, 10864, 10868, 10872, 10876, 10880,
        10884, 10888, 10892, 10896, 10900, 10904, 10908, 10912, 10916, 10920,
        10924, 10928, 10932, 10936, 10940, 10944, 10948, 10952, 10956, 10960,
        10964, 10968, 10972, 10976, 10980, 10984, 10988, 10992, 10996, 11000,
        11004, 11008, 11012, 11016, 11020, 11024, 11028, 11032, 11036, 11040,
        11044, 11048, 11052, 11056, 11060, 11064, 11068, 11072, 11076, 11080,
        11084, 11088, 11092, 11096, 11100, 11104, 11108, 11112, 11116, 11120,
        11124, 11128, 11132, 11136, 11140, 11144, 11148, 11152, 11156, 11160,
        11164, 11168, 11172, 11176, 11180, 11184, 11188, 11192, 11196, 11200,
        11204, 11208, 11212, 11216, 11220, 11224, 11228, 11232, 11236, 11240,
        11244, 11248, 11252, 11256, 11260, 11264, 11268, 11272, 11276, 11280,
        11284, 11288, 11292, 11296, 11300, 11304, 11308, 11312, 11316, 11320,
        11324, 11328, 11332, 11336, 11340, 11344, 11348, 11352, 11356, 11360,
        11364, 11368, 11372, 11376, 11380, 11384, 11388, 11392, 11396, 11400,
        11404, 11408, 11412, 11416, 11420, 11424, 11428, 11432, 11436, 11440,
        11444, 11448, 11452, 11456, 11460, 11464, 11468, 11472, 11476, 11480,
        11484, 11488, 11492, 11496, 11500, 11504, 11508, 11512, 11516, 11520,
        11524, 11528, 11532, 11536, 11540, 11544, 11548, 11552, 11556, 11560,
        11564, 11568, 11572, 11576, 11580, 11584, 11588, 11592, 11596, 11600,
        11604, 11608, 11612, 11616, 11620, 11624, 11628, 11632, 11636, 11640,
        11644, 11648, 11652, 11656, 11660, 11664, 11668, 11672, 11676, 11680,
        11684, 11688, 11692, 11696, 11700, 11704, 11708, 11712, 11716, 11720,
        11724, 11728, 11732, 11736, 11740, 11744, 11748, 11752, 11756, 11760,
        11764, 11768, 11772, 11776, 11780, 11784, 11788, 11792, 11796, 11800,
        11804, 11808, 11812, 11816, 11820, 11824, 11828, 11832, 11836, 11840,
        11844, 11848, 11852, 11856, 11860, 11864, 11868, 11872, 11876, 11880,
        11884, 11888, 11892, 11896, 11900, 11904, 11908, 11912, 11916, 11920,
        11924, 11928, 11932, 11936, 11940, 11944, 11948, 11952, 11956, 11960,
        11964, 11968, 11972, 11976, 11980, 11984, 11988, 11992, 11996, 12000,
        12004, 12008, 12012, 12016, 12020, 12024, 12028, 12032, 12036, 12040,
        12044, 12048, 12052, 12056, 12060, 12064, 12068, 12072, 12076, 12080,
        12084, 12088, 12092, 12096, 12100, 12104, 12108, 12112, 12116, 12120,
        12124, 12128, 12132, 12136, 12140, 12144, 12148, 12152, 12156, 12160,
        12164, 12168, 12172, 12176, 12180, 12184, 12188, 12192, 12196, 12200,
        12204, 12208, 12212, 12216, 12220, 12224, 12228, 12232, 12236, 12240,
        12244, 12248, 12252, 12256, 12260, 12264, 12268, 12272, 12276, 12280,
        12284, 12288, 12292, 12296, 12300, 12304, 12308, 12312, 12316, 12320,
        12324, 12328, 12332, 12336, 12340, 12344, 12348, 12352, 12356, 12360,
        12364, 12368, 12372, 12376, 12380, 12384, 12388, 12392, 12396, 12400,
        12404, 12408, 12412, 12416, 12420, 12424, 12428, 12432, 12436, 12440,
        12444, 12448, 12452, 12456, 12460, 12464, 12468, 12472, 12476, 12480,
        12484, 12488, 12492, 12496, 12500, 12504, 12508, 12512, 12516, 12520,
        12524, 12528, 12532, 12536, 12540, 12544, 12548, 12552, 12556, 12560,
        12564, 12568, 12572, 12576, 12580, 12584, 12588, 12592, 12596, 12600,
        12604, 12608, 12612, 12616, 12620, 12624, 12628, 12632, 12636, 12640,
        12644, 12648, 12652, 12656, 12660, 12664, 12668, 12672, 12676
      ]
    },
    {
      id: 'xChannelSx',
      gridIndex: 1,
      type: 'category',
      show: true,
      data: [
        7600, 7604, 7608, 7612, 7616, 7620, 7624, 7628, 7632, 7636, 7640, 7644, 7648,
        7652, 7656, 7660, 7664, 7668, 7672, 7676, 7680, 7684, 7688, 7692, 7696,
        7700, 7704, 7708, 7712, 7716, 7720, 7724, 7728, 7732, 7736, 7740, 7744,
        7748, 7752, 7756, 7760, 7764, 7768, 7772, 7776, 7780, 7784, 7788, 7792,
        7796, 7800, 7804, 7808, 7812, 7816, 7820, 7824, 7828, 7832, 7836, 7840,
        7844, 7848, 7852, 7856, 7860, 7864, 7868, 7872, 7876, 7880, 7884, 7888,
        7892, 7896, 7900, 7904, 7908, 7912, 7916, 7920, 7924, 7928, 7932, 7936,
        7940, 7944, 7948, 7952, 7956, 7960, 7964, 7968, 7972, 7976, 7980, 7984,
        7988, 7992, 7996, 8000, 8004, 8008, 8012, 8016, 8020, 8024, 8028, 8032,
        8036, 8040, 8044, 8048, 8052, 8056, 8060, 8064, 8068, 8072, 8076, 8080,
        8084, 8088, 8092, 8096, 8100, 8104, 8108, 8112, 8116, 8120, 8124, 8128,
        8132, 8136, 8140, 8144, 8148, 8152, 8156, 8160, 8164, 8168, 8172, 8176,
        8180, 8184, 8188, 8192, 8196, 8200, 8204, 8208, 8212, 8216, 8220, 8224,
        8228, 8232, 8236, 8240, 8244, 8248, 8252, 8256, 8260, 8264, 8268, 8272,
        8276, 8280, 8284, 8288, 8292, 8296, 8300, 8304, 8308, 8312, 8316, 8320,
        8324, 8328, 8332, 8336, 8340, 8344, 8348, 8352, 8356, 8360, 8364, 8368,
        8372, 8376, 8380, 8384, 8388, 8392, 8396, 8400, 8404, 8408, 8412, 8416,
        8420, 8424, 8428, 8432, 8436, 8440, 8444, 8448, 8452, 8456, 8460, 8464,
        8468, 8472, 8476, 8480, 8484, 8488, 8492, 8496, 8500, 8504, 8508, 8512,
        8516, 8520, 8524, 8528, 8532, 8536, 8540, 8544, 8548, 8552, 8556, 8560,
        8564, 8568, 8572, 8576, 8580, 8584, 8588, 8592, 8596, 8600, 8604, 8608,
        8612, 8616, 8620, 8624, 8628, 8632, 8636, 8640, 8644, 8648, 8652, 8656,
        8660, 8664, 8668, 8672, 8676, 8680, 8684, 8688, 8692, 8696, 8700, 8704,
        8708, 8712, 8716, 8720, 8724, 8728, 8732, 8736, 8740, 8744, 8748, 8752,
        8756, 8760, 8764, 8768, 8772, 8776, 8780, 8784, 8788, 8792, 8796, 8800,
        8804, 8808, 8812, 8816, 8820, 8824, 8828, 8832, 8836, 8840, 8844, 8848,
        8852, 8856, 8860, 8864, 8868, 8872, 8876, 8880, 8884, 8888, 8892, 8896,
        8900, 8904, 8908, 8912, 8916, 8920, 8924, 8928, 8932, 8936, 8940, 8944,
        8948, 8952, 8956, 8960, 8964, 8968, 8972, 8976, 8980, 8984, 8988, 8992,
        8996, 9000, 9004, 9008, 9012, 9016, 9020, 9024, 9028, 9032, 9036, 9040,
        9044, 9048, 9052, 9056, 9060, 9064, 9068, 9072, 9076, 9080, 9084, 9088,
        9092, 9096, 9100, 9104, 9108, 9112, 9116, 9120, 9124, 9128, 9132, 9136,
        9140, 9144, 9148, 9152, 9156, 9160, 9164, 9168, 9172, 9176, 9180, 9184,
        9188, 9192, 9196, 9200, 9204, 9208, 9212, 9216, 9220, 9224, 9228, 9232,
        9236, 9240, 9244, 9248, 9252, 9256, 9260, 9264, 9268, 9272, 9276, 9280,
        9284, 9288, 9292, 9296, 9300, 9304, 9308, 9312, 9316, 9320, 9324, 9328,
        9332, 9336, 9340, 9344, 9348, 9352, 9356, 9360, 9364, 9368, 9372, 9376,
        9380, 9384, 9388, 9392, 9396, 9400, 9404, 9408, 9412, 9416, 9420, 9424,
        9428, 9432, 9436, 9440, 9444, 9448, 9452, 9456, 9460, 9464, 9468, 9472,
        9476, 9480, 9484, 9488, 9492, 9496, 9500, 9504, 9508, 9512, 9516, 9520,
        9524, 9528, 9532, 9536, 9540, 9544, 9548, 9552, 9556, 9560, 9564, 9568,
        9572, 9576, 9580, 9584, 9588, 9592, 9596, 9600, 9604, 9608, 9612, 9616,
        9620, 9624, 9628, 9632, 9636, 9640, 9644, 9648, 9652, 9656, 9660, 9664,
        9668, 9672, 9676, 9680, 9684, 9688, 9692, 9696, 9700, 9704, 9708, 9712,
        9716, 9720, 9724, 9728, 9732, 9736, 9740, 9744, 9748, 9752, 9756, 9760,
        9764, 9768, 9772, 9776, 9780, 9784, 9788, 9792, 9796, 9800, 9804, 9808,
        9812, 9816, 9820, 9824, 9828, 9832, 9836, 9840, 9844, 9848, 9852, 9856,
        9860, 9864, 9868, 9872, 9876, 9880, 9884, 9888, 9892, 9896, 9900, 9904,
        9908, 9912, 9916, 9920, 9924, 9928, 9932, 9936, 9940, 9944, 9948, 9952,
        9956, 9960, 9964, 9968, 9972, 9976, 9980, 9984, 9988, 9992, 9996, 10000,
        10004, 10008, 10012, 10016, 10020, 10024, 10028, 10032, 10036, 10040,
        10044, 10048, 10052, 10056, 10060, 10064, 10068, 10072, 10076, 10080,
        10084, 10088, 10092, 10096, 10100, 10104, 10108, 10112, 10116, 10120,
        10124, 10128, 10132, 10136, 10140, 10144, 10148, 10152, 10156, 10160,
        10164, 10168, 10172, 10176, 10180, 10184, 10188, 10192, 10196, 10200,
        10204, 10208, 10212, 10216, 10220, 10224, 10228, 10232, 10236, 10240,
        10244, 10248, 10252, 10256, 10260, 10264, 10268, 10272, 10276, 10280,
        10284, 10288, 10292, 10296, 10300, 10304, 10308, 10312, 10316, 10320,
        10324, 10328, 10332, 10336, 10340, 10344, 10348, 10352, 10356, 10360,
        10364, 10368, 10372, 10376, 10380, 10384, 10388, 10392, 10396, 10400,
        10404, 10408, 10412, 10416, 10420, 10424, 10428, 10432, 10436, 10440,
        10444, 10448, 10452, 10456, 10460, 10464, 10468, 10472, 10476, 10480,
        10484, 10488, 10492, 10496, 10500, 10504, 10508, 10512, 10516, 10520,
        10524, 10528, 10532, 10536, 10540, 10544, 10548, 10552, 10556, 10560,
        10564, 10568, 10572, 10576, 10580, 10584, 10588, 10592, 10596, 10600,
        10604, 10608, 10612, 10616, 10620, 10624, 10628, 10632, 10636, 10640,
        10644, 10648, 10652, 10656, 10660, 10664, 10668, 10672, 10676, 10680,
        10684, 10688, 10692, 10696, 10700, 10704, 10708, 10712, 10716, 10720,
        10724, 10728, 10732, 10736, 10740, 10744, 10748, 10752, 10756, 10760,
        10764, 10768, 10772, 10776, 10780, 10784, 10788, 10792, 10796, 10800,
        10804, 10808, 10812, 10816, 10820, 10824, 10828, 10832, 10836, 10840,
        10844, 10848, 10852, 10856, 10860, 10864, 10868, 10872, 10876, 10880,
        10884, 10888, 10892, 10896, 10900, 10904, 10908, 10912, 10916, 10920,
        10924, 10928, 10932, 10936, 10940, 10944, 10948, 10952, 10956, 10960,
        10964, 10968, 10972, 10976, 10980, 10984, 10988, 10992, 10996, 11000,
        11004, 11008, 11012, 11016, 11020, 11024, 11028, 11032, 11036, 11040,
        11044, 11048, 11052, 11056, 11060, 11064, 11068, 11072, 11076, 11080,
        11084, 11088, 11092, 11096, 11100, 11104, 11108, 11112, 11116, 11120,
        11124, 11128, 11132, 11136, 11140, 11144, 11148, 11152, 11156, 11160,
        11164, 11168, 11172, 11176, 11180, 11184, 11188, 11192, 11196, 11200,
        11204, 11208, 11212, 11216, 11220, 11224, 11228, 11232, 11236, 11240,
        11244, 11248, 11252, 11256, 11260, 11264, 11268, 11272, 11276, 11280,
        11284, 11288, 11292, 11296, 11300, 11304, 11308, 11312, 11316, 11320,
        11324, 11328, 11332, 11336, 11340, 11344, 11348, 11352, 11356, 11360,
        11364, 11368, 11372, 11376, 11380, 11384, 11388, 11392, 11396, 11400,
        11404, 11408, 11412, 11416, 11420, 11424, 11428, 11432, 11436, 11440,
        11444, 11448, 11452, 11456, 11460, 11464, 11468, 11472, 11476, 11480,
        11484, 11488, 11492, 11496, 11500, 11504, 11508, 11512, 11516, 11520,
        11524, 11528, 11532, 11536, 11540, 11544, 11548, 11552, 11556, 11560,
        11564, 11568, 11572, 11576, 11580, 11584, 11588, 11592, 11596, 11600,
        11604, 11608, 11612, 11616, 11620, 11624, 11628, 11632, 11636, 11640,
        11644, 11648, 11652, 11656, 11660, 11664, 11668, 11672, 11676, 11680,
        11684, 11688, 11692, 11696, 11700, 11704, 11708, 11712, 11716, 11720,
        11724, 11728, 11732, 11736, 11740, 11744, 11748, 11752, 11756, 11760,
        11764, 11768, 11772, 11776, 11780, 11784, 11788, 11792, 11796, 11800,
        11804, 11808, 11812, 11816, 11820, 11824, 11828, 11832, 11836, 11840,
        11844, 11848, 11852, 11856, 11860, 11864, 11868, 11872, 11876, 11880,
        11884, 11888, 11892, 11896, 11900, 11904, 11908, 11912, 11916, 11920,
        11924, 11928, 11932, 11936, 11940, 11944, 11948, 11952, 11956, 11960,
        11964, 11968, 11972, 11976, 11980, 11984, 11988, 11992, 11996, 12000,
        12004, 12008, 12012, 12016, 12020, 12024, 12028, 12032, 12036, 12040,
        12044, 12048, 12052, 12056, 12060, 12064, 12068, 12072, 12076, 12080,
        12084, 12088, 12092, 12096, 12100, 12104, 12108, 12112, 12116, 12120,
        12124, 12128, 12132, 12136, 12140, 12144, 12148, 12152, 12156, 12160,
        12164, 12168, 12172, 12176, 12180, 12184, 12188, 12192, 12196, 12200,
        12204, 12208, 12212, 12216, 12220, 12224, 12228, 12232, 12236, 12240,
        12244, 12248, 12252, 12256, 12260, 12264, 12268, 12272, 12276, 12280,
        12284, 12288, 12292, 12296, 12300, 12304, 12308, 12312, 12316, 12320,
        12324, 12328, 12332, 12336, 12340, 12344, 12348, 12352, 12356, 12360,
        12364, 12368, 12372, 12376, 12380, 12384, 12388, 12392, 12396, 12400,
        12404, 12408, 12412, 12416, 12420, 12424, 12428, 12432, 12436, 12440,
        12444, 12448, 12452, 12456, 12460, 12464, 12468, 12472, 12476, 12480,
        12484, 12488, 12492, 12496, 12500, 12504, 12508, 12512, 12516, 12520,
        12524, 12528, 12532, 12536, 12540, 12544, 12548, 12552, 12556, 12560,
        12564, 12568, 12572, 12576, 12580, 12584, 12588, 12592, 12596, 12600,
        12604, 12608, 12612, 12616, 12620, 12624, 12628, 12632, 12636, 12640,
        12644, 12648, 12652, 12656, 12660, 12664, 12668, 12672, 12676
      ]
    }
  ],
  yAxis: [
    {
      id: 'yDataSx',
      gridIndex: 0,
      type: 'value',
      min: 0,
      max: 3
    },
    {
      id: 'yChannelSx',
      gridIndex: 1,
      type: 'category',
      data: [1, 2, 3, 4, 5, 6, 7, 8]
    }
  ],
  series: [
    {
      id: 'seriesDataSx',
      xAxisIndex: 0,
      yAxisIndex: 0,
      data: [],
      type: 'bar',
      sampling: 'none',
      markArea: {
        silent: true,
        itemStyle: {
          color: 'lightgray',
          opacity: 0.5
        },
        data: [
          [
            {
              xAxis: '8600'
            },
            {
              xAxis: '11700'
            }
          ]
        ]
      }
    },
    {
      id: 'seriesChannelSx',
      xAxisIndex: 1,
      yAxisIndex: 1,
      data: [],
      markArea: {
        silent: true,
        itemStyle: {
          color: 'lightgray',
          opacity: 0.5
        },
        data: [
          [
            {
              xAxis: '8600'
            },
            {
              xAxis: '11700'
            }
          ]
        ]
      },
      type: 'heatmap'
    }
  ]
};

Current Behavior

Examples-ApacheECharts-GoogleChrome2024-03-0112-39-52-ezgif com-crop

Expected Behavior

The expected behavior is the same behavior that it has when, in the gif, I set type to 'line'. Otherwise, switching version in echarts examples tool, I notice that with version 5.4.0 the markArea works well, in 5.4.2 the markArea already has the problem.

Environment

- OS:Windows 10
- Browser: Chomre 121.0.6167.185
- Framework: Angular 15

Any additional comments?

Looking in change log I notice this fix in version 5.4.2 that is related striclty with my issue

[Fix] [marker] Fix abnormal range of markArea in bar series. #18229 (Ovilia)

Edo2610 avatar Mar 01 '24 12:03 Edo2610

Does this problem relates to sampling? If not, please provide a minimal data case to better locate the problem.

Ovilia avatar Mar 04 '24 08:03 Ovilia

@Edo2610 Please provide a demo for the issue either with Official Editor, CodePen, CodeSandbox or JSFiddle.

echarts-bot[bot] avatar Mar 04 '24 08:03 echarts-bot[bot]

I set sampling to 'none' to show that it isn't a sampling problem. If you remove it the behavior is the same. I can't provide a minimal data case since with a small xAxis it works fine. I set data of series to empty array to show that it isn't a data problem but seems to be related only to the length of the xAxis.

Edo2610 avatar Mar 04 '24 12:03 Edo2610

I click on close with comment for error

Edo2610 avatar Mar 04 '24 12:03 Edo2610

I reduce to minimum all other options and I remove grid options to overlap the two markArea, leaving only big xAxis. In this conditions, at start You can notice that markArea aren't aligned (despite they have the same options)

image

when You zoom in on one extreme You can notice that the markArea are aligned

image

option = {
  grid: [ {}, {} ],
  tooltip: {
    trigger: 'axis'
  },
  dataZoom: [
    {
      type: 'inside',
      filterMode: 'none',
      xAxisIndex: [0, 1]
    },
    {
      type: 'slider',
      filterMode: 'none',
      xAxisIndex: [0, 1]
    }
  ],
  xAxis: [
    {
      gridIndex: 0,
      type: 'category',
      show: true,
      data: [
        7600, 7604, 7608, 7612, 7616, 7620, 7624, 7628, 7632, 7636, 7640, 7644, 7648,
        7652, 7656, 7660, 7664, 7668, 7672, 7676, 7680, 7684, 7688, 7692, 7696,
        7700, 7704, 7708, 7712, 7716, 7720, 7724, 7728, 7732, 7736, 7740, 7744,
        7748, 7752, 7756, 7760, 7764, 7768, 7772, 7776, 7780, 7784, 7788, 7792,
        7796, 7800, 7804, 7808, 7812, 7816, 7820, 7824, 7828, 7832, 7836, 7840,
        7844, 7848, 7852, 7856, 7860, 7864, 7868, 7872, 7876, 7880, 7884, 7888,
        7892, 7896, 7900, 7904, 7908, 7912, 7916, 7920, 7924, 7928, 7932, 7936,
        7940, 7944, 7948, 7952, 7956, 7960, 7964, 7968, 7972, 7976, 7980, 7984,
        7988, 7992, 7996, 8000, 8004, 8008, 8012, 8016, 8020, 8024, 8028, 8032,
        8036, 8040, 8044, 8048, 8052, 8056, 8060, 8064, 8068, 8072, 8076, 8080,
        8084, 8088, 8092, 8096, 8100, 8104, 8108, 8112, 8116, 8120, 8124, 8128,
        8132, 8136, 8140, 8144, 8148, 8152, 8156, 8160, 8164, 8168, 8172, 8176,
        8180, 8184, 8188, 8192, 8196, 8200, 8204, 8208, 8212, 8216, 8220, 8224,
        8228, 8232, 8236, 8240, 8244, 8248, 8252, 8256, 8260, 8264, 8268, 8272,
        8276, 8280, 8284, 8288, 8292, 8296, 8300, 8304, 8308, 8312, 8316, 8320,
        8324, 8328, 8332, 8336, 8340, 8344, 8348, 8352, 8356, 8360, 8364, 8368,
        8372, 8376, 8380, 8384, 8388, 8392, 8396, 8400, 8404, 8408, 8412, 8416,
        8420, 8424, 8428, 8432, 8436, 8440, 8444, 8448, 8452, 8456, 8460, 8464,
        8468, 8472, 8476, 8480, 8484, 8488, 8492, 8496, 8500, 8504, 8508, 8512,
        8516, 8520, 8524, 8528, 8532, 8536, 8540, 8544, 8548, 8552, 8556, 8560,
        8564, 8568, 8572, 8576, 8580, 8584, 8588, 8592, 8596, 8600, 8604, 8608,
        8612, 8616, 8620, 8624, 8628, 8632, 8636, 8640, 8644, 8648, 8652, 8656,
        8660, 8664, 8668, 8672, 8676, 8680, 8684, 8688, 8692, 8696, 8700, 8704,
        8708, 8712, 8716, 8720, 8724, 8728, 8732, 8736, 8740, 8744, 8748, 8752,
        8756, 8760, 8764, 8768, 8772, 8776, 8780, 8784, 8788, 8792, 8796, 8800,
        8804, 8808, 8812, 8816, 8820, 8824, 8828, 8832, 8836, 8840, 8844, 8848,
        8852, 8856, 8860, 8864, 8868, 8872, 8876, 8880, 8884, 8888, 8892, 8896,
        8900, 8904, 8908, 8912, 8916, 8920, 8924, 8928, 8932, 8936, 8940, 8944,
        8948, 8952, 8956, 8960, 8964, 8968, 8972, 8976, 8980, 8984, 8988, 8992,
        8996, 9000, 9004, 9008, 9012, 9016, 9020, 9024, 9028, 9032, 9036, 9040,
        9044, 9048, 9052, 9056, 9060, 9064, 9068, 9072, 9076, 9080, 9084, 9088,
        9092, 9096, 9100, 9104, 9108, 9112, 9116, 9120, 9124, 9128, 9132, 9136,
        9140, 9144, 9148, 9152, 9156, 9160, 9164, 9168, 9172, 9176, 9180, 9184,
        9188, 9192, 9196, 9200, 9204, 9208, 9212, 9216, 9220, 9224, 9228, 9232,
        9236, 9240, 9244, 9248, 9252, 9256, 9260, 9264, 9268, 9272, 9276, 9280,
        9284, 9288, 9292, 9296, 9300, 9304, 9308, 9312, 9316, 9320, 9324, 9328,
        9332, 9336, 9340, 9344, 9348, 9352, 9356, 9360, 9364, 9368, 9372, 9376,
        9380, 9384, 9388, 9392, 9396, 9400, 9404, 9408, 9412, 9416, 9420, 9424,
        9428, 9432, 9436, 9440, 9444, 9448, 9452, 9456, 9460, 9464, 9468, 9472,
        9476, 9480, 9484, 9488, 9492, 9496, 9500, 9504, 9508, 9512, 9516, 9520,
        9524, 9528, 9532, 9536, 9540, 9544, 9548, 9552, 9556, 9560, 9564, 9568,
        9572, 9576, 9580, 9584, 9588, 9592, 9596, 9600, 9604, 9608, 9612, 9616,
        9620, 9624, 9628, 9632, 9636, 9640, 9644, 9648, 9652, 9656, 9660, 9664,
        9668, 9672, 9676, 9680, 9684, 9688, 9692, 9696, 9700, 9704, 9708, 9712,
        9716, 9720, 9724, 9728, 9732, 9736, 9740, 9744, 9748, 9752, 9756, 9760,
        9764, 9768, 9772, 9776, 9780, 9784, 9788, 9792, 9796, 9800, 9804, 9808,
        9812, 9816, 9820, 9824, 9828, 9832, 9836, 9840, 9844, 9848, 9852, 9856,
        9860, 9864, 9868, 9872, 9876, 9880, 9884, 9888, 9892, 9896, 9900, 9904,
        9908, 9912, 9916, 9920, 9924, 9928, 9932, 9936, 9940, 9944, 9948, 9952,
        9956, 9960, 9964, 9968, 9972, 9976, 9980, 9984, 9988, 9992, 9996, 10000,
        10004, 10008, 10012, 10016, 10020, 10024, 10028, 10032, 10036, 10040,
        10044, 10048, 10052, 10056, 10060, 10064, 10068, 10072, 10076, 10080,
        10084, 10088, 10092, 10096, 10100, 10104, 10108, 10112, 10116, 10120,
        10124, 10128, 10132, 10136, 10140, 10144, 10148, 10152, 10156, 10160,
        10164, 10168, 10172, 10176, 10180, 10184, 10188, 10192, 10196, 10200,
        10204, 10208, 10212, 10216, 10220, 10224, 10228, 10232, 10236, 10240,
        10244, 10248, 10252, 10256, 10260, 10264, 10268, 10272, 10276, 10280,
        10284, 10288, 10292, 10296, 10300, 10304, 10308, 10312, 10316, 10320,
        10324, 10328, 10332, 10336, 10340, 10344, 10348, 10352, 10356, 10360,
        10364, 10368, 10372, 10376, 10380, 10384, 10388, 10392, 10396, 10400,
        10404, 10408, 10412, 10416, 10420, 10424, 10428, 10432, 10436, 10440,
        10444, 10448, 10452, 10456, 10460, 10464, 10468, 10472, 10476, 10480,
        10484, 10488, 10492, 10496, 10500, 10504, 10508, 10512, 10516, 10520,
        10524, 10528, 10532, 10536, 10540, 10544, 10548, 10552, 10556, 10560,
        10564, 10568, 10572, 10576, 10580, 10584, 10588, 10592, 10596, 10600,
        10604, 10608, 10612, 10616, 10620, 10624, 10628, 10632, 10636, 10640,
        10644, 10648, 10652, 10656, 10660, 10664, 10668, 10672, 10676, 10680,
        10684, 10688, 10692, 10696, 10700, 10704, 10708, 10712, 10716, 10720,
        10724, 10728, 10732, 10736, 10740, 10744, 10748, 10752, 10756, 10760,
        10764, 10768, 10772, 10776, 10780, 10784, 10788, 10792, 10796, 10800,
        10804, 10808, 10812, 10816, 10820, 10824, 10828, 10832, 10836, 10840,
        10844, 10848, 10852, 10856, 10860, 10864, 10868, 10872, 10876, 10880,
        10884, 10888, 10892, 10896, 10900, 10904, 10908, 10912, 10916, 10920,
        10924, 10928, 10932, 10936, 10940, 10944, 10948, 10952, 10956, 10960,
        10964, 10968, 10972, 10976, 10980, 10984, 10988, 10992, 10996, 11000,
        11004, 11008, 11012, 11016, 11020, 11024, 11028, 11032, 11036, 11040,
        11044, 11048, 11052, 11056, 11060, 11064, 11068, 11072, 11076, 11080,
        11084, 11088, 11092, 11096, 11100, 11104, 11108, 11112, 11116, 11120,
        11124, 11128, 11132, 11136, 11140, 11144, 11148, 11152, 11156, 11160,
        11164, 11168, 11172, 11176, 11180, 11184, 11188, 11192, 11196, 11200,
        11204, 11208, 11212, 11216, 11220, 11224, 11228, 11232, 11236, 11240,
        11244, 11248, 11252, 11256, 11260, 11264, 11268, 11272, 11276, 11280,
        11284, 11288, 11292, 11296, 11300, 11304, 11308, 11312, 11316, 11320,
        11324, 11328, 11332, 11336, 11340, 11344, 11348, 11352, 11356, 11360,
        11364, 11368, 11372, 11376, 11380, 11384, 11388, 11392, 11396, 11400,
        11404, 11408, 11412, 11416, 11420, 11424, 11428, 11432, 11436, 11440,
        11444, 11448, 11452, 11456, 11460, 11464, 11468, 11472, 11476, 11480,
        11484, 11488, 11492, 11496, 11500, 11504, 11508, 11512, 11516, 11520,
        11524, 11528, 11532, 11536, 11540, 11544, 11548, 11552, 11556, 11560,
        11564, 11568, 11572, 11576, 11580, 11584, 11588, 11592, 11596, 11600,
        11604, 11608, 11612, 11616, 11620, 11624, 11628, 11632, 11636, 11640,
        11644, 11648, 11652, 11656, 11660, 11664, 11668, 11672, 11676, 11680,
        11684, 11688, 11692, 11696, 11700, 11704, 11708, 11712, 11716, 11720,
        11724, 11728, 11732, 11736, 11740, 11744, 11748, 11752, 11756, 11760,
        11764, 11768, 11772, 11776, 11780, 11784, 11788, 11792, 11796, 11800,
        11804, 11808, 11812, 11816, 11820, 11824, 11828, 11832, 11836, 11840,
        11844, 11848, 11852, 11856, 11860, 11864, 11868, 11872, 11876, 11880,
        11884, 11888, 11892, 11896, 11900, 11904, 11908, 11912, 11916, 11920,
        11924, 11928, 11932, 11936, 11940, 11944, 11948, 11952, 11956, 11960,
        11964, 11968, 11972, 11976, 11980, 11984, 11988, 11992, 11996, 12000,
        12004, 12008, 12012, 12016, 12020, 12024, 12028, 12032, 12036, 12040,
        12044, 12048, 12052, 12056, 12060, 12064, 12068, 12072, 12076, 12080,
        12084, 12088, 12092, 12096, 12100, 12104, 12108, 12112, 12116, 12120,
        12124, 12128, 12132, 12136, 12140, 12144, 12148, 12152, 12156, 12160,
        12164, 12168, 12172, 12176, 12180, 12184, 12188, 12192, 12196, 12200,
        12204, 12208, 12212, 12216, 12220, 12224, 12228, 12232, 12236, 12240,
        12244, 12248, 12252, 12256, 12260, 12264, 12268, 12272, 12276, 12280,
        12284, 12288, 12292, 12296, 12300, 12304, 12308, 12312, 12316, 12320,
        12324, 12328, 12332, 12336, 12340, 12344, 12348, 12352, 12356, 12360,
        12364, 12368, 12372, 12376, 12380, 12384, 12388, 12392, 12396, 12400,
        12404, 12408, 12412, 12416, 12420, 12424, 12428, 12432, 12436, 12440,
        12444, 12448, 12452, 12456, 12460, 12464, 12468, 12472, 12476, 12480,
        12484, 12488, 12492, 12496, 12500, 12504, 12508, 12512, 12516, 12520,
        12524, 12528, 12532, 12536, 12540, 12544, 12548, 12552, 12556, 12560,
        12564, 12568, 12572, 12576, 12580, 12584, 12588, 12592, 12596, 12600,
        12604, 12608, 12612, 12616, 12620, 12624, 12628, 12632, 12636, 12640,
        12644, 12648, 12652, 12656, 12660, 12664, 12668, 12672, 12676
      ],
      axisTick: {
        alignWithLabel: true
      },
      splitLine: {
        show: true
      }
    },
    {
      gridIndex: 1,
      type: 'category',
      show: true,
      data: [
        7600, 7604, 7608, 7612, 7616, 7620, 7624, 7628, 7632, 7636, 7640, 7644, 7648,
        7652, 7656, 7660, 7664, 7668, 7672, 7676, 7680, 7684, 7688, 7692, 7696,
        7700, 7704, 7708, 7712, 7716, 7720, 7724, 7728, 7732, 7736, 7740, 7744,
        7748, 7752, 7756, 7760, 7764, 7768, 7772, 7776, 7780, 7784, 7788, 7792,
        7796, 7800, 7804, 7808, 7812, 7816, 7820, 7824, 7828, 7832, 7836, 7840,
        7844, 7848, 7852, 7856, 7860, 7864, 7868, 7872, 7876, 7880, 7884, 7888,
        7892, 7896, 7900, 7904, 7908, 7912, 7916, 7920, 7924, 7928, 7932, 7936,
        7940, 7944, 7948, 7952, 7956, 7960, 7964, 7968, 7972, 7976, 7980, 7984,
        7988, 7992, 7996, 8000, 8004, 8008, 8012, 8016, 8020, 8024, 8028, 8032,
        8036, 8040, 8044, 8048, 8052, 8056, 8060, 8064, 8068, 8072, 8076, 8080,
        8084, 8088, 8092, 8096, 8100, 8104, 8108, 8112, 8116, 8120, 8124, 8128,
        8132, 8136, 8140, 8144, 8148, 8152, 8156, 8160, 8164, 8168, 8172, 8176,
        8180, 8184, 8188, 8192, 8196, 8200, 8204, 8208, 8212, 8216, 8220, 8224,
        8228, 8232, 8236, 8240, 8244, 8248, 8252, 8256, 8260, 8264, 8268, 8272,
        8276, 8280, 8284, 8288, 8292, 8296, 8300, 8304, 8308, 8312, 8316, 8320,
        8324, 8328, 8332, 8336, 8340, 8344, 8348, 8352, 8356, 8360, 8364, 8368,
        8372, 8376, 8380, 8384, 8388, 8392, 8396, 8400, 8404, 8408, 8412, 8416,
        8420, 8424, 8428, 8432, 8436, 8440, 8444, 8448, 8452, 8456, 8460, 8464,
        8468, 8472, 8476, 8480, 8484, 8488, 8492, 8496, 8500, 8504, 8508, 8512,
        8516, 8520, 8524, 8528, 8532, 8536, 8540, 8544, 8548, 8552, 8556, 8560,
        8564, 8568, 8572, 8576, 8580, 8584, 8588, 8592, 8596, 8600, 8604, 8608,
        8612, 8616, 8620, 8624, 8628, 8632, 8636, 8640, 8644, 8648, 8652, 8656,
        8660, 8664, 8668, 8672, 8676, 8680, 8684, 8688, 8692, 8696, 8700, 8704,
        8708, 8712, 8716, 8720, 8724, 8728, 8732, 8736, 8740, 8744, 8748, 8752,
        8756, 8760, 8764, 8768, 8772, 8776, 8780, 8784, 8788, 8792, 8796, 8800,
        8804, 8808, 8812, 8816, 8820, 8824, 8828, 8832, 8836, 8840, 8844, 8848,
        8852, 8856, 8860, 8864, 8868, 8872, 8876, 8880, 8884, 8888, 8892, 8896,
        8900, 8904, 8908, 8912, 8916, 8920, 8924, 8928, 8932, 8936, 8940, 8944,
        8948, 8952, 8956, 8960, 8964, 8968, 8972, 8976, 8980, 8984, 8988, 8992,
        8996, 9000, 9004, 9008, 9012, 9016, 9020, 9024, 9028, 9032, 9036, 9040,
        9044, 9048, 9052, 9056, 9060, 9064, 9068, 9072, 9076, 9080, 9084, 9088,
        9092, 9096, 9100, 9104, 9108, 9112, 9116, 9120, 9124, 9128, 9132, 9136,
        9140, 9144, 9148, 9152, 9156, 9160, 9164, 9168, 9172, 9176, 9180, 9184,
        9188, 9192, 9196, 9200, 9204, 9208, 9212, 9216, 9220, 9224, 9228, 9232,
        9236, 9240, 9244, 9248, 9252, 9256, 9260, 9264, 9268, 9272, 9276, 9280,
        9284, 9288, 9292, 9296, 9300, 9304, 9308, 9312, 9316, 9320, 9324, 9328,
        9332, 9336, 9340, 9344, 9348, 9352, 9356, 9360, 9364, 9368, 9372, 9376,
        9380, 9384, 9388, 9392, 9396, 9400, 9404, 9408, 9412, 9416, 9420, 9424,
        9428, 9432, 9436, 9440, 9444, 9448, 9452, 9456, 9460, 9464, 9468, 9472,
        9476, 9480, 9484, 9488, 9492, 9496, 9500, 9504, 9508, 9512, 9516, 9520,
        9524, 9528, 9532, 9536, 9540, 9544, 9548, 9552, 9556, 9560, 9564, 9568,
        9572, 9576, 9580, 9584, 9588, 9592, 9596, 9600, 9604, 9608, 9612, 9616,
        9620, 9624, 9628, 9632, 9636, 9640, 9644, 9648, 9652, 9656, 9660, 9664,
        9668, 9672, 9676, 9680, 9684, 9688, 9692, 9696, 9700, 9704, 9708, 9712,
        9716, 9720, 9724, 9728, 9732, 9736, 9740, 9744, 9748, 9752, 9756, 9760,
        9764, 9768, 9772, 9776, 9780, 9784, 9788, 9792, 9796, 9800, 9804, 9808,
        9812, 9816, 9820, 9824, 9828, 9832, 9836, 9840, 9844, 9848, 9852, 9856,
        9860, 9864, 9868, 9872, 9876, 9880, 9884, 9888, 9892, 9896, 9900, 9904,
        9908, 9912, 9916, 9920, 9924, 9928, 9932, 9936, 9940, 9944, 9948, 9952,
        9956, 9960, 9964, 9968, 9972, 9976, 9980, 9984, 9988, 9992, 9996, 10000,
        10004, 10008, 10012, 10016, 10020, 10024, 10028, 10032, 10036, 10040,
        10044, 10048, 10052, 10056, 10060, 10064, 10068, 10072, 10076, 10080,
        10084, 10088, 10092, 10096, 10100, 10104, 10108, 10112, 10116, 10120,
        10124, 10128, 10132, 10136, 10140, 10144, 10148, 10152, 10156, 10160,
        10164, 10168, 10172, 10176, 10180, 10184, 10188, 10192, 10196, 10200,
        10204, 10208, 10212, 10216, 10220, 10224, 10228, 10232, 10236, 10240,
        10244, 10248, 10252, 10256, 10260, 10264, 10268, 10272, 10276, 10280,
        10284, 10288, 10292, 10296, 10300, 10304, 10308, 10312, 10316, 10320,
        10324, 10328, 10332, 10336, 10340, 10344, 10348, 10352, 10356, 10360,
        10364, 10368, 10372, 10376, 10380, 10384, 10388, 10392, 10396, 10400,
        10404, 10408, 10412, 10416, 10420, 10424, 10428, 10432, 10436, 10440,
        10444, 10448, 10452, 10456, 10460, 10464, 10468, 10472, 10476, 10480,
        10484, 10488, 10492, 10496, 10500, 10504, 10508, 10512, 10516, 10520,
        10524, 10528, 10532, 10536, 10540, 10544, 10548, 10552, 10556, 10560,
        10564, 10568, 10572, 10576, 10580, 10584, 10588, 10592, 10596, 10600,
        10604, 10608, 10612, 10616, 10620, 10624, 10628, 10632, 10636, 10640,
        10644, 10648, 10652, 10656, 10660, 10664, 10668, 10672, 10676, 10680,
        10684, 10688, 10692, 10696, 10700, 10704, 10708, 10712, 10716, 10720,
        10724, 10728, 10732, 10736, 10740, 10744, 10748, 10752, 10756, 10760,
        10764, 10768, 10772, 10776, 10780, 10784, 10788, 10792, 10796, 10800,
        10804, 10808, 10812, 10816, 10820, 10824, 10828, 10832, 10836, 10840,
        10844, 10848, 10852, 10856, 10860, 10864, 10868, 10872, 10876, 10880,
        10884, 10888, 10892, 10896, 10900, 10904, 10908, 10912, 10916, 10920,
        10924, 10928, 10932, 10936, 10940, 10944, 10948, 10952, 10956, 10960,
        10964, 10968, 10972, 10976, 10980, 10984, 10988, 10992, 10996, 11000,
        11004, 11008, 11012, 11016, 11020, 11024, 11028, 11032, 11036, 11040,
        11044, 11048, 11052, 11056, 11060, 11064, 11068, 11072, 11076, 11080,
        11084, 11088, 11092, 11096, 11100, 11104, 11108, 11112, 11116, 11120,
        11124, 11128, 11132, 11136, 11140, 11144, 11148, 11152, 11156, 11160,
        11164, 11168, 11172, 11176, 11180, 11184, 11188, 11192, 11196, 11200,
        11204, 11208, 11212, 11216, 11220, 11224, 11228, 11232, 11236, 11240,
        11244, 11248, 11252, 11256, 11260, 11264, 11268, 11272, 11276, 11280,
        11284, 11288, 11292, 11296, 11300, 11304, 11308, 11312, 11316, 11320,
        11324, 11328, 11332, 11336, 11340, 11344, 11348, 11352, 11356, 11360,
        11364, 11368, 11372, 11376, 11380, 11384, 11388, 11392, 11396, 11400,
        11404, 11408, 11412, 11416, 11420, 11424, 11428, 11432, 11436, 11440,
        11444, 11448, 11452, 11456, 11460, 11464, 11468, 11472, 11476, 11480,
        11484, 11488, 11492, 11496, 11500, 11504, 11508, 11512, 11516, 11520,
        11524, 11528, 11532, 11536, 11540, 11544, 11548, 11552, 11556, 11560,
        11564, 11568, 11572, 11576, 11580, 11584, 11588, 11592, 11596, 11600,
        11604, 11608, 11612, 11616, 11620, 11624, 11628, 11632, 11636, 11640,
        11644, 11648, 11652, 11656, 11660, 11664, 11668, 11672, 11676, 11680,
        11684, 11688, 11692, 11696, 11700, 11704, 11708, 11712, 11716, 11720,
        11724, 11728, 11732, 11736, 11740, 11744, 11748, 11752, 11756, 11760,
        11764, 11768, 11772, 11776, 11780, 11784, 11788, 11792, 11796, 11800,
        11804, 11808, 11812, 11816, 11820, 11824, 11828, 11832, 11836, 11840,
        11844, 11848, 11852, 11856, 11860, 11864, 11868, 11872, 11876, 11880,
        11884, 11888, 11892, 11896, 11900, 11904, 11908, 11912, 11916, 11920,
        11924, 11928, 11932, 11936, 11940, 11944, 11948, 11952, 11956, 11960,
        11964, 11968, 11972, 11976, 11980, 11984, 11988, 11992, 11996, 12000,
        12004, 12008, 12012, 12016, 12020, 12024, 12028, 12032, 12036, 12040,
        12044, 12048, 12052, 12056, 12060, 12064, 12068, 12072, 12076, 12080,
        12084, 12088, 12092, 12096, 12100, 12104, 12108, 12112, 12116, 12120,
        12124, 12128, 12132, 12136, 12140, 12144, 12148, 12152, 12156, 12160,
        12164, 12168, 12172, 12176, 12180, 12184, 12188, 12192, 12196, 12200,
        12204, 12208, 12212, 12216, 12220, 12224, 12228, 12232, 12236, 12240,
        12244, 12248, 12252, 12256, 12260, 12264, 12268, 12272, 12276, 12280,
        12284, 12288, 12292, 12296, 12300, 12304, 12308, 12312, 12316, 12320,
        12324, 12328, 12332, 12336, 12340, 12344, 12348, 12352, 12356, 12360,
        12364, 12368, 12372, 12376, 12380, 12384, 12388, 12392, 12396, 12400,
        12404, 12408, 12412, 12416, 12420, 12424, 12428, 12432, 12436, 12440,
        12444, 12448, 12452, 12456, 12460, 12464, 12468, 12472, 12476, 12480,
        12484, 12488, 12492, 12496, 12500, 12504, 12508, 12512, 12516, 12520,
        12524, 12528, 12532, 12536, 12540, 12544, 12548, 12552, 12556, 12560,
        12564, 12568, 12572, 12576, 12580, 12584, 12588, 12592, 12596, 12600,
        12604, 12608, 12612, 12616, 12620, 12624, 12628, 12632, 12636, 12640,
        12644, 12648, 12652, 12656, 12660, 12664, 12668, 12672, 12676
      ],
      axisTick: {
        alignWithLabel: true
      }
    }
  ],
  yAxis: [
    {
      gridIndex: 0,
      type: 'value'
    },
    {
      gridIndex: 1,
      type: 'category'
    }
  ],
  series: [
    {
      xAxisIndex: 0,
      yAxisIndex: 0,
      data: [],
      type: 'bar',
      markArea: {
        data: [
          [
            {
              xAxis: '8600'
            },
            {
              xAxis: '11700'
            }
          ]
        ]
      }
    },
    {
      xAxisIndex: 1,
      yAxisIndex: 1,
      data: [],
      type: 'heatmap',
      markArea: {
        data: [
          [
            {
              xAxis: '8600'
            },
            {
              xAxis: '11700'
            }
          ]
        ]
      }
    }
  ]
};

Edo2610 avatar Mar 04 '24 13:03 Edo2610

Here is a minimal example.

It seems that different series types consider either the border of a category or the center.

MatthiasMert avatar Mar 07 '24 07:03 MatthiasMert

No sorry, your example not has a real problem. If you add

axisTick: {
        alignWithLabel: true
      }

in xAxis, you resolve your minimal example. I think that Heatmap has this configuration by default, meanwhile bar series not. Imposing the configuration to whole xAxis both series behave the same way except with, as I write in my response, a big amount of data and when you use dataZoom.

Edo2610 avatar Mar 07 '24 13:03 Edo2610

Demo

Edo2610 avatar Mar 13 '24 11:03 Edo2610

@Ovilia have you seen my demo?

Edo2610 avatar Apr 17 '24 06:04 Edo2610

shorten your Demo, it pops Error: URI Too Long

helgasoft avatar Apr 17 '24 07:04 helgasoft

I think this is a zoom display difference between bar and heatmap. Not an accuracy problem. Demo When zoomed out bar series markArea starts/ends in the middle of two ticks. image

When zoomed in - boundaries show correctly: image One has the choice what series type to use for markArea according to his preference.

helgasoft avatar Apr 17 '24 07:04 helgasoft

Yes @helgasoft, your example shows my error. If you set version to 5.4.0 you can notice that chart zoom works well either with bar and heatmap.

Edo2610 avatar May 07 '24 13:05 Edo2610

使用5.4.0可以较好的适配,但有个小问题,中间有间隙 image

onlyonestone avatar Aug 14 '24 09:08 onlyonestone