legend

Pie chart legend in dc.js 1.7 not showing up

孤者浪人 提交于 2019-12-11 11:15:16
问题 I'm trying to create a pie chart legend in dc.js. However, there is no legend. It just... doesn't show up. Everything appears the same as before I used the legend command. Here is the JSBin Here is the legend code: .legend(dc.legend().x(80).y(70).itemHeight(13).gap(5)); Here is the rest of the relevant code: var companyDimension = data.dimension(function(d) {return d.company;}); var totalSalesByCompany = companyDimension.group().reduceSum(function(d) {return d.total;}); var

Add separate legend for geom_vline

佐手、 提交于 2019-12-11 11:09:59
问题 I have this data frame: dput(df) structure(list(X = c(337L, 338L, 339L, 340L, 341L, 342L, 343L, 344L, 345L, 346L, 347L, 348L, 349L, 350L, 351L, 352L, 353L, 354L, 355L, 356L, 357L, 358L, 359L, 360L, 361L, 362L, 363L, 364L, 365L, 366L, 367L, 368L, 369L, 370L, 371L, 372L, 373L, 374L, 375L, 376L, 377L, 378L, 379L, 380L, 381L, 382L, 383L, 384L, 385L, 386L, 387L, 388L, 389L, 390L, 391L, 392L, 393L, 394L, 395L, 396L, 397L, 398L, 399L, 400L, 401L, 402L, 403L, 404L, 405L, 406L, 407L, 408L, 409L, 410L,

adding text to legend from code behind

你。 提交于 2019-12-11 10:46:44
问题 how can i add text to a legend from code behind 回答1: Assuming you're talking about the HTML Legend Tag and using C# in an ASP.NET site. You can give it an ID and a runat="server" then you can access it from the code behind by name and change its text property. <form id="form1" runat="server"> <fieldset> <legend id="myLegend" runat="server">Personalia:</legend> Name: <input type="text" size="30" /><br /> Email: <input type="text" size="30" /><br /> Date of birth: <input type="text" size="10" /

JavaFX StackedBarChart legend color don't follow chart color CSS styled

你。 提交于 2019-12-11 10:33:40
问题 In my application (JDK 1.8u51) I want to set some specific colors to some data categories in a StackedBarChart. I made this with a CSS as bellow : .root{ -fx-ok-color: darkgreen; -fx-critical-color: darkblue; -fx-warning-color: gold; -fx-minor-color: orange; -fx-major-color: red; -fx-undefined-color: darkgrey; } .okChartBar{ -fx-bar-fill : -fx-ok-color; } .warnigChartBar{ -fx-bar-fill : -fx-warning-color; } .minorChartBar{ -fx-bar-fill : -fx-minor-color; } .majorChartbar{ -fx-bar-fill : -fx

GNUPLOT: Merge key entries with multiplot

夙愿已清 提交于 2019-12-11 10:33:12
问题 I would like to plot several data colmuns of a datfile in one graph. For each data columnI would like to use a black (differently dashed) line and a coloured point. I found out how to do it in general (by plotting first the line ( with lines ) and then the points ( with points ) and afterwards shifting the legend entries on top of each other). This is explained for example in this post: Merge key entries in gnuplot But it is not fully working in my case. I have three problems: First: I would

How to put multiple symbols with the same label on the same line in the legend? [duplicate]

橙三吉。 提交于 2019-12-11 09:54:13
问题 This question already has an answer here : Matplotlib: Group different scatter markers under the same legend (1 answer) Closed 6 months ago . I am making a scatter plot which is made up of dots that can be either open or closed dots, and can be in four different colors. If the dot is open, it will have one label. If it's closed, it will have another label. I would like a legend where it shows 4 dots of each color side by side on one row corresponding to its label, instead of 1 dot per row

Change color and legend of plotLearnerPrediction ggplot2 object

不想你离开。 提交于 2019-12-11 09:05:43
问题 I've been producing a number of nice plots with the plotLearnerPrediction function in the mlr package for R. They look like this. From looking into the source code of the plotLearnerPrediction function it looks like the color surfaces are made with geom_tile. A plot can for example be made by: library(mlr) data(iris) #make a learner lrn <- "classif.qda" #make a task my.task <- makeClassifTask(data = iris, target = "Species") #make plot plotLearnerPrediction(learner = lrn, task = my.task) Now

Altering the margins of a legend in R

蓝咒 提交于 2019-12-11 08:33:01
问题 I am very new to R, so I'm struggling here a bit and I haven't found an answer to my problem. I'm trying to produce a simple bar-chart in R, and I have set my x-axis variable labels to be vertical, using las=2 . I then changed the margins for the barplot so that the labels would not overlap the xlab label, using par(mar=c(20,15,5,3)) and par(mgp=c(6,1,0)) . I would like to add a legend to this, but the one I have has adopted the margin dimensions of the graph itself, so that it appears too

Change Label Color in a Chart Control

无人久伴 提交于 2019-12-11 08:25:51
问题 The question I have seems to be simple but I can't find an answer around the Internet for that and even trying around did not help me. I just want to change the color of a Legend (from a Series). I know how to change the text color but I need to change the color of that marker. chart1.Legends["1"].ForeColor = Color.Transparent; chart1.Legends["1"].BackColor = Color.Transparent; does not help Is this possible? Thank you! EDIT: I want to change the blue color to another. Hope this is more clear

R ggplot: line around legend

江枫思渺然 提交于 2019-12-11 08:07:45
问题 I am trying to use ggplot2 for my data plotting. For purely superficial reasons I would like to have a line around my legend so as to better distinguish it from the plot (i.e. a black outline around the legend box). I could not find an answer to this question on any forum, but maybe you have a tip? library(ggplot2) Res = matrix(ncol = 3, nrow = 500) Res[,1] = 1:500 Res[,2] = sin((2*pi)/100*Res[,1]) Res[,3] = cos((2*pi)/100*Res[,1]) Res = as.data.frame(Res) colnames(Res) = c("X", "Y1", "Y2")