I have a XY line chart plot and a css file where I set chart features.
I can't figure out how to avoid the white border along the chart
My css settings are:
.chart-plot-background{
-fx-padding:0px;
-fx-font-family: Verdana;
-fx-background-color: linear-gradient(to bottom right, lightsteelblue, black);
}
.chart-content{
-fx-background-color: linear-gradient(to bottom right, lightsteelblue, black);
-fx-padding:30px;
}
I would like to fill the frame with same color without the white border.
Thanks
I have find a solution: it seems these white lines act as "border", so I have added in css file these instructions:
-fx-border-color: linear-gradient(to bottom right, lightsteelblue, black);
-fx-border-width: 5;
-fx-border-insets: -5;
Not sure if this is the best solution, any suggestions appreciated.
Related
could you please help with plotting horizontal price line with a label?
example the price is assigned to variable R1
I have used the below code, however the label is moving with the chart as this is associated with bar index.
can the label be attached the price on the extreme right or left of the chart and not moving with the bars?
i am looking to have similar label which comes with the default horizontal lines in tradingview,where there is option to centre, left, right the text.
Thanks and regards,
Imt
hline(R3, color=color.rgb(255, 255, 255, 53), linestyle=hline.style_dashed)
var label h_label_R3 = label.new(bar_index, R3, "Daily_R3: " + str.tostring(R3),style=label.style_none,textcolor=color.rgb(255, 255, 255, 47),size=size.small)
label.set_x(h_label_R3, bar_index+30)
How you Change MUI icon border thickness
suppose this icon is having thickness how to make setting icon border lighter
There is a trick with css (stroke must have the same color as your background)
<YourMuiIcon sx={{ stroke: "#ffffff", strokeWidth: 1 }} />
I would like to style axes in LightningChartJs and are not able to remove the little lines on axis overlap and the end of axis (Please see image below).
To set thickness of axis has no effect on the indicators:
const axisYStyles = axisYColors.map((color) => new SolidFill({ color }));
const axisYStrokeStyles = axisYStyles.map((fillStyle) => new SolidLine({ fillStyle, thickness: 1 }));
const axisX = this.chart.getDefaultAxisX()
.setStrokeStyle(axisYStrokeStyles[0]);
Would be nice if someone can help and explain how to remove or style this items. Thx in advance.
The little lines at the ends of the axis line are called "nibs". You can style and hide the nibs with Axis.setNibStyle().
emptyLine can be used to completely remove the axis and nib lines.
// Axis styling
chart.getDefaultAxisX()
// Hide the main axis line
.setStrokeStyle(emptyLine)
// Hide the Nib at the ends of the axis
.setNibStyle(emptyLine)
// Extract required parts from LightningChartJS.
const {
lightningChart,
emptyLine
} = lcjs
const chart = lightningChart()
.ChartXY()
// Axis styling
chart.getDefaultAxisX()
// Hide the main axis line
.setStrokeStyle(emptyLine)
// Hide the Nib at the ends of the axis
.setNibStyle(emptyLine)
chart.getDefaultAxisY()
// Hide the main axis line
.setStrokeStyle(emptyLine)
// Hide the Nib at the ends of the axis
.setNibStyle(emptyLine)
<script src="https://unpkg.com/#arction/lcjs#1.3.1/dist/lcjs.iife.js"></script>
On Line and Vertical Bar charts on Chart.js, sometimes the values on the y-axis get cut off when the numbers are to long. See image below. I have only noticed this issue on these two graph types.
Image of y axis being cut off
You can fix that by setting the layout padding on the chart.
options: {
layout: {
padding: {
left: 10
}
}
}
Reference: http://www.chartjs.org/docs/latest/configuration/layout.html
I need a border around just the chart area and not the whole chart. I can't find what property to set. This is in the Google Visualization API.
The appropriate option is undocumented. You need to set the chartArea.backgroundColor.stroke and chartArea.backgroundColor.strokeWidth options. The stroke option controls the color of the border, and takes any valid HTML color string. The strokeWidth option controls the width of the border, and takes an integer for the width in pixels:
chartArea: {
backgroundColor: {
stroke: '#4322c0',
strokeWidth: 3
}
}