Click here to Skip to main content
15,887,135 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How to disable JqueryDateTime Picker Image button Pin
Dhruvin Bhatt9-May-14 2:29
Dhruvin Bhatt9-May-14 2:29 
QuestionJavascript Pin
amitkumar12788@gmail.com28-Apr-14 23:20
professionalamitkumar12788@gmail.com28-Apr-14 23:20 
AnswerRe: Javascript Pin
thatraja7-May-14 5:21
professionalthatraja7-May-14 5:21 
AnswerRe: Javascript Pin
Anurag Gandhi16-May-14 4:13
professionalAnurag Gandhi16-May-14 4:13 
QuestionShowing blank page on IE Pin
Subin Mavunkal23-Apr-14 22:09
Subin Mavunkal23-Apr-14 22:09 
AnswerRe: Showing blank page on IE Pin
vbmike24-Apr-14 6:26
vbmike24-Apr-14 6:26 
AnswerRe: Showing blank page on IE Pin
V.25-Apr-14 2:04
professionalV.25-Apr-14 2:04 
QuestionJQPlot legend styling [SOLVED] Pin
V.22-Apr-14 21:33
professionalV.22-Apr-14 21:33 
I'm having an issue with the legend options of JQPlot.

I can do some things with the legend like defining the labels (array legendlabels), showSwatches and placement and location.
But any attempt in changing the background, textColor or fontSize, ... doesn't work. The plot shows, the legend shows, but none of these options work. I've been up and down the provided samples and they work. I compared them with my prototype here (also all the css and js includes), but still no dice.
The code doesn't seem wrong as the plot (and legend) show, but some of the options don't seem to do anything.

JavaScript
/*more stuff above*/
legend: {
	show: true,					        //works
	labels:legendlabels,					//works
	//showSwatches: false,					//works
	//renderer:$.jqplot.EnhancedLegendRenderer,
	//background: "black",                                  //doesn't work
	//border: '1px solid black'                             //doesn't work
       	location:"n",                                           //works
        //I did try moving the stuff in/outside rendererOptions.
       	rendererOptions: {
       		//numberRows: 1,                   //doesn't work
       		placement:"outsideGrid",           //works inside rendererOptions as well as outside.
       		textColor: "rgb (255, 100, 100)",  //doesn't work
       		fontSize: "18pt"                   //doesn't work
       	}
},
/*more stuff below*/


has anyone encountered this issue? How can I solve this?
(google's results didn't yield solutions for me either)

thanks!



[SOLUTION]

You need to add the correct javascript file at the bottom of the page:
HTML
<script class="include" type="text/javascript" src="./Scripts/JQPlot/plugins/jqplot.enhancedLegendRenderer.js"></script>

and use the
JavaScript
renderer:$.jqplot.EnhancedLegendRenderer,

option in the json definition.
then you place any css styling properties in the
JavaScript
rendererOptions: {} 

object.

[/SOLUTION]
V.

(MQOTD rules and previous solutions)


modified 23-Apr-14 9:27am.

QuestionHelp with class assignment Pin
GeraldBlackmore22-Apr-14 17:56
GeraldBlackmore22-Apr-14 17:56 
AnswerRe: Help with class assignment Pin
Peter Leow22-Apr-14 18:17
professionalPeter Leow22-Apr-14 18:17 
SuggestionRe: Help with class assignment Pin
Richard Deeming23-Apr-14 1:32
mveRichard Deeming23-Apr-14 1:32 
GeneralRe: Help with class assignment Pin
GeraldBlackmore24-Apr-14 16:37
GeraldBlackmore24-Apr-14 16:37 
AnswerRe: Help with class assignment Pin
vbmike24-Apr-14 6:12
vbmike24-Apr-14 6:12 
GeneralRe: Help with class assignment Pin
GeraldBlackmore24-Apr-14 16:38
GeraldBlackmore24-Apr-14 16:38 
Questionis it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut21-Apr-14 21:43
Hakan Bulut21-Apr-14 21:43 
AnswerRe: is it possible to get a value from another page using JavaScript language? Pin
Blikkies21-Apr-14 21:55
professionalBlikkies21-Apr-14 21:55 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut21-Apr-14 22:27
Hakan Bulut21-Apr-14 22:27 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Blikkies21-Apr-14 22:51
professionalBlikkies21-Apr-14 22:51 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut22-Apr-14 0:13
Hakan Bulut22-Apr-14 0:13 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut22-Apr-14 1:08
Hakan Bulut22-Apr-14 1:08 
QuestionRequireJs Pin
Suraj Sahoo | Coding Passion16-Apr-14 9:36
professionalSuraj Sahoo | Coding Passion16-Apr-14 9:36 
AnswerRe: RequireJs Pin
ujjwal shukla16-Apr-14 20:46
ujjwal shukla16-Apr-14 20:46 
GeneralRe: RequireJs Pin
Suraj Sahoo | Coding Passion16-Apr-14 20:59
professionalSuraj Sahoo | Coding Passion16-Apr-14 20:59 
AnswerRe: RequireJs Pin
ujjwal shukla16-Apr-14 22:36
ujjwal shukla16-Apr-14 22:36 
GeneralRe: RequireJs Pin
Suraj Sahoo | Coding Passion16-Apr-14 22:41
professionalSuraj Sahoo | Coding Passion16-Apr-14 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.