SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

Hi, i am developping a spectogram, screenshot : https://i.ibb.co/7CPTZbg/screenshot-framed.png

I get the same result from your showcase, now there is some things i want to change but can’t resolve to know how to :
– How can i change data direction to spread from left to right ? (currently right to left)
– How can i clear FastUniformHeatmapRenderableSeries ? Method clear doesn’t work
– How can we set width of FastUniformHeatmapRenderableSeries’s layout to be fixed to a specific seconds number ? (example : there is 10 seconds of data between left and right)

Thank you,
Wavely

Version
2.2.2.2424
  • You must to post comments
0
0

Hi Damien.

  1. To implement left to right updates of heatmap values you need to change code which copies new values into spectrogramItems array so new values will be copied to the beginning of array instead of the end. In SpectrogramViewModel you need to change onNextFFT() method:

    fun onNextFFT(fftData: DoubleValues) {
      val spectrogramItems = spectrogramValues.itemsArray
      val fftItems = fftData.itemsArray
    
      val spectrogramSize = spectrogramValues.size()
      val fftSize = fftData.size()
      val offset = spectrogramSize - fftSize
    
      // Change next 2 lines
      // insert new values at the beginning of spectrogramItems 
      // and shift existing values to the right
      System.arraycopy(spectrogramItems, 0, spectrogramItems, fftSize, offset)
      System.arraycopy(fftItems, 0, spectrogramItems, 0, fftSize)
    
      spectrogramDS.updateZValues(spectrogramValues)
    }
    
  2. Well, UniformHeatmapDataSeries doesn’t support clearing because memory for it is allocated once when DataSeries is created and after that you can only update its values. However you can try to update heatmap values with transparent color.

  3. You can adjust heatmap size using StartX/Y ( specify where the start point of heatmap is ) and StepX/Y ( size of each cell ) properties

Hope this will help you!

Best regards,
Yura

  • Andrew
    XAxis.setFlipCooordinates(true) might work as well?
  • You must to post comments
0
0

It’s great ! Thank you 🙂

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.