![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
A Streamlit component library for interactive charts in chartjs. Draggable line, scatter, and bezier charts. The updated data of the chart is returned after user interaction.
Streamlit component that displays a interactive charts with draggable points. Users can click and drag points on the chart to adjust their values. The updated data of the chart is returned.
pip install draggable-charts
Displays a line chart with draggable points in one axis.
data
(pd.Series
, pd.DataFrame
): The data to display in the chart. Index is always X values and columns are Y values. Columns should have only numeric values. Series.name is the trace name. If a DataFrame is provided, the column names are the trace names.
options
(dict[str: any]
, optional): A dictionary of options for the chart. See Options for more details.
on_change
(Callable
, optional): A callback function that is called with the new data of the chart after user interaction.
args
(tuple
, optional): The arguments to pass to the callback function.
kwargs
(dict
, optional): The keyword arguments to pass to the callback function.
key
(str
, optional): An optional string to use as the unique key for the widget. If this is None, and the component's arguments are changed, the component will be re-mounted in the Streamlit frontend and lose its current state.
new_data
(pd.Series
, pd.DataFrame
): The data of the chart after user interaction. The format is the same as the input format.Displays a scatter chart with draggable points. Axes can be categorical or numerical.
data
(dict
): The data to display in the chart. Control points will be added in between. It has the form
{"trace 1": {"x": [1,2,3], "y": [1, 4, 9]}, "trace 2": ... }
options
(dict
): A dictionary of options for the chart. See Options for more details.
on_change
(Callable
, optional): A callback function that is called with the new data of the chart after user interaction.
args
(tuple
, optional): The arguments to pass to the callback function.
kwargs
(dict
, optional): The keyword arguments to pass to the callback function.
key
(str
, optional): An optional string to use as the unique key for the widget. If this is None, and the component's arguments are changed, the component will be re-mounted in the Streamlit frontend and lose its current state.
new_data
(dict[str, dict]
): The data of the chart after user interaction. The format is the same as the input format.Displays a quadratic Bezier chart with draggable points to adjust the curvature with one control point per each two data points.
data
(dict
): The data to display in the chart. It has the form
{"trace 1": {"x": [1,2,3], "y": [1, 4, 9]}, "trace 2": ... }
options
(dict
): A dictionary of options for the chart. See Options for more details.
on_change
(Callable
, optional): A callback function that is called with the new data of the chart after user interaction.
args
(tuple
, optional): The arguments to pass to the callback function.
kwargs
(dict
, optional): The keyword arguments to pass to the callback function.
key
(str
, optional): An optional string to use as the unique key for the widget. If this is None, and the component's arguments are changed, the component will be re-mounted in the Streamlit frontend and lose its current state.
new_data
(dict[str, dict]
): The data of the interpolated Bezier curve after user interaction. The format is the same as the input format.Displays a cubic Bezier chart with draggable points to adjust the curvature with two control point per each two data points. The movement between control points is attached to create a smooth interaction.
data
(dict
): The data to display in the chart. It has the form
{"trace 1": {"x": [1,2,3], "y": [1, 4, 9]}, "trace 2": ... }
options
(dict
): A dictionary of options for the chart. See Options for more details.
on_change
(Callable
, optional): A callback function that is called with the new data of the chart after user interaction.
args
(tuple
, optional): The arguments to pass to the callback function.
kwargs
(dict
, optional): The keyword arguments to pass to the callback function.
key
(str
, optional): An optional string to use as the unique key for the widget. If this is None, and the component's arguments are changed, the component will be re-mounted in the Streamlit frontend and lose its current state.
new_data
(dict[str, dict]
): The data of the interpolated Bezier curve after user interaction. The format is the same as the input format.All options are sent in the same dictionary options
. There are common options that applies to the canvas, and specific options applied to traces. Canvas options are:
'title'
: The title of the chart.'x_label'
: Text in x-axis.'y_label'
: Text in y-axis.'x_grid'
: A boolean indicating whether to display the grid for the x-axis.'y_grid'
: A boolean indicating whether to display the grid for the y-axis.'legend'
: A boolean indicating whether to display the legend. If not provided, the legend will be displayed by default.'legend_position'
: The position of the legend. It can be 'top'
, 'left'
, 'bottom'
, or 'right'
.'legend_align'
: The alignment of the legend. It can be 'start'
, 'center'
, or 'end'
.
If not provided, default options will be used.'labels'
: Default {}. Dictionary with a map from original labels to custom labels.'x_format'
: Default None. A printf-style format string controlling how the canvas should display X numeric ticks. Check D3 Format.'y_format'
: Default ".2~s"
. A printf-style format string controlling how the canvas should display Y numeric ticks.'show_line
: Boolean that indicates whether to display the line connecting the points on the graph.'colors'
: A list of colors for the chart traces. Each color must be a hexadecimal color code. The order of the colors corresponds to the order of the columns.'tension'
: The tension of the lines. 0 gives straight lines, 0.5 gives smooth lines. Default is 0.3.'fill_gaps'
: A Boolean that indicates whether NaN values are filled in the lines. If False, lines will be broken at NaN values. Default is False.'fixed_lines'
: List of column names that cannot be dragged. Default is an empty list.'border_dash'
: Default [(0,0)]. A list of tuples with length and spacing of dashes per every trace. It will repeat if more traces than tuples are provided.'point_radius'
: Default [3]. The radius of the point shape per trace. If set to 0, the point is not rendered.'fill'
: Default [False]. Boolean or int. Fill area between one dataset and origin or one dataset to another. Check Fill Options.import streamlit as st
from draggable_charts import scatter_chart
st.subheader("Scatter")
x_cat = ["A", "B", "C", "D", "E"]
scatter_data = {
"trace 1": {"x": x_cat, "y": [1, 4, 9, 16, 25]},
"trace 2": {"x": x_cat, "y": [1, 8, 27, 64, 125]},
"trace 3": {"x": x_cat, "y": [1, 16, 81, 256, 625]},
}
new_scatter_data = scatter_chart(
data=scatter_data,
options={"x_labels": x_cat, "show_line": True,
"tension": 0, "fixed_lines": ["trace 1"]}
)
new_scatter_data
FAQs
A Streamlit component library for interactive charts in chartjs. Draggable line, scatter, and bezier charts. The updated data of the chart is returned after user interaction.
We found that draggable-charts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.