@@ -58,6 +58,7 @@ import com.patrykandpatrick.vico.core.cartesian.marker.DefaultCartesianMarker
|
|||||||
import com.patrykandpatrick.vico.core.common.Fill
|
import com.patrykandpatrick.vico.core.common.Fill
|
||||||
import com.patrykandpatrick.vico.core.common.Insets
|
import com.patrykandpatrick.vico.core.common.Insets
|
||||||
import com.patrykandpatrick.vico.core.common.shape.CorneredShape
|
import com.patrykandpatrick.vico.core.common.shape.CorneredShape
|
||||||
|
import com.patrykandpatrick.vico.core.common.shape.DashedShape
|
||||||
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
||||||
import org.nsh07.pomodoro.utils.millisecondsToHours
|
import org.nsh07.pomodoro.utils.millisecondsToHours
|
||||||
import org.nsh07.pomodoro.utils.millisecondsToHoursMinutes
|
import org.nsh07.pomodoro.utils.millisecondsToHoursMinutes
|
||||||
@@ -112,14 +113,14 @@ fun TimeColumnChart(
|
|||||||
),
|
),
|
||||||
startAxis = VerticalAxis.rememberStart(
|
startAxis = VerticalAxis.rememberStart(
|
||||||
line = rememberLineComponent(Fill.Transparent),
|
line = rememberLineComponent(Fill.Transparent),
|
||||||
label = rememberTextComponent(typeface = axisTypeface),
|
label = rememberTextComponent(colorScheme.onSurface, axisTypeface),
|
||||||
tick = rememberLineComponent(Fill.Transparent),
|
tick = rememberLineComponent(Fill.Transparent),
|
||||||
guideline = rememberLineComponent(Fill.Transparent),
|
guideline = rememberLineComponent(Fill.Transparent),
|
||||||
valueFormatter = yValueFormatter
|
valueFormatter = yValueFormatter
|
||||||
),
|
),
|
||||||
bottomAxis = HorizontalAxis.rememberBottom(
|
bottomAxis = HorizontalAxis.rememberBottom(
|
||||||
line = rememberLineComponent(Fill.Transparent),
|
line = rememberLineComponent(Fill.Transparent),
|
||||||
label = rememberTextComponent(typeface = axisTypeface),
|
label = rememberTextComponent(colorScheme.onSurface, axisTypeface),
|
||||||
tick = rememberLineComponent(Fill.Transparent),
|
tick = rememberLineComponent(Fill.Transparent),
|
||||||
guideline = rememberLineComponent(Fill.Transparent),
|
guideline = rememberLineComponent(Fill.Transparent),
|
||||||
valueFormatter = xValueFormatter
|
valueFormatter = xValueFormatter
|
||||||
@@ -137,7 +138,15 @@ fun TimeColumnChart(
|
|||||||
padding = Insets(verticalDp = 4f, horizontalDp = 8f),
|
padding = Insets(verticalDp = 4f, horizontalDp = 8f),
|
||||||
margins = Insets(bottomDp = 2f)
|
margins = Insets(bottomDp = 2f)
|
||||||
),
|
),
|
||||||
valueFormatter = markerValueFormatter
|
valueFormatter = markerValueFormatter,
|
||||||
|
guideline = rememberLineComponent(
|
||||||
|
fill = fill(colorScheme.primary),
|
||||||
|
shape = DashedShape(
|
||||||
|
shape = CorneredShape.Pill,
|
||||||
|
dashLengthDp = 16f,
|
||||||
|
gapLengthDp = 8f
|
||||||
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
fadingEdges = rememberFadingEdges()
|
fadingEdges = rememberFadingEdges()
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -61,8 +61,10 @@ import com.patrykandpatrick.vico.core.cartesian.marker.DefaultCartesianMarker
|
|||||||
import com.patrykandpatrick.vico.core.cartesian.marker.LineCartesianLayerMarkerTarget
|
import com.patrykandpatrick.vico.core.cartesian.marker.LineCartesianLayerMarkerTarget
|
||||||
import com.patrykandpatrick.vico.core.common.Fill
|
import com.patrykandpatrick.vico.core.common.Fill
|
||||||
import com.patrykandpatrick.vico.core.common.Insets
|
import com.patrykandpatrick.vico.core.common.Insets
|
||||||
|
import com.patrykandpatrick.vico.core.common.component.ShapeComponent
|
||||||
import com.patrykandpatrick.vico.core.common.shader.ShaderProvider
|
import com.patrykandpatrick.vico.core.common.shader.ShaderProvider
|
||||||
import com.patrykandpatrick.vico.core.common.shape.CorneredShape
|
import com.patrykandpatrick.vico.core.common.shape.CorneredShape
|
||||||
|
import com.patrykandpatrick.vico.core.common.shape.DashedShape
|
||||||
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
||||||
import org.nsh07.pomodoro.utils.millisecondsToHours
|
import org.nsh07.pomodoro.utils.millisecondsToHours
|
||||||
import org.nsh07.pomodoro.utils.millisecondsToHoursMinutes
|
import org.nsh07.pomodoro.utils.millisecondsToHoursMinutes
|
||||||
@@ -127,14 +129,14 @@ fun TimeLineChart(
|
|||||||
),
|
),
|
||||||
startAxis = VerticalAxis.rememberStart(
|
startAxis = VerticalAxis.rememberStart(
|
||||||
line = rememberLineComponent(Fill.Transparent),
|
line = rememberLineComponent(Fill.Transparent),
|
||||||
label = rememberTextComponent(typeface = axisTypeface),
|
label = rememberTextComponent(colorScheme.onSurface, axisTypeface),
|
||||||
tick = rememberLineComponent(Fill.Transparent),
|
tick = rememberLineComponent(Fill.Transparent),
|
||||||
guideline = rememberLineComponent(Fill.Transparent),
|
guideline = rememberLineComponent(Fill.Transparent),
|
||||||
valueFormatter = yValueFormatter
|
valueFormatter = yValueFormatter
|
||||||
),
|
),
|
||||||
bottomAxis = HorizontalAxis.rememberBottom(
|
bottomAxis = HorizontalAxis.rememberBottom(
|
||||||
line = rememberLineComponent(Fill.Transparent),
|
line = rememberLineComponent(Fill.Transparent),
|
||||||
label = rememberTextComponent(typeface = axisTypeface),
|
label = rememberTextComponent(colorScheme.onSurface, axisTypeface),
|
||||||
tick = rememberLineComponent(Fill.Transparent),
|
tick = rememberLineComponent(Fill.Transparent),
|
||||||
guideline = rememberLineComponent(Fill.Transparent),
|
guideline = rememberLineComponent(Fill.Transparent),
|
||||||
valueFormatter = xValueFormatter
|
valueFormatter = xValueFormatter
|
||||||
@@ -152,7 +154,22 @@ fun TimeLineChart(
|
|||||||
padding = Insets(verticalDp = 4f, horizontalDp = 8f),
|
padding = Insets(verticalDp = 4f, horizontalDp = 8f),
|
||||||
margins = Insets(bottomDp = 2f)
|
margins = Insets(bottomDp = 2f)
|
||||||
),
|
),
|
||||||
valueFormatter = markerValueFormatter
|
valueFormatter = markerValueFormatter,
|
||||||
|
indicator = {
|
||||||
|
ShapeComponent(
|
||||||
|
fill = fill(it),
|
||||||
|
shape = CorneredShape.Pill,
|
||||||
|
margins = Insets(3f)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
guideline = rememberLineComponent(
|
||||||
|
fill = fill(colorScheme.primary),
|
||||||
|
shape = DashedShape(
|
||||||
|
shape = CorneredShape.Pill,
|
||||||
|
dashLengthDp = 16f,
|
||||||
|
gapLengthDp = 8f
|
||||||
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
fadingEdges = rememberFadingEdges()
|
fadingEdges = rememberFadingEdges()
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user