Click here to Skip to main content
15,904,926 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: run event of asp contol by javascript Pin
Sunasara Imdadhusen21-May-14 23:37
professionalSunasara Imdadhusen21-May-14 23:37 
QuestionModular Javascript Pin
yaswanth.1614-May-14 7:05
yaswanth.1614-May-14 7:05 
AnswerRe: Modular Javascript Pin
Richard MacCutchan14-May-14 22:02
mveRichard MacCutchan14-May-14 22:02 
QuestionJavascript click event handler Pin
yaswanth.1614-May-14 6:24
yaswanth.1614-May-14 6:24 
AnswerRe: Javascript click event handler Pin
yaswanth.1614-May-14 6:31
yaswanth.1614-May-14 6:31 
AnswerRe: Javascript click event handler Pin
Kornfeld Eliyahu Peter14-May-14 6:57
professionalKornfeld Eliyahu Peter14-May-14 6:57 
GeneralRe: Javascript click event handler Pin
yaswanth.1614-May-14 7:01
yaswanth.1614-May-14 7:01 
Questionhow I can use a variable passed by parameter in a javascript function in a lambda expression? Pin
Francisco Cruz8-May-14 9:09
Francisco Cruz8-May-14 9:09 
QuestionDate formatting - Charts Pin
miss7868-May-14 5:49
miss7868-May-14 5:49 
AnswerRe: Date formatting - Charts Pin
thatraja9-May-14 3:48
professionalthatraja9-May-14 3:48 
GeneralRe: Date formatting - Charts Pin
miss78612-May-14 3:37
miss78612-May-14 3:37 
GeneralRe: Date formatting - Charts Pin
thatraja14-May-14 7:49
professionalthatraja14-May-14 7:49 
GeneralRe: Date formatting - Charts Pin
Sunasara Imdadhusen21-May-14 23:39
professionalSunasara Imdadhusen21-May-14 23:39 
QuestionHow to disable JqueryDateTime Picker Image button Pin
pkarthionline1-May-14 21:51
pkarthionline1-May-14 21:51 
AnswerRe: How to disable JqueryDateTime Picker Image button Pin
Praneet Nadkar4-May-14 22:14
Praneet Nadkar4-May-14 22:14 
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 

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.