668 questions
1
vote
0
answers
516
views
ScatterGeo vs ScatterMapbox in Plotly.JS (Performance vs. coloring options)
I have a little conundrum I was hoping someone could shed a bit of light on.
Basically I have a bunch of paired coordinates (roughly 3000), i.e. two points that needs to be connected with a line. ...
1
vote
1
answer
723
views
Stack series in Plotly.js line chart
Is there an option in Plotly.js to stack line series (series "type": "")? In the example below the three lines to sum to 100%.
It is possible to show series as either stacked (e....
1
vote
0
answers
99
views
Plotly JS - Render Charts as Images
I have dashboards built with Plotly.js that are very big... in excess of 100+ charts with thousands of data points. I'm using Puppeteer to generate PDF reports from these dashboards.
I'm currently ...
0
votes
1
answer
181
views
plotly.js Multiple plots created, only last one is working as intended
If I click on a symbol on a map I want to create timeseries-plots with plotly. If i click on the next symbol there should be a new plot etc.
This is working fine, but I am not able to use the plotly ...
1
vote
2
answers
661
views
Custom x-axis and y-axis range with Plotly heatmap
Let's say we have a 2x4 matrix displayed into a Plotly.js heatmap (in reality it can be 500x1000):
var data = [{z: [[1, 2, 3, 4], [5, 6, 7, 8]], type: 'heatmap'}];
Plotly.newPlot('myDiv', data, {...
2
votes
1
answer
430
views
Plotting points over box plot in PlotlyJS Julia
I would like to plot data points over a box plot in PlotlyJS in Julia. Here is some reproducible code to create a box plot with data points side by side:
using PlotlyJS, CSV, DataFrames
df = dataset(...
1
vote
0
answers
73
views
Hovering data as a text, in inside container
My query is that in my homepage, I want that only daily percent change and
market capitalisation seen on this child container. Hovering data should
only appear as a hover here but not as a printed ...
4
votes
1
answer
339
views
Adding a keyboard event to plotlyjs
I want to listen to keyboard event in plotlyjs(spacebar key pressed to be more specific). When spacebar is pressed I want to discontinue line drawing on mouse click.
I have added eventListener to ...
3
votes
1
answer
1k
views
Plotly "toImage": send the image to server instead of triggering a browser file download
I'd like the top bar "Download plot as a png" button to send the image data to server (for example via Javascript fetch) instead of triggering a browser file download.
I see there are Plotly....
2
votes
0
answers
343
views
Plotly.js modebar buttons navigating to current page
I'm using Plotly.js on a SvelteKit app, and I have this issue that if I have a plot on the page, any <a> tag with no href attribute will trigger a route change to the same route when clicked, ...
0
votes
0
answers
528
views
Plotly Express px.line() parameter color_discrete_map not working correctly
I'm trying to assign specific colors to different lines on my plotly line graph and when specifying key/color pairs using the color_discrete_map parameter I do not get the correct output. For example, ...
2
votes
1
answer
1k
views
Temporarly disable mouse click interactions on a Plotly plot ("freeze the plot")
With Javascript, how to disable/enable all mouse interactions on a Plotly.js plot? (click, drag and drop for selection or zooming, etc.)
This does not work: the interactions are still available on the ...
2
votes
1
answer
4k
views
How to make a Plotly plot follow the parent container's size?
Here the resizing of the image happens automatically when you resize the parent div. How to make a similar behaviour for the Plotly plot, with high FPS?
Plotly.newPlot('myDiv', [{x: [1, 2, 3, 4], ...
3
votes
1
answer
7k
views
How to make Plotly JS dynamically use the full height / width of a div, without hardcoding pixel dimensions?
When clicking on the top button, the size of the container #myDiv changes. How to make that the Plotly automatically takes all the available size of the container, without any noticeable delay?
Here ...
1
vote
0
answers
393
views
Customizing OHLC chart interactive controls in Plotly
I am using Plotly OHLC charts with Jupyter Notebook. Currently, Plotly offers some interactive controls on its OHLC charts:
While Plotly is doing a good job here, these controls are not what most the ...
0
votes
0
answers
456
views
How to handle text overflow in plotly js table?
Is there any way to apply something like text-overflow: ellipsis to plotly table cell? I want to able to cut the word if its not fit in the cell.
Code:
const dbTableData = [
{
type: '...
0
votes
0
answers
402
views
How to make all values on the axes positive or remove the minus sign on Plotly.Js chart?
I have a graph that renders some geometric configuration. And I would like all values (ticks) on the x-axis to be positive, even if the point values are negative. How can I achieve this?
My current ...
0
votes
1
answer
203
views
PlotlyJS rotate ellipse
Is there a way to rotate the ellipse in PlotlyJS? To draw a circle/ellipse in Plotly, you define the center and the radii in the positive and negative x and y directions. Is there a way to define an ...
0
votes
0
answers
73
views
Draw a curve like sinewave using plotly.js
I'm trying to plot a curve across discrete point with given (x, y) value. The red line is what I can plot at the moment. Actually, the blue line is what I want to plot. How can I plot a curve instead ...
0
votes
0
answers
242
views
Range slider displayed on the main plot (and no secondary plot/axis) with Plotly
When using a Plotly range slider, there are usually two plots : the normal plot on top + a small secondary plot on bottom where actually is the range slider:
How to have a range-slider on the main ...
1
vote
0
answers
152
views
Histogram 2d Visualization
I'm testing plotly.js 2D Histogram contour to show the pressures of a foot, but it changes a lot the shape and it doesn't look like a foot pressure.
There is the Codepen to test it, as you can see ...
2
votes
1
answer
737
views
Slow rendering of image + slider with Plotly JS
I'm trying to plot an image/heatmap with a slider that will change the opacity (of the heatmap), and a second slider that will modify a custom parameter on each "onchange" event.
Once this ...
1
vote
0
answers
43
views
Is it possible to fetch data on graph move, plotly js?
I have thousands of different timestamp and value record and it is not possible to fetch all of them and show in the time series graph. Is there a way to fetch data when user move the graph to the ...
0
votes
0
answers
59
views
Plotly by Akevelon boxplot does not give the same result as boxplot in r
I think I have found a possible bug in Plotly by Akevelon of Power bi. The thing is that I have made a boxplot in power bi using the component I mentioned above and I get very different metrics than ...
0
votes
1
answer
2k
views
how to update plotly.js chart with new data from website?
I am trying to update the chart with plotly.js with data from a server. My function should plot updated data in the charts every time new data is sent.
I have two different graphs in my chart. Both ...
1
vote
1
answer
662
views
Continuous slider without steps with Plotly
Is there a way to create a continous slider with Plotly.js, with float values?
All examples I have seen in https://plotly.com/javascript/sliders/
are with steps
require a pre-computing of the traces ...
0
votes
1
answer
1k
views
Automatically update Plotly React Chart when data changes
The below react code renders a chart that is updated with additional data when a button is pressed. The count state is passed into the BarChart function as a prop. However, the chart does not ...
1
vote
1
answer
323
views
Why is the 2d plotly.js plot component divided into two separated svg after mounting the component from a htmlelement
I'm trying to wrap the Plotly.js React component inside Web Components. After mounting the plotly.js React component, the 2D plot is divided into two separatedmain-svgs, one for data and one for ...
0
votes
0
answers
36
views
Plotly x axis range plot
In plotly, how to plot a bar graph with x axis range dates
I want
in xaxis - startDate, endDate and
in yaxis - requestCount
[
{
"startDate": 1666255095626,
"endDate": ...
1
vote
1
answer
515
views
Plotly truncating data values outside y axis range
Is there a way to get Plotly not to truncate data labels? In the example below, the data values for the topmost series are getting truncated. If I explicitly set "yaxis": { "range&...
1
vote
0
answers
97
views
Draw plotly Lines on a bar graph with arbitrary x values
This is what my bar graph looks like:
And below is the shapes dict I am using inside the larger layout object:
this.sla_model = 60 // This is some arbitrary value that changes over time.
...
2
votes
0
answers
528
views
how can I save my plotly.js chart as a dynamic html web page?
I'm using plotly.js to create interactive plots and want to be able to export the plots as an html file, so the charts can be shared between users. I don't want these plots to be downloaded as static ...
1
vote
0
answers
544
views
Plotly React - How to update chart when user clicks on a bar in a barchart
I am trying to update a whole bar chart using Plotly React.
First I have a bar chart with bars on vertical, then after I click wherever on the chart I would like to rotate the chart 90 degrees and ...
1
vote
1
answer
292
views
color showing density in plotly.js scatterplot
I followed this https://plotly.com/javascript/3d-scatter-plots/ to create this:
However, I want to create something similar to this:
Which I made in python matplotlib. I just want to make the density ...
2
votes
2
answers
1k
views
Why does my plotly plot not display in certain conditions with plotly.js
I am working with Plotly.js in a space where i need to dynamically change the data loaded in a plot.
The approach I took was to re-plot the plot div with new data that would be taken from a json. The ...
1
vote
1
answer
455
views
The type definition of Plotly.animate not found
I am using plotly.js in [email protected] project with [email protected], which I installed by following command:
npm install plotly.js-dist-min
npm install @types/plotly.js-dist-min
I write codes in Visual ...
3
votes
1
answer
984
views
How to reduce space between title and donut chart in plotly js?
My current code:
const donutData = [
{
values: [2, 98],
labels: ['', ''],
sort: false,
marker: {
colors: ['#0099cc', '#535353'],
},
name: '',
hoverinfo: 'none',
...
1
vote
0
answers
126
views
How do I attach a click event handler to a particular candlestick generated using the plotly.NET library?
I'm just beginning to learn F# and I was wondering how to attach a click event handler to a particular candlestick rendered using the plotly.NET library at https://plotly.net/07_1_candlestick.html
...
1
vote
0
answers
708
views
How to make gauge charts edges rounded plotly js?
I want to make this charts edges rounded, how can I do that? I've tried:
border-radius: 100%;
stroke-linejoin: round;
stroke-linecap:round;
none of them worked.
If I give stroke-width: 1, it become ...
2
votes
1
answer
2k
views
Adding Plotly Modebar button which allows switching hover mode
I have been using plotly to make some standalone interactive plots that I can share and allow others to play with data.
I switched which version of the standalone .js file I use (that each html file ...
1
vote
1
answer
240
views
Getting very thin plots while plotting using plotlyjs in julia
I'm trying to plot a random walk in Pluto after following a Julia tutorial but I'm getting a very thin graph (the height is very small).
The code I'm running is Plot(walk, Layout(yaxis_range=[-20,20],...
8
votes
1
answer
814
views
Calculate Frequency and normal distribution curve co-ordinates (X & Y)
I am implementing Histogram chart using react-plotlyjs. Graph is implemented but I have to draw the normal distribution curve using X and Y axis. I have the X axis but Y axis is automatically ...
0
votes
1
answer
833
views
plotly js - x and y axis hover info on the axis
Is it possible to get the hover info to be on the axis itself? I see an example in python plotly but cannot get it to work with javascript. In the image it's the "1977" black hover label. ...
0
votes
0
answers
40
views
Does Plotly provide custom graph selection option for different graphs
I want to add option where user can select different column and different graph ( line, bar, scatter etc) selection option. Similar to below image -
One option is I create a custom selection option. ...
0
votes
1
answer
18
views
Transform object array to another object array summarizing some components to plot a chart with plotly
I need to transform an object array with data in another object array in order to plot a chart with the library Plotly.
This is the input format:
var input = [
{
"COUNT_DEVICES": ...
1
vote
1
answer
1k
views
How do I correctly include plotly types in angular (via local version)
I managed to have a look at different plotly packages and found out that the angular-plotly pacakge is not really updated anymore.
I chose to include the plotly library by downloading the plotly.min....
2
votes
1
answer
741
views
How to not show the axes lines on this heatmap in Plotly.js
I would like to render this heatmap without any grid lines in Plotly.js. I would like to still show tick marks at the bottom and side though (so probably not visible: false, right?). Thanks for any ...
1
vote
1
answer
457
views
Plotly chart using Javascript curve issue
I want to make step chart has curved line using plotly.js.
The difference between the connecting parts is felt differently depending on the size of the currently different numerical value.
The ...
0
votes
1
answer
814
views
How to change the colours in plotly heatmap
I have the following sample dataframe matrix below which I generated using some functions I created:
Loan_ID Gender Married Dependents Education
Loan_ID 1.000 NaN ...
4
votes
0
answers
193
views
The polygon returned from Flattenjs.BooleanOperations.unify doesn't make any sense
I'm using Flattenjs and Plotly to display polygons. The user can draw polygons anywhere with plotly. If the user draws polygons that are overlapping I want the ability to "merge" those ...