equinor / videx-wellog

Well log components
https://equinor.github.io/videx-wellog/
MIT License
21 stars 7 forks source link

Labels on the "x axis" #90

Open uekstrom opened 3 years ago

uekstrom commented 3 years ago

Dear Videx team, we are using the Videx wellog component in an Equinor R&T tool "Source Rock Prediction". We would like to have more control over the labels on the x axis, in particular we need evenly spaced tickmarks and labels. Is this something that could be added to Videx wellog?

Brynjulf commented 3 years ago

Hi @uekstrom,

Is this about legends for plots or about showing labels in a graph?

We do have a ScaleHelper class (./src/utils/scale-helper.ts) which exposes the static method createLinearTicks(scale, numberOfTicks) . Along with exposing the base tracks (canvas, svg and html) to help customise your own track.

Could you elaborate a little on your specific use case?

uekstrom commented 3 years ago

Hi Brynjulf, I have attached a screenshot of how we use the component today. We use it to display simulated data so our use-case is maybe different than what the component was developed for. In the screenshot you can see the numbers 0.75 3.16 and 4.01 on (what I call) the x axis of the column titled "Total Organic Carbon". What we like is to have some number of x ticks and label some of them (in this case maybe not more than 4?) according to the x value they represent. Can that be done using the scale-helper?

Screenshot from 2020-12-18 11-57-10

Brynjulf commented 3 years ago

Hi @uekstrom,

Adding tick marks to the legends is something that the scale-helper would not help with. The renderBasicPlotLegend method from ./src/plots/legends/common.ts could potentially be adjusted to take in a number of ticks to display and draw SVG lines based on this.

We do not currently have the capacity to make this change, but we do welcome contributions.