Questions tagged [treemap]
An implementation of a mapping (dictionary) using a tree. This tag is also used for treemapping, an information visualization method for displaying hierarchical data with nested rectangles.
1,539
questions
0
votes
1
answer
22
views
Make plotly treemap also show negative values (Python)
I have the following code in python to create a treemap, which should show the changes in asset values from changing stock prices. However, I can only achieve, that the positive asset changes are ...
-2
votes
0
answers
33
views
Sort TreeMap with given list of prefixes
I am working on spring batch project. I am facing a problem, in which I need to read files from specific folder in the given prefixed country wise order. For example, I will have the list of prefixes ...
-1
votes
0
answers
23
views
Configure a TreeMap to sort values instead of keys [duplicate]
Map<String, Integer> tMap = new TreeMap<>();
In the above statement how can I set the default sorting order to values rather than keys? We have a parameterized constructor where we can ...
0
votes
1
answer
59
views
I want to show only categories in the legend of a highchart treemap. Is there a way to do that using shiny?
I want to make a treemap to get an impression of the sizes in one data.frame. Let me show you an example:
I use the following code to produce this chart:
library(shiny)
library(highcharter)
library(...
0
votes
0
answers
22
views
D3 - TreeMap implementation on angular 14
I need a help to implement D3 Treemap in angular 14.
I have gone through D3 js documentation, however finding difficulty to implement Tree Map in angular
Expected : enter image description here
...
-1
votes
1
answer
24
views
Getting "[Unresolved compilation problem: Type mismatch: cannot convert from TreeMap<String,String> to String]"
I'm new in Java. Please help me
This is my restful controller
This is the model
The error when I run the code
0
votes
2
answers
41
views
Convert keys to Values
I'm trying to convert the keys of a Map to Values of another Map, but finally only one key was return as Value. What was the problem?
when the program excuted I got different Result
import ...
0
votes
0
answers
31
views
Python Plotly Treemap Color Scale Variable Not Adding Up Child Values
I am trying to plot treemap using Plotly in Python. I have three categorical variables that I am using as parent/child variables for the plot and two other continuous variables - "Sales_Quantity&...
0
votes
0
answers
38
views
How to use first 50 data from hashmap data
I have data on the hashmap, and the data in the hashmap changes every second. Hashmap size will 347 at times and 197 at other times. such as below:
2022-12-25 16:48:27.140 8081-8081/com.harrysoft....
0
votes
1
answer
58
views
How to get lower value in a TreeMap?
I use TreeMap to keep daily stocks of a product as shown below:
NavigableMap<Integer, Integer> map = new TreeMap<>();
for (int i = 0; i < stocks.size(); i++) {
map.put(i+1, stocks....
-1
votes
1
answer
51
views
How to get lower value by closest index?
I have the following list values:
List<Integer> days = List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
List<Integer> temperatures = List.of(4, 5, 7, 3, 6, 9, 7, 2, 5, 3);
Each day has the ...
0
votes
1
answer
27
views
How to Pass input$variable to renderPlotly in a flexadashboard [duplicate]
newData() is a dynamic generated data frame by a reactive statement based on user inputs:
selectInput("year", "Year", c("2019", "2020", "2021"), ...
0
votes
1
answer
57
views
Treemap with customized label
I know this could be a possible duplicate, but i have a treemap as follows:
as of now my labels are this:
I only want to display the label and count for this, which should be easy but i think I am ...
2
votes
1
answer
55
views
Is it possible to change rectangle ordenation in Plotly treemap?
I want to make a treemap following a predefined ordering, but I don't know how to manipulate the hierarchy defined by plotly treemap.
Here is the treemap I've created:
Here I want the O to be above ...
2
votes
1
answer
79
views
Treemap (plotly) color intensity according to a variable
I made a treemap using the treemap package, in which the area of each box is related to the Valor variable and the color of each box is related to the escala variable, which was created from the Nota ...
0
votes
1
answer
41
views
Java TreeMap : Unable to sort the TreeMap key in decreasing order of the length/value
I am trying to use the TreeMap to sort my keys, which are being stored in the Map<String,Integer>. But for some reason, the keys are not arranged correctly in decreasing order, as intended. I ...
0
votes
0
answers
11
views
Several treemap plots in R: how to fix location of a category
I am trying to make several treemaps with different datasets but with the same categories (same groups). I would like the colors to be homogeneous between plots so I wrote (vColor="group1"), ...
1
vote
1
answer
52
views
plotly treemap: how do I color each box by the content of the nested rectangles, not based on the parent.?
I am trying to make a treemap with different levels. each level has a name. it could be that a name occurs both for a parent or for a child. for example:
import pandas as pd
import plotly.express as ...
-1
votes
1
answer
39
views
How to solve problem with Java TreeMap when you use object as key? [closed]
package RecyclingJava.recycling;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeMap;
public class ...
2
votes
1
answer
68
views
Aggregation calculation method for treemap in plotly.express - Python
Thanks by advance for people who will try to help me. This is the first time I ask a question as I have been struggling for days on this one! Eternal glory to the one helping me out with this!
Let me ...
0
votes
0
answers
22
views
amChart4 : How to match tooltip's border color with background color in treemap?
I am working on a "TreeMap" chart in "amChart4" and I want to change the "border color" of the "tooltip" to be the same as the background color.
enter image ...
0
votes
1
answer
41
views
Split a map into submaps Java
I have a map with 10 000 keys and it looks like this:
Map<String, List<Integer>>. I want to make a list of Map<String, List<Integer>> which will contains 50 submaps X 200 ...
0
votes
1
answer
71
views
Using dash plotly treemap, how do I track selected data?
I'm trying to follow this example to track selected leaf node. But I am unable to make it work. I get a callback error and nothing prints to terminal. Could someone help me correct the code?
import ...
0
votes
1
answer
36
views
(Jax) Reshape pytree containing arrays of different shapes
I have a pytree containing arrays that have different shapes, for example it contains:
observations of shape (5, 3, 250, 23)
dones of shape (5, 3, 250)
I want to reshape my pytree so that the first ...
1
vote
1
answer
43
views
How to change treemap color scale on "Dash example - modal treemap"
I try to change color scale on example (modal treemap).
https://dash-example-index.herokuapp.com/modal-treemap
I added color definition to treemap call but it does not change the color. Where I need ...
0
votes
0
answers
33
views
How to reduce the distance between two graph and two chart
i'm working with plotly dash and i want to create multiple treemap chart in plotly dash but i'm not able to reduce the distance of both chart distance that is between of both.
there total are 5 charts ...
0
votes
0
answers
17
views
Maintaining a list of SocketChannels that are unique
I am using Java NIO and selectors to get instances of SocketChannels. I need to attach each instance of a SocketChannel that I get from the selector to an encryption key that is unique to each ...
0
votes
1
answer
139
views
Kotlin - lack of TreeMap
Why there are no TreeMap in Kotlin ?
I know we can use the TreeMap using java utils, but this is probably not the real reason.
Do we can achieve the same using HashMap ?
1
vote
2
answers
35
views
Method compare() removed entries having same value in Java
I am trying to create a sorted map using TreeMap<String, Integer> from an existing map in java.
Entries should be sorted based on value, so I created a custom Comparator.
class ValueComparator ...
1
vote
2
answers
98
views
Java-Stream - Grouping Lists based on several elements within each List
I have the following data stored as lists:
List<ArrayList<String>> dummy = new ArrayList<>();
dummy.add(new ArrayList<>(List.of("1", "SP1", "SW1"))...
0
votes
0
answers
171
views
Apache echarts Treemap: set selected tree node and zoom to node after data refresh
Environment:
OS: Windows
Browser: Google Chrome
Framework: Angular@14
Library: Echarts@5.4.0
Reproduction Link:
https://jsfiddle.net/AimanKhan11/51kuv2mc/11/
Steps to reproduce:
run the fiddle
...
0
votes
0
answers
12
views
Multiple interacting embedded cells using runtime js
I have a zoomable treemap embedded in my webpage as runtime js module. I also have a bar chart in the same webpage. Now, I want to dynamically update the data of the bar chart depending on the mouse ...
0
votes
2
answers
97
views
Collector toConcurrentMap() - What should the MergeFunction for a stream of Unique elements
Create map using parallel stream
I have this working code to create a map and populate using parallel stream
SortedMap<Double, Double> map = new TreeMap<>();
for (double i = 10d; i < ...
0
votes
0
answers
50
views
How to add hover text and modify legend in R treemap?
I'm using R treemap to create a treemap based on population and national income. How do I add hover text to each box item in the treemap that displays the country name and population/income value? How ...
0
votes
2
answers
138
views
Convert Map<Integer, List<Strings> to Map<String, List<Integer>
I'm having a hard time converting a Map containing some integers as keys and a list of random strings as values.
E.g. :
1 = ["a", "b", "c"]
2 = ["a", "b&...
0
votes
0
answers
21
views
How to view time option for treemap plotly Python ? percentage change by day, week, month according to the data i have below? someone help me, thanks
My data includes columns['Timestamps'] purpose i want to have day, week, month changes on my treemap, i have my code snippet but confused at timestamp , i have illustration someone help me if you don'...
0
votes
0
answers
31
views
R shiny: create variable in eventReactive that is used inside the defined function
I want to create a shny app that creates a interactive treemap.
The treemap should contain up to three layers, depending on user's choice.
The user can specify one, two or three layers, choosing from ...
0
votes
1
answer
110
views
How to make condition in treemap with red as negative value and green as positive value?
Here is my code, my results seem wrong where I circled, the result is positive values are green, red is negative value, only 2 color scale is green and red
How do I fix it I'd love your help
data = ...
0
votes
0
answers
131
views
How to make negative values red and positive values green in treemap plotly with python, and how to change according to date and time data
my data has date and time and percentage i want to resize with negative values to red and positive values to blue , this is my data:
I want every attribute in the "percentage" column ...
0
votes
2
answers
110
views
Sort a TreeMap if the key is date
What comparator should I use to sort a TreeMap<Date, Long> if I want its keys to be "the same" if they hold the same DAY.
What I'm trying to say is that I want "15.09.2022 at 12:...
0
votes
2
answers
85
views
Is there a way to get a random key and its respective value from a TreeMap?
I want to get a random key and its respective value from a TreeMap. The idea is that a random generator would pick a key and display that value. The key is a string and the value is a double. For ...
0
votes
0
answers
65
views
Reorder categorical variable in plotly's treemap
Based on the code provided here, I reproduced the figure below. However, I would like to reorder the days of the week to appear in order: Thursday, Friday, and Sunday. How do you change that in plotly ...
0
votes
1
answer
33
views
Hierarchical plot with bubbles in r
On this page, I found an interesting plot:
Is it possible to do something similar or exactly? (Combination between treemap and ggraph library).
0
votes
0
answers
101
views
ApexCharts Treemap chart - force columns to be just one and only one series name
I am using the ApexCharts js library in WordPress and Gravity Form Surveys (glikerts) and use them as my data source but my issue is their subtotals called anchors need to be in a hierarchical chart ...
-2
votes
2
answers
103
views
How to make a Java TreeMap be sorted by some comparator?
I have a java TreeMap<String, Integer> (let's call it multiset for now, because that is what I am using it for), and I want it to be sorted by the string's length. What I mean is that for some ...
2
votes
1
answer
63
views
How to make the output of a treemap bigger?
I am presenting some cancer datasets on a tree map. The proportions are fine and the data is good, the problem is the output map is too dense, and it's hard to even see. So the problem is only with ...
1
vote
3
answers
177
views
Have to display the number of times an element has been added in my map JAVA
I've created a TreeMap with products.
And I want to count the number of times they repeat themselves, but have no clue what to code. Any hints? (I expect no code, just suggestions)
private static Map&...
0
votes
0
answers
32
views
d3 perfomance issues due to zomming in 1200 svg
i'm trying to create Stock Heat map with react and d3. i created the tree map and adding zooming behavior but when i zoom in i see a huge delay to finally achieve my zoom.
my data contains about 407 ...
0
votes
0
answers
20
views
Use Plotly Treemap with Resquarify Algorithm - dynamic Treemap
I would like to use Plotly's Treemap Implementation to build an animated / dynamic Treemap where the size of the tiles varies over time. My idea was to divide my dataset in n time windows and build n ...
0
votes
1
answer
86
views
Why is TreeMap taking value as key
I have taken a treemap and want to sort it according to its key values which are stored in a hashmap.
Whenever I want to update a key-value pair, I remove the key from the tree and add the key value ...