Skip to main content

All Questions

Tagged with
3 votes
1 answer
378 views

Creating a legend for a scatter plot in D3

I have written the following code snippets to create a legend for a scatter plot. Basically, it is a simple example that uses Susie Lu's D3-legend module to create a legend for a scatter plot. The ...
Reem Al-Assaf's user avatar
1 vote
1 answer
1k views

react-chartjs-2 how to show legend text on the left with vertical text

I just want to align the Chart Legend on the right and the text will be shown vertically. Goal: enter image description here I've tried to use: position: left enter image description here The legend ...
Tuan Nghia's user avatar
2 votes
2 answers
49 views

Different shape based on datum

I am trying to append another shape when one of the values satisfy the condition as follows: const keys = ["A", "B", "C", "D", "E", "E", "G"] const colors = ['#1e90ff', '#008000', '#d3d3d3', '#...
Mush-A's user avatar
  • 445
0 votes
1 answer
173 views

Convert continuous colors(legend) to color as stepwise constant (discrete colors) in linear gradient

I am creating a continuous legend (have created using linear gradient). Now I want to convert same legend to look like discrete legend (have constant stepwise values). I have shared the images like ...
Eric's user avatar
  • 133
2 votes
2 answers
3k views

How to create color picker with extra functionality like choosing color from screen

I have an colorpicker which i created using react-color (https://casesandberg.github.io/react-color/) . Now I want extra functionality like it should also be able to choose the color from screen (...
Eric's user avatar
  • 133
0 votes
0 answers
39 views

how to add missing value on the legend in map visualization javascript?

I am trying to use map visualization and I have some missing state in my data. I added a condition for missing value to fill the map in red. Here is my code: { var projection = projection1; //...
Fateme Nazari's user avatar
0 votes
0 answers
776 views

Chart JS 3.9 - bar chart with multiple legend labels for one dataset

Current results As seen in this picture, I would like additional legends that is matching the colors. Like Apples are shown with the color green, I would also like to show 'Bananas' for orange', '...
Peter Dalby's user avatar
2 votes
0 answers
492 views

Echarts Legend overlap Chart

The legend of chart overlaps Chart Heres the example of legend legend={ width: '95%', type: 'scroll', orient: 'vertical' } [![Chart][1]][1] [1]: https://i.sstatic.net/...
Ethan 's user avatar
  • 31
1 vote
1 answer
144 views

How to fix overlapping tick labels for svg legend using D3

I have an color legend created using linear gradient and D3 concept. The issue currently I am facing is that the ticks labels of the legend gets overlapped. I have to show the Min and Max values all ...
Eric's user avatar
  • 133
1 vote
1 answer
749 views

How can I copy text from a single legend entry in plotly graphic?

I'm trying to select the text of a single entry/trace from a plotly plot. By default, text is not selectable at all from my plot, which I generated like this: In my R Markdown script, an R code chunk ...
Henrik's user avatar
  • 33
0 votes
1 answer
527 views

Why the labels under chart are not corresponding with labels in legend in Chart.js for bar chart?

I would like to make a chart with labels on xAxes and the same labels in the legend. I was trying different solutions, but the best I got is the snippet below. I don't understand, why all bars are ...
Kida's user avatar
  • 800
0 votes
0 answers
94 views

Issue with creating legend if min and max value supplied are not in between 0 and 1

I have created continuous legend using scale Linear in d3js and it works fine. But I also have scenario where min and max value are not in between 0 and 1 but have value [2315, 4516]. So I am passing ...
Eric's user avatar
  • 133
2 votes
1 answer
187 views

How to use logarithm sampling if data are between 0 and 1 to create legend using D3

I am creating an continuous legend(have created using linear gradient) using D3 for linear sampling. Now I have to use same legend for logarithm sampling. But my data are between 0 and 1 as shown ...
Eric's user avatar
  • 133
0 votes
2 answers
274 views

Reverse the direction of the color in linear gradient legend

I have an continuous legend(both vertical and horizontal) and currently the color are flown from red to blue but I want it to be in reverse direction like from blue to red. I have shared by code ...
Eric's user avatar
  • 133
0 votes
0 answers
90 views

How we can implement the same functionality of onClick of legend as we have for hover in Pie chart Highcharts?

How we can implement the same functionality of onClick of legend as we have for hover in Pie chart in Highcharts? I want to implement the same functionality on click of legend as we have for hover. eg....
Rahul Chauhan's user avatar

15 30 50 per page
1
2
3 4 5
17