Closed
Description
Column nodeSizeCol = graphModel.getNodeTable().getColumn("Weight");
Function sizeRanking = appearanceModel.getNodeFunction(graph, nodeSizeCol, RankingNodeSizeTransformer.class);
RankingNodeSizeTransformer sizeTransformer = (RankingNodeSizeTransformer) sizeRanking.getTransformer();
sizeTransformer.setMaxSize(80);
sizeTransformer.setMinSize(10);
appearanceController.transform(sizeRanking);
Column labelSizeCol = graphModel.getNodeTable().getColumn("Weight");
Function sizeRanking2 = appearanceModel.getNodeFunction(graph, labelSizeCol, RankingLabelSizeTransformer.class);
RankingLabelSizeTransformer sizeTransformer2 = (RankingLabelSizeTransformer) sizeRanking2.getTransformer();
sizeTransformer2.setMaxSize(4);
sizeTransformer2.setMinSize(1);
appearanceController.transform(sizeRanking2);
model.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS, Boolean.TRUE);
model.getProperties().putValue(PreviewProperty.NODE_LABEL_FONT, new java.awt.Font("Comic Sans MS", 0, 12));
model.getProperties().putValue(PreviewProperty.NODE_LABEL_PROPORTIONAL_SIZE, Boolean.FALSE);
I have written these codes, and I find the node sizes change while the label sizes are 12. I have tried this in Gephi GUI and it works well. How can I make label size adjustment work?