Giter Site home page Giter Site logo

Comments (2)

ae3e avatar ae3e commented on August 13, 2024

There's 2 ways to do it :

  • Update the data field which contains an array. So you can set properties for each serie :
[
  {
    "type": "scatter",
    "mode": "markers",
    "line": {
      "color": "red",
      "width": 2
    }
  },
  {
    "type": "scatter",
    "mode": "lines",
    "line": {
      "color": "blue",
      "width": 2
    }
  },
]
  • Update your script :
let x1 = data.series[0].fields[1].values.buffer
let y1 = data.series[1].fields[1].values.buffer
let serie1 = {
  x : x1,
  y : y1,
  name : 'M1',
  mode : 'markers',
  line : {
    color : 'red'
  }
}

let x2 = data.series[2].fields[1].values.buffer
let y2 = data.series[3].fields[1].values.buffer
let serie2 = {
  x : x2,
  y : y2,
  name : 'M2',
  mode : 'lines',
  line : {
    color : 'blue'
  }
}

Hope it helps

from ae3e-plotly-panel.

korunekosama avatar korunekosama commented on August 13, 2024

Thank you very much, that's exactly what I need !

from ae3e-plotly-panel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.