Skip to content

Commit e568414

Browse files
committed
update titles
1 parent 85c9809 commit e568414

File tree

4 files changed

+11
-76
lines changed

4 files changed

+11
-76
lines changed

YChartsLib/src/main/java/co/yml/charts/ui/bubblechart/BubbleChart.kt

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -297,54 +297,6 @@ fun getMaxScrollDistance(
297297
} else 0f
298298
}
299299

300-
/**
301-
*
302-
* DrawScope.drawStraightOrCubicLine extension method used for drawing a straight/cubic line for a given Point(x,y).
303-
* @param pointsData : List of points to be drawn on the canvas
304-
* @param cubicPoints1 : List of average left side values for a given Point(x,y).
305-
* @param cubicPoints2 : List of average right side values for a given Point(x,y).
306-
* @param bubbleStyle : All styles related to the path are included in [LineStyle].
307-
*/
308-
fun DrawScope.drawStraightOrCubicLine(
309-
pointsData: MutableList<Offset>,
310-
cubicPoints1: MutableList<Offset>,
311-
cubicPoints2: MutableList<Offset>,
312-
bubbleStyle: BubbleStyle
313-
) {
314-
for (i in 1 until pointsData.size) {
315-
if (i % 2 == 0) {
316-
with(bubbleStyle) {
317-
drawCircle(
318-
color = color,
319-
alpha = alpha, colorFilter = colorFilter, blendMode = blendMode, radius = 12f
320-
)
321-
}
322-
} else {
323-
with(bubbleStyle) {
324-
drawCircle(
325-
color = color,
326-
alpha = alpha, colorFilter = colorFilter, blendMode = blendMode, radius = 6f
327-
)
328-
}
329-
}
330-
}
331-
332-
}
333-
//
334-
///**
335-
// *
336-
// * Returns the Drawstyle for the path.
337-
// * @param bubbleType : Type of the bubble [bubbleType]
338-
// * @param bubbleStyle : The style for the path [bubbleStyle]
339-
// */
340-
//private fun getDrawStyleForPath(
341-
// bubbleType: BubbleType, bubbleStyle: BubbleStyle
342-
//): DrawStyle = if (bubbleType.isDotted) Stroke(
343-
// width = bubbleStyle.width, pathEffect = PathEffect.dashPathEffect(bubbleType.intervals)
344-
//) else bubbleStyle.style
345-
//
346-
347-
348300
/**
349301
*
350302
* DrawScope.drawUnderScrollMask extension method used for drawing a rectangular mask to make graph scrollable under the YAxis.
@@ -363,23 +315,6 @@ private fun DrawScope.drawUnderScrollMask(columnWidth: Float, paddingRight: Dp,
363315
)
364316
}
365317

366-
/**
367-
*
368-
* DrawScope.drawShadowUnderLineAndIntersectionPoint extension method used for drawing a
369-
* shadow below the line graph points and also drawing intersection points on the line graph.
370-
* @param cubicPath : Path used to draw the shadow
371-
* @param pointsData : List of the points on the Line graph.
372-
* @param yBottom : Offset of X-Axis starting position i.e shade to be drawn until.
373-
* @param line : line on which shadow & intersectionPoints has to be drawn.
374-
*/
375-
fun DrawScope.drawBubble(pointsData: MutableList<Offset>, bubble: Bubble) {
376-
if (bubble.intersectionPoint.isNotNull()) {
377-
pointsData.forEach { offset ->
378-
bubble.draw(this, offset)
379-
}
380-
}
381-
}
382-
383318

384319
/**
385320
*

YChartsLib/src/main/java/co/yml/charts/ui/bubblechart/model/BubbleChartData.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import co.yml.charts.ui.linechart.model.ShadowUnderLine
1818

1919
/**
2020
*
21-
* LineGraphData data class that contains all params user need to define to draw a line graph.
22-
* @param bubblePlotData: The path to be drawn on the graph represented by a line.
21+
* BubbleChartData data class that contains all params user need to define to draw a bubble chart.
22+
* @param bubbles: A list of Bubbles to be drawn.
2323
* @param xAxisData: All the configurations related to X-Axis to be defined here in [AxisData]
2424
* @param yAxisData: All the configurations related to Y-Axis to be defined here in [AxisData]
2525
* @param isZoomAllowed: True if zoom in for all vertical graph components is allowed else false.
@@ -46,10 +46,10 @@ data class BubbleChartData(
4646
)
4747

4848
/**
49-
* Represent a Line in the [co.yml.charts.ui.linechart]
49+
* Represent a Bubble in the [co.yml.charts.ui.bubblechart]
5050
*
51-
* @param dataPoints list of points [Point] in the line
52-
* @param bubbleStyle Adds styling options in [LineStyle] to the line path drawn.
51+
* @param center center [Point] of the bubble
52+
* @param bubbleStyle Adds styling options in [BubbleStyle] to the bubble to be drawn.
5353
* @param intersectionPoint drawing logic to draw the point itself in [IntersectionPoint].
5454
* If null, the point is not drawn.
5555
* @param selectionHighlightPoint drawing logic to draw the highlight at the point when it is selected

YChartsLib/src/main/java/co/yml/charts/ui/bubblechart/model/BubbleStyle.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import androidx.compose.ui.graphics.drawscope.Stroke
1010
import co.yml.charts.ui.linechart.model.LineType
1111

1212
/**
13-
* Handles styling for the path drawn in the line graph
13+
* Handles styling for the bubble drawn in the bubble chart
1414
*
15-
* @param color Defines the color of the path or line.
16-
* @param width Defines the width of the path/line stroke.
17-
* @param alpha Defines the alpha of the path/line.
18-
* @param style Defines if the path/line is filled or stroke.
15+
* @param color Defines the color of the bubble.
16+
* @param width Defines the width of the bubble border stroke.
17+
* @param alpha Defines the alpha of the bubble.
18+
* @param style Defines if the bubble is filled or stroke.
1919
* @param colorFilter ColorFilter to apply to the [color] when drawn into the destination.
2020
* @param blendMode All prams related to selection popup to be added here in [SelectionHighlightPopUp]
2121
*/

app/src/main/java/co/yml/ycharts/app/presentation/BubbleChartActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class BubbleChartActivity : ComponentActivity() {
4444
backgroundColor = YChartsTheme.colors.background,
4545
topBar = {
4646
AppBarWithBackButton(
47-
stringResource(id = R.string.title_line_chart),
47+
stringResource(id = R.string.bubble_chart),
4848
onBackPressed = {
4949
onBackPressed()
5050
})

0 commit comments

Comments
 (0)