I have a problem with creating custom p:chart type="pie" canvases.
I have to change the background color of the pie chart like from white to another color.
I tried almost everything i found. I tried to override css resource of Prime Faces chart classes but it doesn't work. It turns all canvas/frame into one color and make chart disappears.
.xhtml file
<p:chart type="pie"
model="#{dashboardController.model}"
style="width:500px;height:250px; margin: 0 auto;" />
bean.java file
model= new PieChartModel();
model.setDataFormat("value");
model.setShowDataLabels(true);
model.setFill(true);
model.setTitle("States");
model.setSeriesColors("62656a,a5a5a5,929397");
model.setShowDataLabels(true);
model.setDiameter(200);
This is the component which i need to change background of the canvas. You can see the same chart from here : http://www.primefaces.org/showcase/ui/chart/pie.xhtml
**How can i change only the background? **
Thanks in advance.
Change the bg on this class:
.jqplot-series-canvas {
background:blue;
}
Related
I have created a p-tabview with each tab containing some content. For that I have modified my app.component.html by adding the following code:
<p-tabView class="tabmain" [style]="{'background-color': 'cyan', 'margin-left':'0'}">
<p-tabPanel header="Godfather I" leftIcon="pi pi-calendar" [style]="{'background-color': 'red'}">
<div [style]="{'background-color': 'red', 'margin-left':'0'}">
Hi. This is the content.
</div>
</p-tabPanel>
</p-tabView>
I intend to give a dark background as I have to create the tabview in dark theme. I tried to add styles above to check the background color and the result is:
As visible, the portion between the content and the tabview is white in color. I intend to style in such a manner that the entire grid becomes dark. Cyan and red are just sample colors to check where the background color is getting applied against each property.
How to change the background color(white currently) between content and tab view boundary?
Looking the docs
You should manipulate p-tabview-panels in your scss(or css) of your component our globaly in style.scss (or css).
So your css is something like this
:host ::ng-deep .p-tabview .p-tabview-panels{
'background-color': 'red'
}
Read more here in local styling section
https://www.primefaces.org/primeng/showcase/#/theming
I'm trying to change the color of the text in all markdown cells. Actually, I can change the color of font applying HTML code but I have to be doing it in each cell and I would like default color to be different from white. I've seen that you can edit the custom.css file of the theme I'm using to edit changes in the markdown cells but I can not find the line of the code to change the color of the text.
I have also tried to change the Notebook settings from the menu "Advanced Settings Editor" but in Markdown Cell Configuration I can not find any option related to changing the text color, only options such as "fontSize" or "fontFamily".
You could do this:
<div class="alert-success">
This is a green colored box
</div>
<div class="alert-danger">
This is a red colored box
</div>
<div class="alert-warning">
This is a yellow colored box
</div>
<div class="alert-info">
This is a blue colored box
</div>
Source: IBM Knowledge Center: Markdown for Jupyter notebooks cheatsheet
Finally i can to solve my problem. I was playing a bit with the .css file and finally figured out how to change the color of text. The path of file is "/home/sknt/anaconda3/share/jupyter/lab/themes/#jupyterlab/theme-dark-extension/index.css" [file name index.css] and I change the color of text in the section "#content font", specifically in "#Defaults use Material Design specification" changing the color code of "jp-content-font-color1.
However, this change also affects the output of the code cells and in the end it does not convince me. My final solution that work for me was create a custom file .css and use the following code to change the color of the text only in markdown cells:
from IPython.core.display import HTML
def css_style():
styles = open("[path to .css file]","r").read()
return HTML(styles)
css_style()
I hope that these solutions that worked for me help other people who may want to modify the appearance of their notebook. Thank's.
I have an image (combination of blue and white in color) and background colour(white) . On click of the div, I need to reverse the colors. (background color to blue) and image(blue part of the image to white colour and white part of the image to blue colour).
Html :
<div class="col" ng-click="onHomeButtonClick()">
<img src="images/iconHome.png" class="menu-icons"><br>
</div>
Js code :
this.onHomeButtonClick = function($event){
$event.target.style.backgroundColor="DarkSlateBlue";
}
Tried so far :
Using $event.target.style.backgroundColor="DarkSlateBlue"; I am just able to set the background colour.But how do i invert the colors.
Try to use the CSS deklaration:
This could be like this:
HTML:
<img src="images/iconHome.png" id="imageToInvert" class="menu-icons">
CSS:
#imageToInvert:hover {
filter: invert(100%);
}
Hope this helps.
Not sure that filter:invert(100%) is actually what you're asking for but if it is as indicated in a comment you made, just make a class with that style. Such as .filterClass{filter: invert(100%)} then add that class in your click event using this element.className +="filterClass";
I hope this may help you Fiddle this one is for the div with background color you can use the same technique and change the image color too.
I have a table which uses some of the standard built in classes to color the table cells, e.g:
<td class="text-center success">
I've been asked to make these brighter, e.g. make this a brighter green. I'm not sure the best way to go about making this change. I don't want to edit the "success" class colour so need to define a brighter green but not sure where to go from here.
<td class="text-center success brighter-green">
CSS
.brighter-green {
background-color: #2ECC71; /* For background color change */
color: #2ECC71; /* For text color change */
}
You can customize the config.json from here http://getbootstrap.com/customize/
Or you can specifically and manually change your needed stuff from bootstrap Less Source or the SASS Source . You can get those from here
http://getbootstrap.com/getting-started/
add an addclass to the required element
<td class="text-center success custom-success">
.custom-success{color:/*custom-color*/}
I am working on pictures inside ASP.net (VB)
and try to make this picture hide when the mouse over and show if it mouse out
How can I do this without using script or jQuery ?
help me please
You can do this in Javascript or CSS.
For example, to use CSS:
<img class="hideshowimage" ... />
and in your CSS
.hideshowimage:hover { visibility:hidden; }