Merge pull request #33 from Abhinandan-Kushwaha/development
Fixed strokeWidth issue for Pie and Donut charts
This commit is contained in:
commit
6cd4b7ac40
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "react-native-gifted-charts",
|
"name": "react-native-gifted-charts",
|
||||||
"version": "0.1.14",
|
"version": "0.1.15",
|
||||||
"description": "The most complete library for Bar, Line, Area, Pie and Donut charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
|
"description": "The most complete library for Bar, Line, Area, Pie and Donut charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
|
||||||
"main": "src/index.tsx",
|
"main": "src/index.tsx",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -194,6 +194,18 @@ export const PieChart = (props: propTypes) => {
|
||||||
|
|
||||||
ctx.fillStyle = backgroundColor;
|
ctx.fillStyle = backgroundColor;
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
|
|
||||||
|
// Stroke at the end again
|
||||||
|
|
||||||
|
ctx.moveTo(
|
||||||
|
radius + initialValue + shiftX,
|
||||||
|
radius + initialValue + shiftY,
|
||||||
|
)
|
||||||
|
ctx.lineTo(
|
||||||
|
radius + initialValue + shiftX,
|
||||||
|
radius + initialValue + shiftY,
|
||||||
|
);
|
||||||
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************************/
|
/*************************************************************************************/
|
||||||
|
@ -221,6 +233,18 @@ export const PieChart = (props: propTypes) => {
|
||||||
ctx.fillStyle = dataItem.color || colors[i++ % 8];
|
ctx.fillStyle = dataItem.color || colors[i++ % 8];
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
|
|
||||||
|
// Stroke at the end again
|
||||||
|
|
||||||
|
ctx.moveTo(
|
||||||
|
radius + initialValue + shiftX,
|
||||||
|
radius + initialValue + shiftY,
|
||||||
|
)
|
||||||
|
ctx.lineTo(
|
||||||
|
radius + initialValue + shiftX,
|
||||||
|
radius + initialValue + shiftY,
|
||||||
|
);
|
||||||
|
ctx.stroke();
|
||||||
|
|
||||||
/************************* Displaying Text Labels **********************/
|
/************************* Displaying Text Labels **********************/
|
||||||
|
|
||||||
if (showText) {
|
if (showText) {
|
||||||
|
|
Loading…
Reference in New Issue